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

Improve debug info

parent a1d69962
No related branches found
No related tags found
2 merge requests!36After cmake and const refactor,!28Resolve "Building a new visual odometry system"
...@@ -114,6 +114,7 @@ void ProcessorVisualOdometry::preProcess() ...@@ -114,6 +114,7 @@ void ProcessorVisualOdometry::preProcess()
} }
} }
} }
WOLF_INFO( "Initially detected " , capture_image_incoming_->getKeyPoints().size(), " keypoints in incoming" );
// Initialize the tracks data structure with a "dummy track" where the keypoint is pointing to itself // Initialize the tracks data structure with a "dummy track" where the keypoint is pointing to itself
TracksMap tracks_init; TracksMap tracks_init;
...@@ -123,6 +124,14 @@ void ProcessorVisualOdometry::preProcess() ...@@ -123,6 +124,14 @@ void ProcessorVisualOdometry::preProcess()
capture_image_incoming_->setTracksOrigin(tracks_init); capture_image_incoming_->setTracksOrigin(tracks_init);
capture_image_incoming_->setTracksPrev(tracks_init); capture_image_incoming_->setTracksPrev(tracks_init);
// print a bar with the number of active tracks in incoming
std::string s;
for (int i = 0; i<capture_image_incoming_->getKeyPoints().size(); i++)
{
s += "#";
}
WOLF_INFO("TRACKS: ", s);
auto dt_preprocess = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - t1).count(); auto dt_preprocess = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() - t1).count();
WOLF_INFO( "dt_preprocess (ms): " , dt_preprocess ); WOLF_INFO( "dt_preprocess (ms): " , dt_preprocess );
...@@ -220,12 +229,8 @@ void ProcessorVisualOdometry::preProcess() ...@@ -220,12 +229,8 @@ void ProcessorVisualOdometry::preProcess()
// Detect new KeyPoints // Detect new KeyPoints
std::vector<cv::KeyPoint> kps_last_new; std::vector<cv::KeyPoint> kps_last_new;
// Detect in the whole image and retain N best: BAD because cannot control the repartition of KeyPoints // Use the grid to detect new keypoints in empty cells
// detector_->detect(img_last, kps_last_new); // We try a bunch of times to add keypoints to randomly selected empty regions of interest
// retainBest(kps_last_new, params_visual_odometry_->max_new_features);
// 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 < params_visual_odometry_->max_new_features; i++){ for (int i=0; i < params_visual_odometry_->max_new_features; i++){
cv::Rect rect_roi; cv::Rect rect_roi;
......
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