Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
librealsense::algo::depth_to_rgb_calibration::optimizer Class Reference

#include <optimizer.h>


struct  settings

Public Member Functions

double calc_correction_in_pixels (std::vector< double2 > const &old_uvmap, std::vector< double2 > const &new_uvmap) const
double calc_correction_in_pixels (calib const &from_calibration, calib const &to_calibration) const
double calc_correction_in_pixels (calib const &to_calibration) const
calib const & get_calibration () const
double get_cost () const
decision_params const & get_decision_params () const
rs2_dsm_params const & get_dsm_params () const
std::vector< double > const & get_extracted_features () const
ir_frame_data const & get_ir_data () const
params const & get_params () const
yuy2_frame_data const & get_yuy_data () const
z_frame_data const & get_z_data () const
bool input_validity_checks (input_validity_data *data=nullptr)
bool is_scene_valid (input_validity_data *data=nullptr)
bool is_valid_results ()
size_t optimize (std::function< void(data_collect const &data) > iteration_callback=nullptr)
 optimizer (settings const &, bool debug_mode=false)
void set_cycle_data (const std::vector< double3 > &vertices, const rs2_intrinsics_double &k_depth, const p_matrix &p_mat, const algo_calibration_registers &dsm_regs_cand, const rs2_dsm_params_double &dsm_params_cand)
void set_final_data (const std::vector< double3 > &vertices, const p_matrix &p_mat, const p_matrix &p_mat_opt=p_matrix())
void set_ir_data (std::vector< ir_t > &&ir_data, size_t width, size_t height)
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)
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)
void write_data_to (std::string const &directory)

Private Member Functions

void adjust_params_to_apd_gain ()
void adjust_params_to_auto_mode ()
void adjust_params_to_manual_mode ()
optimization_params back_tracking_line_search (optimization_params const &opt_params, const std::vector< double3 > &new_vertices, data_collect *data=nullptr) const
std::vector< double > blur_edges (std::vector< double > const &edges, size_t image_width, size_t image_height)
void clip_ac_scaling (rs2_dsm_params_double const &ac_data_orig, rs2_dsm_params_double &ac_data_new) const
void clip_pixel_movement (size_t iteration_number=0)
void collect_decision_params (z_frame_data &z_data, yuy2_frame_data &yuy_data)
std::vector< double > cost_per_section_diff (calib const &old_calib, calib const &new_calib)
calib decompose_p_mat (p_matrix p)
void gaussian_filter (std::vector< uint8_t > const &lum_frame, std::vector< uint8_t > const &prev_lum_frame, std::vector< double > &yuy_diff, std::vector< double > &gaussian_filtered_image, size_t width, size_t height)
std::vector< uint16_tget_closest_edges (const z_frame_data &z_data, ir_frame_data const &ir_data, size_t width, size_t height)
std::vector< directionget_direction (std::vector< double > gradient_x, std::vector< double > gradient_y)
std::vector< directionget_direction2 (std::vector< double > gradient_x, std::vector< double > gradient_y)
std::vector< uint8_tget_logic_edges (std::vector< double > const &edges)
std::vector< byteget_luminance_from_yuy2 (std::vector< yuy_t > const &yuy2_imagh)
rs2_intrinsics_double get_new_z_intrinsics_from_new_calib (const rs2_intrinsics_double &orig, const calib &new_c, const calib &orig_c)
std::vector< uint8_timages_dilation (std::vector< uint8_t > const &logic_edges, size_t width, size_t height)
bool is_edge_distributed (z_frame_data &z_data, yuy2_frame_data &yuy_data)
bool is_movement_in_images (movement_inputs_for_frame const &prev, movement_inputs_for_frame const &curr, movement_result_data *result_data, double const move_thresh_pix_val, double const move_threshold_pix_num, size_t width, size_t height)
size_t optimize_p (const optimization_params &params_curr, const std::vector< double3 > &new_vertices, optimization_params &params_new, calib &optimaized_calibration, calib &new_rgb_calib_for_k_to_dsm, rs2_intrinsics_double &new_z_k, std::function< void(data_collect const &data)> cb, data_collect &data)
void section_per_pixel (frame_data const &, size_t section_w, size_t section_h, byte *section_map)
std::vector< double3subedges2vertices (z_frame_data &z_data, const rs2_intrinsics_double &intrin, double depth_units)
void sum_per_section (std::vector< double > &sum_weights_per_section, std::vector< byte > const &section_map, std::vector< double > const &weights, size_t num_of_sections)
bool valid_by_svm (svm_model model)

