Go to the documentation of this file.
24 class CMatchedFeatureList;
72 uint16_t nTimesNotSeen;
73 uint16_t nTimesLastSeen;
78 std::deque<
double> multiScales;
79 std::deque<std::vector<
double> > multiOrientations;
80 std::deque<std::vector<std::vector<int32_t> > > multiHashCoeffs;
81 bool isPointFeature() const;
88 std::vector<uint8_t> SIFT;
89 std::vector<float> SURF;
90 std::vector<float> SpinImg;
91 uint16_t SpinImg_range_rows;
94 bool polarImgsNoRotation;
95 std::deque<std::vector<std::vector<int32_t> > > multiSIFTDescriptors;
96 std::vector<uint8_t> ORB;
98 bool hasDescriptorSIFT()
const {
return !SIFT.empty(); };
99 bool hasDescriptorSURF()
const {
return !SURF.empty(); }
100 bool hasDescriptorSpinImg()
const {
return !SpinImg.empty(); };
101 bool hasDescriptorPolarImg()
const {
return PolarImg.rows()!=0; } ;
102 bool hasDescriptorLogPolarImg()
const {
return LogPolarImg.rows()!=0; } ;
103 bool hasDescriptorMultiSIFT()
const {
104 return (multiSIFTDescriptors.size() > 0 && multiSIFTDescriptors[0].size() > 0);
106 bool hasDescriptorORB()
const {
return !ORB.empty(); }
119 float patchCorrelationTo(
const CFeature &oFeature)
const;
125 float descriptorDistanceTo(
const CFeature &oFeature,
TDescriptorType descriptorToUse =
descAny,
bool normalize_distances =
true )
const;
128 float descriptorSIFTDistanceTo(
const CFeature &oFeature,
bool normalize_distances =
true )
const;
131 float descriptorSURFDistanceTo(
const CFeature &oFeature,
bool normalize_distances =
true )
const;
134 float descriptorSpinImgDistanceTo(
const CFeature &oFeature,
bool normalize_distances =
true )
const;
141 float descriptorPolarImgDistanceTo(
142 const CFeature &oFeature,
144 bool normalize_distances =
true )
const;
151 float descriptorLogPolarImgDistanceTo(
152 const CFeature &oFeature,
154 bool normalize_distances =
true )
const;
157 uint8_t descriptorORBDistanceTo(
const CFeature &oFeature )
const;
172 void saveToTextFile(
const std::string &filename,
bool APPEND =
false );
181 void dumpToConsole()
const;
195 static float internal_distanceBetweenPolarImages(
199 bool normalize_distances,
200 bool dont_shift_angle );
223 void saveToTextFile(
const std::string &fileName,
bool APPEND =
false );
235 CFeaturePtr getByID(
const TFeatureID &ID )
const;
236 CFeaturePtr getByID(
const TFeatureID &ID,
int &out_idx )
const;
239 void getByMultiIDs(
const std::vector<TFeatureID> &IDs, std::vector<CFeaturePtr> &out, std::vector<int> &outIndex )
const;
248 CFeaturePtr nearest(
const float x,
const float y,
double &max_dist )
const;
257 inline void mark_kdtree_as_outdated()
const { kdtree_mark_as_outdated(); }
275 inline const_reverse_iterator rend()
const {
return m_feats.rend(); }
277 inline iterator erase(
const iterator &it) { mark_kdtree_as_outdated();
return m_feats.erase(it); }
279 inline bool empty()
const {
return m_feats.empty(); }
280 inline size_t size()
const {
return m_feats.size(); }
282 inline void clear() { m_feats.clear(); mark_kdtree_as_outdated(); }
283 inline void resize(
size_t N) { m_feats.resize(N); mark_kdtree_as_outdated(); }
285 inline void push_back(
const CFeaturePtr &f) { mark_kdtree_as_outdated(); m_feats.push_back(f); }
287 inline CFeaturePtr & operator [](
const unsigned int index) {
return m_feats[index]; }
288 inline const CFeaturePtr & operator [](
const unsigned int index)
const {
return m_feats[index]; }
297 inline size_t kdtree_get_point_count()
const {
return this->
size(); }
300 inline float kdtree_get_pt(
const size_t idx,
int dim)
const {
302 if (dim==0)
return m_feats[idx]->x;
303 else return m_feats[idx]->y;
307 inline float kdtree_distance(
const float *p1,
const size_t idx_p2,
size_t size)
const
312 const float d0 = p1[0] - m_feats[idx_p2]->x;
313 const float d1 = p1[1] - m_feats[idx_p2]->y;
320 template <
typename BBOX>
321 bool kdtree_get_bbox(BBOX &bb)
const {
331 inline float getFeatureX(
size_t i)
const {
return m_feats[i]->x; }
332 inline float getFeatureY(
size_t i)
const {
return m_feats[i]->y; }
333 inline TFeatureID getFeatureID(
size_t i)
const {
return m_feats[i]->ID; }
334 inline float getFeatureResponse(
size_t i)
const {
return m_feats[i]->response; }
335 inline bool isPointFeature(
size_t i)
const {
return m_feats[i]->isPointFeature(); }
336 inline float getScale(
size_t i)
const {
return m_feats[i]->scale; }
339 inline void setFeatureX(
size_t i,
float x) { m_feats[i]->x=x; }
340 inline void setFeatureXf(
size_t i,
float x) { m_feats[i]->x=x; }
341 inline void setFeatureY(
size_t i,
float y) { m_feats[i]->y=y; }
342 inline void setFeatureYf(
size_t i,
float y) { m_feats[i]->y=y; }
344 inline void setFeatureID(
size_t i,
TFeatureID id) { m_feats[i]->ID=id; }
345 inline void setFeatureResponse(
size_t i,
float r) { m_feats[i]->response=r; }
346 inline void setScale(
size_t i,
float s) { m_feats[i]->scale=s; }
349 inline void mark_as_outdated()
const { kdtree_mark_as_outdated(); }
381 void updateMaxID(
const TListIdx &idx );
384 inline void setLeftMaxID(
const TFeatureID &leftID ){ m_leftMaxID = leftID; }
385 inline void setRightMaxID(
const TFeatureID &rightID ){ m_rightMaxID = rightID; }
388 setLeftMaxID(leftID);
389 setRightMaxID(rightID);
393 CMatchedFeatureList();
EIGEN_STRONG_INLINE iterator begin()
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
uint64_t TFeatureID
Definition of a feature ID.
Classes for computer vision, detectors, features, etc.
size_t size(const MATRIXLIKE &m, int dim)
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
EIGEN_STRONG_INLINE iterator end()
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
const typedef Scalar * const_iterator
Used in some methods to mean "any of the present descriptors".
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
A matrix of dynamic size.
A list of visual features, to be used as output by detectors, as input/output by trackers,...
EIGEN_STRONG_INLINE void push_back(Scalar val)
Insert an element at the end of the container (for 1D vectors/arrays)
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
This class is a "CSerializable" wrapper for "CMatrixFloat".
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
TFeatureType
Types of features - This means that the point has been detected with this algorithm,...
The virtual base class which provides a unified interface for all persistent objects in MRPT.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
TInternalFeatList::iterator iterator
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
TInternalFeatList::const_iterator const_iterator
void loadFromTextFile(const std::string &file)
Load matrix from a text file, compatible with MATLAB text format.
EIGEN_STRONG_INLINE bool empty() const
TInternalFeatList::const_reverse_iterator const_reverse_iterator
std::vector< CFeaturePtr > TInternalFeatList
All the possible descriptors this feature may have.
A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or mo...
TInternalFeatList::reverse_iterator reverse_iterator
Non-defined feature (also used for Occupancy features)
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 22:32:58 UTC 2019 | | |