Skip to content
Snippets Groups Projects
Commit 084e3ae5 authored by Sergi Pujol's avatar Sergi Pujol
Browse files

added id to MatchLoopClosure

parent bf3c8291
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
......@@ -131,11 +131,11 @@ public:
/** \brief Create and update a matchLoopClosure struct with the info that is
*produced when matching two given scenes
**/
matchLoopClosurePtr matchScene(sceneBasePtr _scene1,
sceneBasePtr _scene2) override{
matchLoopClosurePtr matchScene(sceneBasePtr _scene_1,
sceneBasePtr _scene_2) override{
std::vector<std::pair<int, int>> asso_nn;
auto scene_1_falko =std::static_pointer_cast<SceneFalko<D>>(_scene1);
auto scene_2_falko =std::static_pointer_cast<SceneFalko<D>>(_scene2);
auto scene_1_falko =std::static_pointer_cast<SceneFalko<D>>(_scene_1);
auto scene_2_falko =std::static_pointer_cast<SceneFalko<D>>(_scene_2);
int matching_number =
matcher_.match(scene_1_falko->keypoints_list_,
scene_2_falko->keypoints_list_, asso_nn);
......@@ -146,8 +146,8 @@ public:
} else {
new_match->match = false;
}
new_match->scene_1 =_scene1;
new_match->scene_2 =_scene2;
new_match->scene_1 =_scene_1;
new_match->scene_2 =_scene_2;
new_match->score = (double) matching_number / (double) std::min(scene_1_falko->keypoints_list_.size(),
scene_2_falko->keypoints_list_.size());
......
......@@ -27,6 +27,7 @@ struct MatchLoopClosure {
bool match;
int keypoints_number_match;
double score;
double id;
};
typedef std::shared_ptr<MatchLoopClosure> matchLoopClosurePtr;
......
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