Go to the documentation of this file.
110 std::optional<std::vector<uint8_t>>
SIFT;
113 std::optional<std::vector<float>>
SURF;
116 std::optional<std::vector<float>>
SpinImg;
124 std::optional<mrpt::math::CMatrixF>
PolarImg;
135 std::optional<std::vector<uint8_t>>
ORB;
139 std::optional<std::vector<uint8_t>>
BLD;
141 std::optional<std::vector<uint8_t>>
LATCH;
182 bool normalize_distances =
true)
const;
187 const CFeature& oFeature,
bool normalize_distances =
true)
const;
192 const CFeature& oFeature,
bool normalize_distances =
true)
const;
197 const CFeature& oFeature,
bool normalize_distances =
true)
const;
207 const CFeature& oFeature,
float& minDistAngle,
208 bool normalize_distances =
true)
const;
218 const CFeature& oFeature,
float& minDistAngle,
219 bool normalize_distances =
true)
const;
229 const CFeature& oFeature,
bool normalize_distances =
true)
const;
233 const CFeature& oFeature,
bool normalize_distances =
true)
const;
252 void saveToTextFile(
const std::string& filename,
bool APPEND =
false);
268 float& minDistAngle,
bool normalize_distances,
bool dont_shift_angle);
291 void saveToTextFile(
const std::string& fileName,
bool APPEND =
false);
318 const float x,
const float y,
double& max_dist)
const;
367 m_feats.emplace_back(std::move(f));
397 return m_feats[idx].keypoint.pt.x;
399 return m_feats[idx].keypoint.pt.y;
405 const float* p1,
const size_t idx_p2,
406 [[maybe_unused]]
size_t size)
const
410 const float d0 = p1[0] -
m_feats[idx_p2].keypoint.pt.x;
411 const float d1 = p1[1] -
m_feats[idx_p2].keypoint.pt.y;
412 return d0 * d0 + d1 * d1;
421 template <
typename BBOX>
433 return m_feats[i].keypoint.pt.x;
437 return m_feats[i].keypoint.pt.y;
445 return m_feats[i].keypoint.response;
449 return m_feats[i].isPointFeature();
454 return m_feats[i].keypoint.track_status;
473 m_feats[i].keypoint.response = r;
477 m_feats[i].keypoint.octave = s;
481 m_feats[i].keypoint.track_status = s;
bool hasDescriptorPolarImg() const
const CFeature & operator[](const unsigned int index) const
void setFeatureYf(size_t i, float y)
TFeatureID getFeatureID(size_t i) const
bool hasDescriptorSURF() const
uint8_t user_flags
A field for any other flags needed by the user (this has not a predefined meaning)
std::optional< std::vector< uint8_t > > LATCH
LATCH feature descriptor.
void setFeatureID(size_t i, TFeatureID id)
void setMaxIDs(const TFeatureID &leftID, const TFeatureID &rightID)
TKeyPointMethod get_type() const
The type of the first feature in the list.
float descriptorLATCHDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::optional< std::vector< float > > SpinImg
The 2D histogram as a single row.
float getScale(size_t i) const
mrpt::math::TPoint3D p3D
camera that took its image
bool hasDescriptorSIFT() const
void setFeatureY(size_t i, float y)
TInternalFeatList::const_iterator const_iterator
std::optional< std::vector< uint8_t > > BLD
BLD feature descriptor.
TInternalFeatList::reverse_iterator reverse_iterator
float response
A measure of the "goodness" of the feature.
const_iterator begin() const
float getFeatureResponse(size_t i) const
Copyright (C) 2010 Hauke Strasdat Imperial College London Copyright (c) 2005-2020,...
bool getFirstDescriptorAsMatrix(mrpt::math::CMatrixFloat &desc) const
Return the first found descriptor, as a matrix.
const CFeature * getByID(const TFeatureID &ID) const
Get a reference to a Feature from its ID.
TKeyPointMethod get_type() const
Get the type of the feature.
float patchCorrelationTo(const CFeature &oFeature) const
Computes the normalized cross-correlation between the patches of this and another feature (normalized...
CMatchedFeatureList()=default
void setFeatureX(size_t i, float x)
void setFeatureXf(size_t i, float x)
float descriptorPolarImgDistanceTo(const CFeature &oFeature, float &minDistAngle, bool normalize_distances=true) const
Returns the minimum Euclidean Distance between "this" and the "other" polar image descriptor,...
TInternalFeatList::iterator iterator
std::optional< std::vector< uint8_t > > ORB
ORB feature descriptor.
void getMaxID(const TListIdx &idx, TFeatureID &firstListID, TFeatureID &secondListID)
Returns the maximum ID of the features in the list.
mrpt::vision::TStereoCalibResults out
A generic adaptor class for providing Nearest Neighbor (NN) lookup via the nanoflann library.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
bool hasDescriptorSpinImg() const
void emplace_back(CFeature &&f)
float kdtree_distance(const float *p1, const size_t idx_p2, [[maybe_unused]] size_t size) const
Returns the distance between the vector "p1[0:size-1]" and the data point with index "idx_p2" stored ...
bool hasDescriptorLogPolarImg() const
uint16_t SpinImg_range_rows
The number of rows (corresponding to range bins in the 2D histogram) of the original matrix from whic...
uint16_t patchSize
Size of the patch (patchSize x patchSize) (it must be an odd number)
TKeyPointMethod get_type() const
The type of the first feature in the list.
float y2[2]
Coordinates for a LSD Detector to represent a line.
virtual ~CMatchedFeatureList()=default
double initialDepth
in the current frame
float orientation
Main orientation of the feature.
uint64_t TFeatureID
Definition of a feature ID.
A list of visual features, to be used as output by detectors, as input/output by trackers,...
const_iterator begin() const
CFeature & operator[](const unsigned int index)
This class is a "CSerializable" wrapper for "CMatrixFloat".
float descriptorLogPolarImgDistanceTo(const CFeature &oFeature, float &minDistAngle, bool normalize_distances=true) const
Returns the minimum Euclidean Distance between "this" and the "other" log-polar image descriptor,...
const_reverse_iterator rend() const
const_iterator end() const
CFeatureList()=default
Constructor.
bool hasDescriptorLATCH() const
float descriptorBLDDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
virtual ~CFeatureList()
Virtual destructor.
@ status_IDLE
Inactive (right after detection, and before being tried to track)
void saveToTextFile(const std::string &fileName, bool APPEND=false)
Save feature list to a text file.
void loadFromTextFile(const std::string &fileName)
Save feature list to a text file.
uint8_t descriptorORBDistanceTo(const CFeature &oFeature) const
Computes the Hamming distance "this" and the "other" descriptor ORB descriptor.
void setScale(size_t i, uint8_t s)
bool isPointFeature() const
Return false only for Blob detectors (SIFT, SURF)
bool polarImgsNoRotation
If set to true (default=false) the call to "descriptorDistanceTo" will not consider all the rotations...
void getBothFeatureLists(CFeatureList &list1, CFeatureList &list2)
Returns the matching features as two separate CFeatureLists.
void push_back(const CFeature &f)
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
std::optional< std::vector< uint8_t > > SIFT
SIFT feature descriptor.
void mark_kdtree_as_outdated() const
Call this when the list of features has been modified so the KD-tree is marked as outdated.
float descriptorDistanceTo(const CFeature &oFeature, TDescriptorType descriptorToUse=descAny, bool normalize_distances=true) const
Computes the Euclidean Distance between this feature's and other feature's descriptors,...
reverse_iterator rbegin()
The virtual base class which provides a unified interface for all persistent objects in MRPT.
size_t kdtree_get_point_count() const
Must return the number of data points.
void copyListFrom(const CFeatureList &otherList)
Copies the content of another CFeatureList inside this one.
TFeatureTrackStatus getTrackStatus(size_t i)
TFeatureID getMaxID() const
Get the maximum ID into the list.
iterator erase(const iterator &it)
TFeatureTrackStatus track_status
Status of the feature tracking process.
float descriptorSIFTDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
bool hasDescriptorORB() const
std::vector< CFeature > TInternalFeatList
void dumpToConsole() const
void saveToTextFile(const std::string &fileName)
Save list of matched features to a text file.
float descriptorSpinImgDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
void setTrackStatus(size_t i, TFeatureTrackStatus s)
std::optional< mrpt::math::CMatrixF > PolarImg
A polar image centered at the interest point.
float descriptorSURFDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
TInternalFeatList::const_reverse_iterator const_reverse_iterator
TKeyPointMethod
Types of key point detectors.
TKeyPointMethod type
Keypoint method used to detect this feature.
const CFeature * nearest(const float x, const float y, double &max_dist) const
Get a reference to the nearest feature to the a given 2D point (version returning distance to closest...
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
void setLeftMaxID(const TFeatureID &leftID)
Explicitly set the max IDs values to certain values.
bool kdtree_get_bbox([[maybe_unused]] BBOX &bb) const
const CFeature * getByID(const TFeatureID &ID, const TListIdx &idx)
Returns a smart pointer to the feature with the provided ID or a empty one if not found.
void setFeatureResponse(size_t i, float r)
float getFeatureX(size_t i) const
std::optional< std::vector< float > > SURF
SURF feature descriptor.
void dumpToTextStream(std::ostream &out) const
Dump feature information into a text stream.
float getFeatureY(size_t i) const
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
@ featNotDefined
Non-defined feature (also used for Occupancy features)
bool isPointFeature(size_t i) const
void updateMaxID(const TListIdx &idx)
Updates the value of the maximum ID of the features in the matched list, i.e.
void kdtree_mark_as_outdated() const
To be called by child classes when KD tree data changes.
const_reverse_iterator rbegin() const
bool hasDescriptorBLD() const
std::optional< mrpt::math::CMatrixF > LogPolarImg
A log-polar image centered at the interest point.
All the possible descriptors this feature may have.
void saveToTextFile(const std::string &filename, bool APPEND=false)
Save the feature to a text file in this format: "%% Dump of mrpt::vision::CFeatureList....
double depth
The estimated depth in 3D of this feature wrt the camera.
float kdtree_get_pt(const size_t idx, int dim) const
Returns the dim'th component of the idx'th point in the class:
This template class provides the basic functionality for a general 2D any-size, resizable container o...
A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or mo...
std::optional< mrpt::img::CImage > patch
A patch of the image surrounding the feature.
@ descAny
Used in some methods to mean "any of the present descriptors".
void setRightMaxID(const TFeatureID &rightID)
TInternalFeatList m_feats
The actual container with the list of features.
void mark_as_outdated() const
static float internal_distanceBetweenPolarImages(const mrpt::math::CMatrixF &desc1, const mrpt::math::CMatrixF &desc2, float &minDistAngle, bool normalize_distances, bool dont_shift_angle)
Internal function used by "descriptorLogPolarImgDistanceTo" and "descriptorPolarImgDistanceTo".
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 15:15:43 UTC 2020 | |