RTAB-Map 0.23.10
Real-Time Appearance-Based Mapping
Loading...
Searching...
No Matches
RegistrationVis.h
1/*
2Copyright (c) 2010-2016, Mathieu Labbe - IntRoLab - Universite de Sherbrooke
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7 * Redistributions of source code must retain the above copyright
8 notice, this list of conditions and the following disclaimer.
9 * Redistributions in binary form must reproduce the above copyright
10 notice, this list of conditions and the following disclaimer in the
11 documentation and/or other materials provided with the distribution.
12 * Neither the name of the Universite de Sherbrooke nor the
13 names of its contributors may be used to endorse or promote products
14 derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*/
27
28#ifndef REGISTRATIONVIS_H_
29#define REGISTRATIONVIS_H_
30
31#include "rtabmap/core/rtabmap_core_export.h" // DLL export/import defines
32
33#include <rtabmap/core/Registration.h>
34#include <rtabmap/core/Signature.h>
35
36namespace rtabmap {
37
38class Feature2D;
39
40#ifdef RTABMAP_PYTHON
41class PyMatcher;
42#endif
43
60class RTABMAP_CORE_EXPORT RegistrationVis : public Registration
61{
62public:
64 RegistrationVis(const ParametersMap & parameters = ParametersMap(), Registration * child = 0);
65 virtual ~RegistrationVis();
66
68 virtual void parseParameters(const ParametersMap & parameters);
69
71 float getInlierDistance() const {return _inlierDistance;}
73 int getIterations() const {return _iterations;}
75 int getMinInliers() const {return _minInliers;}
77 int getNNType() const {return _nnType;}
79 float getNNDR() const {return _nndr;}
81 int getEstimationType() const {return _estimationType;}
82
84 const Feature2D * getDetector() const {return _detectorFrom;}
85
86protected:
88 Signature & from,
89 Signature & to,
90 Transform guess,
91 RegistrationInfo & info) const;
92
93 virtual bool isImageRequiredImpl() const {return true;}
94 virtual bool canUseGuessImpl() const {return _correspondencesApproach != 0 || _guessWinSize>0;}
95 virtual int getMinVisualCorrespondencesImpl() const {return _minInliers;}
96
97private:
98 int _minInliers;
99 float _inlierDistance;
100 int _iterations;
101 int _refineIterations;
102 float _epipolarGeometryVar;
103 int _estimationType;
104 float _PnPReprojError;
105 int _PnPFlags;
106 int _PnPRefineIterations;
107 int _PnPVarMedianRatio;
108 float _PnPMaxVar;
109 bool _PnPSplitLinearCovarianceComponents;
110 unsigned int _multiSamplingPolicy;
111 int _correspondencesApproach;
112 int _flowWinSize;
113 int _flowIterations;
114 float _flowEps;
115 int _flowMaxLevel;
116 bool _flowGpu;
117 bool _flowUseMinEigenVals;
118 float _flowMinEigThreshold;
119 float _flowErrorThreshold;
120 float _nndr;
121 int _nnType;
122 bool _gmsWithRotation;
123 bool _gmsWithScale;
124 double _gmsThresholdFactor;
125 int _guessWinSize;
126 bool _guessMatchToProjection;
127 int _bundleAdjustment;
128 bool _depthAsMask;
129 float _maskFloorThreshold;
130 float _minInliersDistributionThr;
131 float _maxInliersMeanDistance;
132
133 ParametersMap _featureParameters;
134 ParametersMap _bundleParameters;
135
136 Feature2D * _detectorFrom;
137 Feature2D * _detectorTo;
138
139#ifdef RTABMAP_PYTHON
140 PyMatcher * _pyMatcher;
141#endif
142};
143
144}
145
146#endif /* REGISTRATION_H_ */
Abstract 2D feature detector and descriptor extractor for visual SLAM.
Definition Features2d.h:145
Statistics and diagnostics returned by Registration.
Visual registration between two signatures using features and geometry.
const Feature2D * getDetector() const
float getInlierDistance() const
virtual void parseParameters(const ParametersMap &parameters)
Parses Vis/ and feature parameters; recreates feature detectors.
virtual Transform computeTransformationImpl(Signature &from, Signature &to, Transform guess, RegistrationInfo &info) const
Strategy-specific registration.
RegistrationVis(const ParametersMap &parameters=ParametersMap(), Registration *child=0)
child is owned and deleted in the destructor.
Abstract base for registering two observations (visual, ICP, or both).
Represents a node in RTAB-Map's pose graph.
Definition Signature.h:84
Represents a 3D rigid body transformation (rotation + translation).
Definition Transform.h:53
std::map< std::string, std::string > ParametersMap
Parameter keys mapped to their values, as used by every configurable class (see Parameters).
Definition Parameters.h:44