| 386 | } |
| 387 | |
| 388 | void PoseGraph::addKeyFrameIntoVoc(KeyFrame* keyframe) |
| 389 | { |
| 390 | // put image into image_pool; for visualization |
| 391 | cv::Mat compressed_image; |
| 392 | if (DEBUG_IMAGE) |
| 393 | { |
| 394 | int feature_num = keyframe->keypoints.size(); |
| 395 | cv::resize(keyframe->image, compressed_image, cv::Size(376, 240)); |
| 396 | putText(compressed_image, "feature_num:" + to_string(feature_num), cv::Point2f(10, 10), cv::FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(255)); |
| 397 | image_pool[keyframe->index] = compressed_image; |
| 398 | } |
| 399 | |
| 400 | db.add(keyframe->brief_descriptors); |
| 401 | } |
| 402 | |
| 403 | void PoseGraph::optimize4DoF() |
| 404 | { |