19 #define CHECK_IF_NEEDS_TO_STOP() if (_should_continue) _should_continue() 22 impl::optimizer::settings
const & settings,
27 std::vector< impl::yuy_t >
const & last_yuy_data,
31 thermal::thermal_calibration_table_interface
const & thermal_table,
32 std::function<
void()> should_continue
35 , _raw_intr( yuy_intrinsics )
36 , _thermal_intr( _raw_intr )
37 , _extr(
to_raw_extrinsics( depth.get_profile().get_extrinsics_to( yuy.get_profile() )))
40 , _should_continue( should_continue )
41 , _thermal_table( thermal_table )
49 else if( ! last_yuy_data.empty() )
50 AC_LOG(
DEBUG,
"Not using last successfully-calibrated scene: it's of a different resolution" );
52 if( thermal_table.is_valid() )
54 auto scale = thermal_table.get_thermal_scale( settings.hum_temp );
79 ir_profile.width(), ir_profile.height()
101 z_profile.get_intrinsics(),
_dsm_params, cal_info, cal_regs,
127 #define DISABLE_RS2_CALIBRATION_CHECKS "RS2_AC_DISABLE_RETRIES" 141 if( getenv(
"RS2_AC_INVALID_SCENE_FAIL" ) )
171 if( !getenv(
"RS2_AC_FORCE_BAD_RESULT" ) )
205 catch( std::exception
const &
e )
207 AC_LOG( ERROR,
"Calibration threw error: " << e.what() );
algo::depth_to_rgb_calibration::optimizer _algo
rs2_extrinsics_double get_extrinsics() const
rs2_dsm_params _dsm_params
void write_to_file(void const *data, size_t cb, std::string const &dir, char const *filename)
GLenum GLenum GLenum GLenum GLenum scale
#define CHECK_IF_NEEDS_TO_STOP()
stream_profile get_profile() const
void debug_calibration(char const *prefix)
rs2_intrinsics_double get_intrinsics() const
algo::thermal_loop::thermal_calibration_table_interface const & _thermal_table
#define DISABLE_RS2_CALIBRATION_CHECKS
GLint GLint GLsizei GLsizei GLsizei depth
const void * get_data() const
GLsizei const GLchar *const * string
rs2_intrinsics _thermal_intr
depth_to_rgb_calibration(algo::depth_to_rgb_calibration::optimizer::settings const &settings, rs2::frame depth, rs2::frame ir, rs2::frame yuy, rs2::frame prev_yuy, 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 const &yuy_intrinsics, algo::thermal_loop::thermal_calibration_table_interface const &, std::function< void()> should_continue=nullptr)
size_t optimize(std::function< void(data_collect const &data) > iteration_callback=nullptr)
void write_vector_to_file(std::vector< T > const &v, std::string const &dir, char const *filename)
std::vector< yuy_t > orig_frame
rs2_dsm_params const & get_dsm_params() const
rs2_extrinsics to_raw_extrinsics(rs2_extrinsics extr)
void set_z_data(std::vector< z_t > &&z_data, rs2_intrinsics_double const &depth_intrinsics, rs2_dsm_params const &dms_params, algo_calibration_info const &cal_info, algo_calibration_registers const &cal_regs, float depth_units)
#define VALIDATE_INTERFACE_NO_THROW(X, T)
rs2_calibration_status optimize(std::function< void(rs2_calibration_status)> call_back=nullptr)
rs2_extrinsics from_raw_extrinsics(rs2_extrinsics extr)
virtual std::vector< byte > build_raw_data() const =0
void set_yuy_data(std::vector< yuy_t > &&yuy_data, std::vector< yuy_t > &&prev_yuy_data, std::vector< yuy_t > &&last_successful_yuy_data, calib const &calibration)
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
#define AC_LOG(TYPE, MSG)
yuy2_frame_data const & get_yuy_data() const
void set_ir_data(std::vector< ir_t > &&ir_data, size_t width, size_t height)
std::vector< algo::depth_to_rgb_calibration::yuy_t > _last_successful_frame_data
bool is_scene_valid(input_validity_data *data=nullptr)
calib const & get_calibration() const
typename::boost::move_detail::remove_reference< T >::type && move(T &&t) BOOST_NOEXCEPT
const int get_data_size() const
void write_data_to(std::string const &dir)
virtual bool is_valid() const =0
const rs2_distortion l500_distortion
void write_data_to(std::string const &directory)