| 95 | |
| 96 | protected: |
| 97 | void initializeData() { |
| 98 | // Initialize CameraParams for both frames |
| 99 | CameraParams cam_params_left, cam_params_right; |
| 100 | cam_params_left.parseYAML(lcd_test_data_path_+"/sensorLeft.yaml"); |
| 101 | cam_params_right.parseYAML(lcd_test_data_path_+"/sensorRight.yaml"); |
| 102 | |
| 103 | std::string img_name_ref1_left = lcd_test_data_path_ + "/left_img_0.png"; |
| 104 | std::string img_name_ref1_right = lcd_test_data_path_ + "/right_img_0.png"; |
| 105 | |
| 106 | std::string img_name_cur1_left = lcd_test_data_path_ + "/left_img_1.png"; |
| 107 | std::string img_name_cur1_right = lcd_test_data_path_ + "/right_img_1.png"; |
| 108 | |
| 109 | std::string img_name_ref2_left = lcd_test_data_path_ + "/left_img_2.png"; |
| 110 | std::string img_name_ref2_right = lcd_test_data_path_ + "/right_img_2.png"; |
| 111 | |
| 112 | std::string img_name_cur2_left = lcd_test_data_path_ + "/left_img_3.png"; |
| 113 | std::string img_name_cur2_right = lcd_test_data_path_ + "/right_img_3.png"; |
| 114 | |
| 115 | // Initialize StereoFrame objects for reference and current frames |
| 116 | VioFrontEndParams tp; |
| 117 | Tracker tracker(tp); |
| 118 | |
| 119 | ref1_stereo_frame_ = VIO::make_unique<StereoFrame>( |
| 120 | id_ref1_, |
| 121 | timestamp_ref1_, |
| 122 | UtilsOpenCV::ReadAndConvertToGrayScale( |
| 123 | img_name_ref1_left, tp.stereo_matching_params_.equalize_image_), |
| 124 | cam_params_left, |
| 125 | UtilsOpenCV::ReadAndConvertToGrayScale( |
| 126 | img_name_ref1_right, tp.stereo_matching_params_.equalize_image_), |
| 127 | cam_params_right, |
| 128 | tp.stereo_matching_params_); |
| 129 | |
| 130 | tracker.featureDetection(ref1_stereo_frame_->getLeftFrameMutable()); |
| 131 | CHECK(ref1_stereo_frame_); |
| 132 | ref1_stereo_frame_->setIsKeyframe(true); |
| 133 | ref1_stereo_frame_->sparseStereoMatching(); |
| 134 | |
| 135 | cur1_stereo_frame_ = VIO::make_unique<StereoFrame>( |
| 136 | id_cur1_, |
| 137 | timestamp_cur1_, |
| 138 | UtilsOpenCV::ReadAndConvertToGrayScale( |
| 139 | img_name_cur1_left, tp.stereo_matching_params_.equalize_image_), |
| 140 | cam_params_left, |
| 141 | UtilsOpenCV::ReadAndConvertToGrayScale( |
| 142 | img_name_cur1_right, tp.stereo_matching_params_.equalize_image_), |
| 143 | cam_params_right, |
| 144 | tp.stereo_matching_params_); |
| 145 | |
| 146 | tracker.featureDetection(cur1_stereo_frame_->getLeftFrameMutable()); |
| 147 | CHECK(cur1_stereo_frame_); |
| 148 | cur1_stereo_frame_->setIsKeyframe(true); |
| 149 | cur1_stereo_frame_->sparseStereoMatching(); |
| 150 | |
| 151 | ref2_stereo_frame_ = VIO::make_unique<StereoFrame>( |
| 152 | id_ref2_, |
| 153 | timestamp_ref2_, |
| 154 | UtilsOpenCV::ReadAndConvertToGrayScale( |
nothing calls this directly
no test coverage detected