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

code guidelines

parent cdec0e4b
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
...@@ -47,22 +47,22 @@ typedef falkolib::CGHExtractor<falkolib::FALKO> cghExtractor; ...@@ -47,22 +47,22 @@ typedef falkolib::CGHExtractor<falkolib::FALKO> cghExtractor;
typedef falkolib::AHTMatcher<falkolib::FALKO> AHTatcher; typedef falkolib::AHTMatcher<falkolib::FALKO> AHTatcher;
struct parameterLoopClosureFalko { struct parameterLoopClosureFalko {
// Keypoints extractor // Keypoints extractor Default
double _min_extraction_range=0.1; double min_extraction_range_=0.1;
double _max_extraction_range=25; double max_extraction_range_=25;
bool _enable_subbeam=true; bool enable_subbeam_=true;
double _nms_radius=0.1; double nms_radius_=0.1;
double _neigh_b=0.01; double neigh_b_=0.01;
double _b_ratio=4; double b_ratio_=4;
int _grid_sectors=16; int grid_sectors_=16;
//Descriptors parameters //Descriptors parameters Default
int _circularSectorNumber = 16; int circularSectorNumber_ = 16;
int _radialRingNumber = 8; int radialRingNumber_ = 8;
//matcher threshold //matcher threshold Default
double matcher_distance_th=0.1; double matcher_distance_th_=0.1;
int keypoints_number_th = 5; int keypoints_number_th_ = 5;
}; };
/** \brief A base class for loop closure using falko library /** \brief A base class for loop closure using falko library
...@@ -82,21 +82,21 @@ public: ...@@ -82,21 +82,21 @@ public:
/** \brief Constructor /** \brief Constructor
**/ **/
loopClosureFalko(parameterLoopClosureFalko param) loopClosureFalko(parameterLoopClosureFalko _param)
: loopClosureBase2d(), falkolib::FALKOExtractor(), : loopClosureBase2d(), falkolib::FALKOExtractor(),
extractor_(param._circularSectorNumber, param._radialRingNumber), matcher_() { extractor_(_param.circularSectorNumber_, _param.radialRingNumber_), matcher_() {
// FALKO Extractor Parameters // FALKO Extractor Parameters
setMinExtractionRange(param._min_extraction_range); setMinExtractionRange(_param.min_extraction_range_);
setMaxExtractionRange(param._max_extraction_range); setMaxExtractionRange(_param.max_extraction_range_);
enableSubbeam(param._enable_subbeam); enableSubbeam(_param.enable_subbeam_);
setNMSRadius(param._nms_radius); setNMSRadius(_param.nms_radius_);
setNeighB(param._neigh_b); setNeighB(_param.neigh_b_);
setBRatio(param._b_ratio); setBRatio(_param.b_ratio_);
setGridSectors(param._grid_sectors); setGridSectors(_param.grid_sectors_);
// Matcher Extractor Parameters // Matcher Extractor Parameters
matcher_.setDistanceThreshold(param.matcher_distance_th); matcher_.setDistanceThreshold(_param.matcher_distance_th_);
keypoints_number_th = param.keypoints_number_th; keypoints_number_th_ = _param.keypoints_number_th_;
}; };
/** \brief Destructor /** \brief Destructor
...@@ -139,7 +139,7 @@ public: ...@@ -139,7 +139,7 @@ public:
matcher_.match(_scene1->keypointsList, _scene2->keypointsList, asso_nn); matcher_.match(_scene1->keypointsList, _scene2->keypointsList, asso_nn);
auto new_match = std::make_shared<matchLoopClosure<D>>(); auto new_match = std::make_shared<matchLoopClosure<D>>();
new_match->keypointsNumberMatch = matching_number; new_match->keypointsNumberMatch = matching_number;
if (matching_number > keypoints_number_th) { if (matching_number > keypoints_number_th_) {
new_match->match = true; new_match->match = true;
} else { } else {
new_match->match = false; new_match->match = false;
...@@ -165,7 +165,7 @@ public: ...@@ -165,7 +165,7 @@ public:
return matchings; return matchings;
} }
int keypoints_number_th; int keypoints_number_th_;
}; };
} /* 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