Skip to content
Snippets Groups Projects
Commit 9d38726b authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Use max_new_features, and call blockCell()

parent a546accd
No related branches found
No related tags found
2 merge requests!36After cmake and const refactor,!28Resolve "Building a new visual odometry system"
......@@ -233,11 +233,12 @@ void ProcessorVisualOdometry::preProcess()
// Instead, use the grid to detect new keypoints in empty cells
// We try a bunch of time to add keypoints to randomly selected empty regions of interest
for (int i=0; i < 50; i++){
for (int i=0; i < params_visual_odometry_->max_new_features; i++){
cv::Rect rect_roi;
bool is_empty = cell_grid_.pickRoi(rect_roi);
WOLF_TRACE("rect_roi: ", rect_roi)
if (!is_empty){
cell_grid_.blockCell(rect_roi);
break;
}
cv::Mat img_roi(img_incoming, rect_roi); // no data copy -> no overhead
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment