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

matching number threshold added

parent e6ef7245
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
...@@ -70,7 +70,7 @@ void CornerFalko2d::findLoopClosure(falkolib::LaserScan scan){ ...@@ -70,7 +70,7 @@ void CornerFalko2d::findLoopClosure(falkolib::LaserScan scan){
int NewMatchingNumber = match(keypointSets[i], keypointSet2, assoNN); int NewMatchingNumber = match(keypointSets[i], keypointSet2, assoNN);
if (NewMatchingNumber > matchingNumber ) { if (NewMatchingNumber > matchingNumber && NewMatchingNumber>keypointsNumberTh) {
matchingNumber=NewMatchingNumber; matchingNumber=NewMatchingNumber;
matchingPosition=i; matchingPosition=i;
} }
......
...@@ -72,11 +72,17 @@ public: ...@@ -72,11 +72,17 @@ public:
**/ **/
void findLoopClosure(falkolib::LaserScan scan); void findLoopClosure(falkolib::LaserScan scan);
/** @brief set euclidean distance threshold for keypoints distance measurements*/
void setKeypointsNumberTh(int _th) {
keypointsNumberTh = _th;
}
std::vector<std::vector<falkolib::FALKO>> keypointSets; std::vector<std::vector<falkolib::FALKO>> keypointSets;
std::vector<falkolib::FALKO> lastKeypointSet; std::vector<falkolib::FALKO> lastKeypointSet;
std::vector<std::vector<falkolib::BSC>> descriptorSets; std::vector<std::vector<falkolib::BSC>> descriptorSets;
std::vector<falkolib::BSC>lastDescriptorSet; std::vector<falkolib::BSC>lastDescriptorSet;
int matchingNumber; int matchingNumber;
int scanNumber=0; int scanNumber=0;
...@@ -84,6 +90,8 @@ public: ...@@ -84,6 +90,8 @@ public:
int scansExtracted=0; int scansExtracted=0;
int matchingPosition=-1; int matchingPosition=-1;
int keypointsNumberTh=2;
}; };
} /* namespace laserscanutils */ } /* namespace laserscanutils */
......
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