Private Attributes

bool _debug_mode
decision_params _decision_params
rs2_dsm_params_double _dsm_params_cand_from_bin
algo_calibration_registers _dsm_regs_cand_from_bin
std::vector< double > _extracted_features
calib _factory_calibration
calib _final_calibration
rs2_dsm_params _final_dsm_params
ir_frame_data _ir
rs2_intrinsics_double _k_dapth_from_bin
std::shared_ptr< k_to_DSM_k_to_DSM
calib _optimaized_calibration
calib _original_calibration
rs2_dsm_params _original_dsm_params
p_matrix _p_mat_from_bin
p_matrix _p_mat_from_bin_opt
params _params
optimization_params _params_curr
settings const _settings
svm_features _svm_features
svm_model_gaussian _svm_model_gaussian
svm_model_linear _svm_model_linear
std::vector< double3_vertices_from_bin
yuy2_frame_data _yuy
z_frame_data _z
bool get_cycle_data_from_bin = false
bool get_final_data_from_bin = false

Detailed Description

Definition at line 278 of file optimizer.h.

Constructor & Destructor Documentation

optimizer::optimizer ( settings const &  s,
bool  debug_mode = false 

Definition at line 132 of file optimizer.cpp.

Member Function Documentation

void optimizer::adjust_params_to_apd_gain ( )

Definition at line 1850 of file optimizer.cpp.

void optimizer::adjust_params_to_auto_mode ( )

Definition at line 1875 of file optimizer.cpp.

void optimizer::adjust_params_to_manual_mode ( )

Definition at line 1860 of file optimizer.cpp.

optimization_params optimizer::back_tracking_line_search ( optimization_params const &  opt_params,
const std::vector< double3 > &  new_vertices,
data_collect data = nullptr 
) const

Definition at line 1756 of file optimizer.cpp.

std::vector< double > optimizer::blur_edges ( std::vector< double > const &  edges,
size_t  image_width,
size_t  image_height 

Definition at line 1233 of file optimizer.cpp.

double librealsense::algo::depth_to_rgb_calibration::optimizer::calc_correction_in_pixels ( std::vector< double2 > const &  old_uvmap,
std::vector< double2 > const &  new_uvmap 
) const
double optimizer::calc_correction_in_pixels ( calib const &  from_calibration,
calib const &  to_calibration 
) const

Definition at line 13 of file valid-results.cpp.

double librealsense::algo::depth_to_rgb_calibration::optimizer::calc_correction_in_pixels ( calib const &  to_calibration) const

Definition at line 344 of file optimizer.h.

void optimizer::clip_ac_scaling ( rs2_dsm_params_double const &  ac_data_orig,
rs2_dsm_params_double ac_data_new 
) const

Definition at line 140 of file valid-results.cpp.

void optimizer::clip_pixel_movement ( size_t  iteration_number = 0)

Definition at line 56 of file valid-results.cpp.

void optimizer::collect_decision_params ( z_frame_data z_data,
yuy2_frame_data yuy_data 

Definition at line 229 of file valid-results.cpp.

std::vector< double > optimizer::cost_per_section_diff ( calib const &  old_calib,
calib const &  new_calib 

Definition at line 88 of file valid-results.cpp.

calib optimizer::decompose_p_mat ( p_matrix  p)

Definition at line 1093 of file optimizer.cpp.

void optimizer::gaussian_filter ( std::vector< uint8_t > const &  lum_frame,
std::vector< uint8_t > const &  prev_lum_frame,
std::vector< double > &  yuy_diff,
std::vector< double > &  gaussian_filtered_image,
size_t  width,
size_t  height 

Definition at line 565 of file valid-scene.cpp.

calib const & optimizer::get_calibration ( ) const

Definition at line 1629 of file optimizer.cpp.

std::vector<uint16_t> librealsense::algo::depth_to_rgb_calibration::optimizer::get_closest_edges ( const z_frame_data z_data,
ir_frame_data const &  ir_data,
size_t  width,
size_t  height 
double optimizer::get_cost ( ) const

Definition at line 1639 of file optimizer.cpp.

decision_params const& librealsense::algo::depth_to_rgb_calibration::optimizer::get_decision_params ( ) const

Definition at line 350 of file optimizer.h.

std::vector< direction > optimizer::get_direction ( std::vector< double >  gradient_x,
std::vector< double >  gradient_y 

Definition at line 1110 of file optimizer.cpp.

std::vector< direction > optimizer::get_direction2 ( std::vector< double >  gradient_x,
std::vector< double >  gradient_y 

Definition at line 1131 of file optimizer.cpp.

rs2_dsm_params const & optimizer::get_dsm_params ( ) const

Definition at line 1634 of file optimizer.cpp.

std::vector< double > const& librealsense::algo::depth_to_rgb_calibration::optimizer::get_extracted_features ( ) const

Definition at line 351 of file optimizer.h.

ir_frame_data const& librealsense::algo::depth_to_rgb_calibration::optimizer::get_ir_data ( ) const

Definition at line 349 of file optimizer.h.

std::vector< uint8_t > optimizer::get_logic_edges ( std::vector< double > const &  edges)

Definition at line 1287 of file optimizer.cpp.

std::vector< byte > optimizer::get_luminance_from_yuy2 ( std::vector< yuy_t > const &  yuy2_imagh)

Definition at line 1277 of file optimizer.cpp.

rs2_intrinsics_double optimizer::get_new_z_intrinsics_from_new_calib ( const rs2_intrinsics_double orig,
const calib new_c,
const calib orig_c 

Definition at line 1100 of file optimizer.cpp.

params const& librealsense::algo::depth_to_rgb_calibration::optimizer::get_params ( ) const

Definition at line 352 of file optimizer.h.

yuy2_frame_data const& librealsense::algo::depth_to_rgb_calibration::optimizer::get_yuy_data ( ) const

Definition at line 348 of file optimizer.h.

z_frame_data const& librealsense::algo::depth_to_rgb_calibration::optimizer::get_z_data ( ) const

Definition at line 347 of file optimizer.h.

std::vector< uint8_t > optimizer::images_dilation ( std::vector< uint8_t > const &  logic_edges,
size_t  width,
size_t  height 

Definition at line 532 of file valid-scene.cpp.

bool optimizer::input_validity_checks ( input_validity_data data = nullptr)

Definition at line 923 of file valid-scene.cpp.

bool optimizer::is_edge_distributed ( z_frame_data z_data,
yuy2_frame_data yuy_data 

Definition at line 339 of file valid-scene.cpp.

bool optimizer::is_movement_in_images ( movement_inputs_for_frame const &  prev,
movement_inputs_for_frame const &  curr,
movement_result_data result_data,
double const  move_thresh_pix_val,
double const  move_threshold_pix_num,
size_t  width,
size_t  height 

Definition at line 650 of file valid-scene.cpp.

bool optimizer::is_scene_valid ( input_validity_data data = nullptr)

Definition at line 732 of file valid-scene.cpp.

bool optimizer::is_valid_results ( )

Definition at line 340 of file valid-results.cpp.

size_t optimizer::optimize ( std::function< void(data_collect const &data) >  iteration_callback = nullptr)

Definition at line 1977 of file optimizer.cpp.

size_t optimizer::optimize_p ( const optimization_params params_curr,
const std::vector< double3 > &  new_vertices,
optimization_params params_new,
calib optimaized_calibration,
calib new_rgb_calib_for_k_to_dsm,
rs2_intrinsics_double new_z_k,
std::function< void(data_collect const &data)>  cb,
data_collect data 

Definition at line 1891 of file optimizer.cpp.

void optimizer::section_per_pixel ( frame_data const &  f,
size_t  section_w,
size_t  section_h,
byte section_map 

Definition at line 484 of file valid-scene.cpp.

void optimizer::set_cycle_data ( const std::vector< double3 > &  vertices,
const rs2_intrinsics_double k_depth,
const p_matrix p_mat,
const algo_calibration_registers dsm_regs_cand,
const rs2_dsm_params_double dsm_params_cand 

Definition at line 1837 of file optimizer.cpp.

void optimizer::set_final_data ( const std::vector< double3 > &  vertices,
const p_matrix p_mat,
const p_matrix p_mat_opt = p_matrix() 

Definition at line 1828 of file optimizer.cpp.

void optimizer::set_ir_data ( std::vector< ir_t > &&  ir_data,
size_t  width,
size_t  height 

Definition at line 1081 of file optimizer.cpp.

void optimizer::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 

Definition at line 991 of file optimizer.cpp.

void optimizer::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 

Definition at line 455 of file optimizer.cpp.

std::vector< double3 > optimizer::subedges2vertices ( z_frame_data z_data,
const rs2_intrinsics_double intrin,
double  depth_units 

Definition at line 1379 of file optimizer.cpp.

void optimizer::sum_per_section ( std::vector< double > &  sum_weights_per_section,
std::vector< byte > const &  section_map,
std::vector< double > const &  weights,
size_t  num_of_sections 

Definition at line 1302 of file optimizer.cpp.

bool optimizer::valid_by_svm ( svm_model  model)

Definition at line 302 of file valid-results.cpp.

void optimizer::write_data_to ( std::string const &  directory)

Definition at line 1715 of file optimizer.cpp.

Member Data Documentation

bool librealsense::algo::depth_to_rgb_calibration::optimizer::_debug_mode

Definition at line 451 of file optimizer.h.

decision_params librealsense::algo::depth_to_rgb_calibration::optimizer::_decision_params

Definition at line 424 of file optimizer.h.

rs2_dsm_params_double librealsense::algo::depth_to_rgb_calibration::optimizer::_dsm_params_cand_from_bin

Definition at line 448 of file optimizer.h.

algo_calibration_registers librealsense::algo::depth_to_rgb_calibration::optimizer::_dsm_regs_cand_from_bin

Definition at line 447 of file optimizer.h.

std::vector< double > librealsense::algo::depth_to_rgb_calibration::optimizer::_extracted_features

Definition at line 426 of file optimizer.h.

calib librealsense::algo::depth_to_rgb_calibration::optimizer::_factory_calibration

Definition at line 437 of file optimizer.h.

calib librealsense::algo::depth_to_rgb_calibration::optimizer::_final_calibration

Definition at line 434 of file optimizer.h.

rs2_dsm_params librealsense::algo::depth_to_rgb_calibration::optimizer::_final_dsm_params

Definition at line 436 of file optimizer.h.

ir_frame_data librealsense::algo::depth_to_rgb_calibration::optimizer::_ir

Definition at line 430 of file optimizer.h.

rs2_intrinsics_double librealsense::algo::depth_to_rgb_calibration::optimizer::_k_dapth_from_bin

Definition at line 443 of file optimizer.h.

std::shared_ptr<k_to_DSM> librealsense::algo::depth_to_rgb_calibration::optimizer::_k_to_DSM

Definition at line 450 of file optimizer.h.

calib librealsense::algo::depth_to_rgb_calibration::optimizer::_optimaized_calibration

Definition at line 435 of file optimizer.h.

calib librealsense::algo::depth_to_rgb_calibration::optimizer::_original_calibration

Definition at line 432 of file optimizer.h.

rs2_dsm_params librealsense::algo::depth_to_rgb_calibration::optimizer::_original_dsm_params

Definition at line 433 of file optimizer.h.

p_matrix librealsense::algo::depth_to_rgb_calibration::optimizer::_p_mat_from_bin

Definition at line 444 of file optimizer.h.

p_matrix librealsense::algo::depth_to_rgb_calibration::optimizer::_p_mat_from_bin_opt

Definition at line 445 of file optimizer.h.

params librealsense::algo::depth_to_rgb_calibration::optimizer::_params

Definition at line 423 of file optimizer.h.

optimization_params librealsense::algo::depth_to_rgb_calibration::optimizer::_params_curr

Definition at line 438 of file optimizer.h.

settings const librealsense::algo::depth_to_rgb_calibration::optimizer::_settings

Definition at line 422 of file optimizer.h.

svm_features librealsense::algo::depth_to_rgb_calibration::optimizer::_svm_features

Definition at line 425 of file optimizer.h.

svm_model_gaussian librealsense::algo::depth_to_rgb_calibration::optimizer::_svm_model_gaussian

Definition at line 428 of file optimizer.h.

svm_model_linear librealsense::algo::depth_to_rgb_calibration::optimizer::_svm_model_linear

Definition at line 427 of file optimizer.h.

std::vector<double3> librealsense::algo::depth_to_rgb_calibration::optimizer::_vertices_from_bin

Definition at line 446 of file optimizer.h.

yuy2_frame_data librealsense::algo::depth_to_rgb_calibration::optimizer::_yuy

Definition at line 429 of file optimizer.h.

z_frame_data librealsense::algo::depth_to_rgb_calibration::optimizer::_z

Definition at line 431 of file optimizer.h.

bool librealsense::algo::depth_to_rgb_calibration::optimizer::get_cycle_data_from_bin = false

Definition at line 441 of file optimizer.h.

bool librealsense::algo::depth_to_rgb_calibration::optimizer::get_final_data_from_bin = false

Definition at line 442 of file optimizer.h.

The documentation for this class was generated from the following files:

Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:38