Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
laser_scan_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
algorithms
laser_scan_utils
Commits
cdbaaee8
Commit
cdbaaee8
authored
4 years ago
by
Sergi Pujol
Browse files
Options
Downloads
Patches
Plain Diff
CornerFalko2d class refactorized with inheritances
parent
9af5aa0e
No related branches found
No related tags found
1 merge request
!4
Resolve "Implementation of Falko lib"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/corner_falko_2d.cpp
+23
-22
23 additions, 22 deletions
src/corner_falko_2d.cpp
src/corner_falko_2d.h
+30
-11
30 additions, 11 deletions
src/corner_falko_2d.h
with
53 additions
and
33 deletions
src/corner_falko_2d.cpp
+
23
−
22
View file @
cdbaaee8
...
@@ -9,30 +9,31 @@
...
@@ -9,30 +9,31 @@
namespace
wolf
{
namespace
wolf
{
void
CornerFalko2d
::
extract
(
falkolib
::
LaserScan
scan
){
CornerFalko2d
::
CornerFalko2d
(
int
_circularSectorNumber
,
int
_radialRingNumber
,
bool
_useKeypointRadius
,
double
_radius
)
:
BSCExtractor
(
_circularSectorNumber
,
_radialRingNumber
,
_useKeypointRadius
,
_radius
)
{
// FALKO EXTRACTOR PARAMS
setMinExtractionRange
(
0.25
);
setMaxExtractionRange
(
25
);
fe
.
setMinExtractionRange
(
0.25
);
enableSubbeam
(
true
);
fe
.
setMaxExtractionRange
(
25
);
setNMSRadius
(
0.1
);
fe
.
enableSubbeam
(
true
);
setNeighB
(
0.01
);
fe
.
setNMSRadius
(
0.1
);
setBRatio
(
4
);
fe
.
setNeighB
(
0.01
);
setGridSectors
(
16
);
fe
.
setBRatio
(
4
);
fe
.
setGridSectors
(
16
);
std
::
vector
<
falkolib
::
FALKO
>
keypoints
;
/*
fe.extract(scan, keypoints);
falkolib::BSCExtractor<falkolib::FALKO> bsc(16,8);
std::vector<falkolib::BSC> bscDesc;
bsc.compute(scan, keypoints, bscDesc);
*/
}
}
void
CornerFalko2d
::
train
(
falkolib
::
LaserScan
scan
){
// Extract keypoints
lastKeypointSet
.
clear
();
extract
(
scan
,
lastKeypointSet
);
//Compute descriptors
lastDescriptorSet
.
clear
();
bsc
.
compute
(
scan
,
lastKeypointSet
,
lastDescriptorSet
);
}
}
}
// wolf namespace
This diff is collapsed.
Click to expand it.
src/corner_falko_2d.h
+
30
−
11
View file @
cdbaaee8
...
@@ -33,15 +33,25 @@
...
@@ -33,15 +33,25 @@
namespace
wolf
namespace
wolf
{
{
class
CornerFalko2d
/** \brief A 2D corner extractor and loop closure computing class
*
*
*
*
*/
class
CornerFalko2d
:
public
falkolib
::
FALKOExtractor
,
falkolib
::
BSCExtractor
<
falkolib
::
FALKO
>
{
{
public:
public:
/** \brief Constructor
/**
*
* @brief Constructor
* Constructor
* @param _circularSectorNumber number of grid circular sector (BSCExtractor)
*
* @param _radialRingNumber number of grid radial number (BSCExtractor)
**/
* @param _useKeypointRadius if true, the selected neighborhood points search radius is keypoint one (BSCExtractor)
CornerFalko2d
();
* @param _radius neighborhood points search radius (BSCExtractor)
*/
CornerFalko2d
(
int
_circularSectorNumber
=
16
,
int
_radialRingNumber
=
8
,
bool
_useKeypointRadius
=
true
,
double
_radius
=
0.1
)
;
/** \brief Destructor
/** \brief Destructor
*
*
...
@@ -52,19 +62,28 @@ public:
...
@@ -52,19 +62,28 @@ public:
/** \brief Gets a set of landmarks/scenes to use as trained set.
/** \brief Gets a set of landmarks/scenes to use as trained set.
**/
**/
void
train
();
void
train
(
falkolib
::
LaserScan
scan
);
/** \brief Extract landmark/scene (list of corners) from a given 2D scan
/** \brief Extract landmark/scene (list of corners) from a given 2D scan
**/
**/
void
extract
(
falkolib
::
LaserScan
scan
);
//
void extract(falkolib::LaserScan scan);
/** \brief compare new scans against the training set in order to find loop closures
/** \brief compare new scans against the training set in order to find loop closures
**/
**/
void
findLoopClosure
();
void
findLoopClosure
();
std
::
vector
<
std
::
vector
<
falkolib
::
FALKO
>>
CornerSet
;
std
::
vector
<
std
::
vector
<
falkolib
::
FALKO
>>
keypointSets
;
std
::
vector
<
falkolib
::
FALKO
>
lastKeypointSet
;
std
::
vector
<
std
::
vector
<
falkolib
::
BSC
>>
descriptorSets
;
std
::
vector
<
std
::
vector
<
falkolib
::
BSC
>>
descriptorSets
;
falkolib
::
FALKOExtractor
fe
;
std
::
vector
<
falkolib
::
BSC
>
lastDescriptorSet
;
//int _circularSectorNumber;
//int _radialRingNumber;
// Keypoints extractor
//falkolib::FALKOExtractor fe;
// BSC descriptor extractor
//falkolib::BSCExtractor<falkolib::FALKO> bsc(_circularSectorNumber,_radialRingNumber);
};
};
}
/* namespace wolf */
}
/* namespace wolf */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment