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

findloopClosure function segmentation fault error corrected

parent 65e79c90
1 merge request!4Resolve "Implementation of Falko lib"
......@@ -42,6 +42,8 @@ void CornerFalko2d::storeCorners (falkolib::LaserScan scan, int scanInterval){
keypointSets.push_back(lastKeypointSet);
descriptorSets.push_back(lastDescriptorSet);
std::cout << "sizeof : " << lastKeypointSet.size() << std::endl;
}
}
......@@ -56,13 +58,15 @@ void CornerFalko2d::findLoopClosure(falkolib::LaserScan scan){
compute(scan, keypointSet2, descriptorSet2);
//Matching
int rows = sizeof(keypointSets)/sizeof(keypointSets[0]);
int cols = sizeof(keypointSets)/(sizeof(int)*rows);
for (int i=0; i<keypointSets.size();i++){
for (int i=0; i<rows;i++){
setDistanceThreshold(0.1);
std::vector<std::pair<int, int> > assoNN;
int matchingNumber = match(keypointSets[i], keypointSet2, assoNN);
}
matchingNumber = match(keypointSets[i], keypointSet2, assoNN);
}
}
......
......@@ -77,6 +77,8 @@ public:
std::vector<std::vector<falkolib::BSC>> descriptorSets;
std::vector<falkolib::BSC>lastDescriptorSet;
int matchingNumber;
int scanNumber=0;
};
......
......@@ -35,4 +35,6 @@ int main(int argc, char** argv)
CornerMatching.findLoopClosure(scan1);
std::cout << "matching number : " << CornerMatching.matchingNumber << std::endl;
}
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