Skip to content

Commit

Permalink
always write raw_rgb.intrinsics (even for invalid thermal table), per…
Browse files Browse the repository at this point in the history
… VAL request
  • Loading branch information
maloel committed Oct 12, 2020
1 parent bc3f387 commit 2799dc1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/depth-to-rgb-calibration.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//// License: Apache 2.0. See LICENSE file in root directory.
//// Copyright(c) 2020 Intel Corporation. All Rights Reserved.
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2020 Intel Corporation. All Rights Reserved.

#include "depth-to-rgb-calibration.h"
#include <librealsense2/rs.hpp>
Expand Down Expand Up @@ -27,7 +27,7 @@ depth_to_rgb_calibration::depth_to_rgb_calibration(
std::vector< impl::yuy_t > const & last_yuy_data,
impl::algo_calibration_info const & cal_info,
impl::algo_calibration_registers const & cal_regs,
rs2_intrinsics yuy_intrinsics,
rs2_intrinsics const & yuy_intrinsics,
thermal::thermal_calibration_table_interface const & thermal_table,
std::function<void()> should_continue
)
Expand Down Expand Up @@ -110,9 +110,11 @@ void depth_to_rgb_calibration::write_data_to( std::string const & dir )
{
_algo.write_data_to( dir );

// VAL asked that we write this file even with no thermal table, so they can just make up
// something fictitious...
impl::write_to_file( &_raw_intr, sizeof( _raw_intr ), dir, "raw_rgb.intrinsics" );
if( _thermal_table.is_valid() )
{
impl::write_to_file( &_raw_intr, sizeof( _raw_intr ), dir, "raw_rgb.intrinsics" );
impl::write_vector_to_file( _thermal_table.build_raw_data(), dir, "rgb_thermal_table" );
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/depth-to-rgb-calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace librealsense
std::vector< algo::depth_to_rgb_calibration::yuy_t > const & last_yuy_data,
algo::depth_to_rgb_calibration::algo_calibration_info const & cal_info,
algo::depth_to_rgb_calibration::algo_calibration_registers const & cal_regs,
rs2_intrinsics yuy_intrinsics,
rs2_intrinsics const & yuy_intrinsics,
algo::thermal_loop::thermal_calibration_table_interface const &,
std::function<void()> should_continue = nullptr
);
Expand Down

0 comments on commit 2799dc1

Please sign in to comment.