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

function matchLoopClosurePtr implemented

parent 8c539f6c
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
...@@ -56,8 +56,21 @@ namespace laserscanutils{ ...@@ -56,8 +56,21 @@ namespace laserscanutils{
} }
template <typename D,typename Extr, typename M> template <typename D,typename Extr, typename M>
typename loopClosureFalko<D,Extr, M>::matchLoopClosurePtr matchScene(std::shared_ptr<sceneFalko<D>> scene1,LaserScanParams &scanParams){ typename loopClosureFalko<D,Extr, M>::matchLoopClosurePtr matchScene(std::shared_ptr<sceneFalko<D>> scene1,std::shared_ptr<sceneFalko<D>> scene2){
std::vector<std::pair<int, int> > assoNN;
int matching_number = match(scene1->keypointsList,scene2->keypointsList, assoNN);
auto new_match=std::make_shared<matchLoopClosure<D>>();
new_match-> keypointsNumberMatch = matching_number;
int keypoints_number_th=5;
if (matching_number>keypoints_number_th){
new_match-> match = true;
} else {
new_match-> match = false;
}
new_match -> sceneTuple[0] = scene1;
new_match -> sceneTuple[1] = scene2;
return new_match;
} }
//void findLoopClosure(std::list<sceneFalko>& scenes, const cornerScene newScene){} //void findLoopClosure(std::list<sceneFalko>& scenes, const cornerScene newScene){}
......
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
/** \brief Convert scans from laserscanutils::LaserScan to falkolib::LaserScan object /** \brief Convert scans from laserscanutils::LaserScan to falkolib::LaserScan object
**/ **/
matchLoopClosurePtr matchScene(sceneFalkoBSCPtr scene1 ,LaserScanParams &scanParams); matchLoopClosurePtr matchScene(sceneFalkoBSCPtr scene1 ,std::shared_ptr<sceneFalko<D>> scene2);
}; };
......
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