Helper function
| 81 | |
| 82 | // Helper function |
| 83 | void initializeDataStereo() { |
| 84 | cam_params_left.parseYAML(stereo_FLAGS_test_data_path + "/sensorLeft.yaml"); |
| 85 | cam_params_right.parseYAML(stereo_FLAGS_test_data_path + |
| 86 | "/sensorRight.yaml"); |
| 87 | |
| 88 | // construct stereo camera |
| 89 | VioFrontEndParams tp; |
| 90 | sfnew = std::make_shared<StereoFrame>( |
| 91 | id, |
| 92 | timestamp, |
| 93 | UtilsOpenCV::ReadAndConvertToGrayScale( |
| 94 | stereo_FLAGS_test_data_path + left_image_name, |
| 95 | tp.stereo_matching_params_.equalize_image_), |
| 96 | cam_params_left, |
| 97 | UtilsOpenCV::ReadAndConvertToGrayScale( |
| 98 | stereo_FLAGS_test_data_path + right_image_name, |
| 99 | tp.stereo_matching_params_.equalize_image_), |
| 100 | cam_params_right, |
| 101 | tp.stereo_matching_params_); |
| 102 | |
| 103 | sfnew->getLeftFrameMutable()->extractCorners(); |
| 104 | sfnew->getLeftFrameMutable()->versors_.reserve( |
| 105 | sfnew->getLeftFrame().keypoints_.size()); |
| 106 | int landmark_count_ = 0; |
| 107 | for (size_t i = 0; i < sfnew->getLeftFrame().keypoints_.size(); i++) { |
| 108 | sfnew->getLeftFrameMutable()->landmarks_.push_back(landmark_count_); |
| 109 | sfnew->getLeftFrameMutable()->landmarksAge_.push_back( |
| 110 | 5 * landmark_count_); // seen in a single (key)frame |
| 111 | sfnew->getLeftFrameMutable()->scores_.push_back(10 * landmark_count_); |
| 112 | sfnew->getLeftFrameMutable()->versors_.push_back( |
| 113 | Frame::calibratePixel(sfnew->getLeftFrame().keypoints_.at(i), |
| 114 | sfnew->getLeftFrame().cam_param_)); |
| 115 | ++landmark_count_; |
| 116 | } |
| 117 | |
| 118 | // do sparse stereo |
| 119 | sfnew->sparseStereoMatching(); |
| 120 | } |
| 121 | |
| 122 | CameraParams cam_params_left; |
| 123 | CameraParams cam_params_right; |
nothing calls this directly
no test coverage detected