(default) Stereo FW: + line tracker if activated
| 250 | // (default) Stereo |
| 251 | // FW: + line tracker if activated |
| 252 | Mat44_t tracking_module::track_stereo_image(const cv::Mat &left_img_rect, const cv::Mat &right_img_rect, const double timestamp, const cv::Mat &mask) |
| 253 | { |
| 254 | const auto start = std::chrono::system_clock::now(); |
| 255 | |
| 256 | // color conversion |
| 257 | img_gray_ = left_img_rect; |
| 258 | cv::Mat right_img_gray = right_img_rect; |
| 259 | util::convert_to_grayscale(img_gray_, camera_->color_order_); |
| 260 | util::convert_to_grayscale(right_img_gray, camera_->color_order_); |
| 261 | |
| 262 | if (!map_db_->_b_use_line_tracking) |
| 263 | { |
| 264 | // FW: (default) create current frame object |
| 265 | curr_frm_ = data::frame(img_gray_, right_img_gray, timestamp, extractor_left_, extractor_right_, bow_vocab_, camera_, cfg_->true_depth_thr_, mask); |
| 266 | } |
| 267 | else |
| 268 | { |
| 269 | // FW: track stereo frames with LSD/LBD, pass the line_extractor to frame.h |
| 270 | curr_frm_ = data::frame(img_gray_, right_img_gray, timestamp, extractor_left_, extractor_right_, bow_vocab_, |
| 271 | _line_extractor, _line_extractor_right, |
| 272 | camera_, cfg_->true_depth_thr_, mask); |
| 273 | } |
| 274 | |
| 275 | left_img_rect.copyTo(curr_frm_._img_rgb); |
| 276 | track(); |
| 277 | |
| 278 | const auto end = std::chrono::system_clock::now(); |
| 279 | elapsed_ms_ = std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count(); |
| 280 | |
| 281 | return curr_frm_.cam_pose_cw_; |
| 282 | } |
| 283 | |
| 284 | // Stereo + planar segmentation |
| 285 | // FW: + line tracker if activated |
no test coverage detected