Go to the documentation of this file.
100 std::deque<std::vector<std::vector<
int32_t>>>
111 std::vector<uint8_t> SIFT;
112 std::vector<float> SURF;
113 std::vector<float> SpinImg;
122 bool polarImgsNoRotation;
127 std::deque<std::vector<std::vector<int32_t>>>
128 multiSIFTDescriptors;
132 std::vector<uint8_t> ORB;
134 std::vector<uint8_t> BLD;
135 std::vector<uint8_t> LATCH;
137 bool hasDescriptorSIFT()
const
139 return !SIFT.empty();
141 bool hasDescriptorSURF()
const
143 return !SURF.empty();
145 bool hasDescriptorSpinImg()
const
147 return !SpinImg.empty();
149 bool hasDescriptorPolarImg()
const
151 return PolarImg.rows() != 0;
153 bool hasDescriptorLogPolarImg()
const
155 return LogPolarImg.rows() != 0;
157 bool hasDescriptorMultiSIFT()
const
160 multiSIFTDescriptors.size() > 0 &&
161 multiSIFTDescriptors[0].size() >
164 bool hasDescriptorORB()
const
169 bool hasDescriptorBLD()
const
173 bool hasDescriptorLATCH()
const
175 return !LATCH.empty();
202 bool normalize_distances =
true)
const;
207 const CFeature& oFeature,
bool normalize_distances =
true)
const;
212 const CFeature& oFeature,
bool normalize_distances =
true)
const;
217 const CFeature& oFeature,
bool normalize_distances =
true)
const;
227 const CFeature& oFeature,
float& minDistAngle,
228 bool normalize_distances =
true)
const;
238 const CFeature& oFeature,
float& minDistAngle,
239 bool normalize_distances =
true)
const;
249 const CFeature& oFeature,
bool normalize_distances =
true)
const;
253 const CFeature& oFeature,
bool normalize_distances =
true)
const;
294 float& minDistAngle,
bool normalize_distances,
bool dont_shift_angle);
338 const std::vector<TFeatureID>& IDs, std::vector<CFeature::Ptr>& out,
339 std::vector<int>& outIndex)
const;
386 inline size_t size()
const {
return m_feats.size(); }
392 inline void resize(
size_t N)
434 const float* p1,
const size_t idx_p2,
size_t size)
const
439 const float d0 = p1[0] -
m_feats[idx_p2]->x;
440 const float d1 = p1[1] -
m_feats[idx_p2]->y;
441 return d0 * d0 + d1 * d1;
450 template <
typename BBOX>
504 :
public std::deque<std::pair<CFeature::Ptr, CFeature::Ptr>>
CFeature::Ptr getByID(const TFeatureID &ID) const
Get a reference to a Feature from its ID.
void getByMultiIDs(const std::vector< TFeatureID > &IDs, std::vector< CFeature::Ptr > &out, std::vector< int > &outIndex) const
Get a vector of references to a subset of features from their IDs.
void setFeatureYf(size_t i, float y)
TFeatureID getFeatureID(size_t i) const
TFeatureType get_type() const
The type of the first feature in the list.
uint8_t user_flags
A field for any other flags needed by the user.
std::deque< std::vector< std::vector< int32_t > > > multiHashCoeffs
orientations (there is a vector of orientations for each scale)
void setFeatureID(size_t i, TFeatureID id)
void setMaxIDs(const TFeatureID &leftID, const TFeatureID &rightID)
EIGEN_STRONG_INLINE iterator begin()
float descriptorLATCHDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
const Scalar * const_iterator
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
unsigned __int16 uint16_t
float getScale(size_t i) const
mrpt::math::TPoint3D p3D
camera that took its image
void setFeatureY(size_t i, float y)
TInternalFeatList::const_iterator const_iterator
bool kdtree_get_bbox(BBOX &bb) const
TInternalFeatList::reverse_iterator reverse_iterator
float response
process (old name: KLT_status)
float getFeatureResponse(size_t i) const
Classes for computer vision, detectors, features, etc.
bool getFirstDescriptorAsMatrix(mrpt::math::CMatrixFloat &desc) const
Return the first found descriptor, as a matrix.
float patchCorrelationTo(const CFeature &oFeature) const
Computes the normalized cross-correlation between the patches of this and another feature (normalized...
void setFeatureX(size_t i, float x)
void setFeatureXf(size_t i, float x)
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
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
void getMaxID(const TListIdx &idx, TFeatureID &firstListID, TFeatureID &secondListID)
Returns the maximum ID of the features in the list.
GLint GLint GLsizei GLsizei GLsizei depth
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.
GLuint GLuint GLsizei GLenum type
CMatchedFeatureList()
Constructor.
@ descAny
Used in some methods to mean "any of the present descriptors".
uint16_t patchSize
Size of the patch (patchSize x patchSize) (it must.
float y2[2]
Coordinates for a LSD Detector to represent a line.
double initialDepth
in the current frame
float orientation
KLT_val)
uint64_t TFeatureID
Definition of a feature ID.
A matrix of dynamic size.
A list of visual features, to be used as output by detectors, as input/output by trackers,...
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,...
GLdouble GLdouble GLdouble r
mrpt::img::CImage patch
A patch of the image surrounding the feature.
float descriptorBLDDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
virtual ~CFeatureList()
Virtual destructor.
std::shared_ptr< CFeature > Ptr
This class is a "CSerializable" wrapper for "CMatrixFloat".
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.
TFeatureID ID
ID of the feature.
uint8_t descriptorORBDistanceTo(const CFeature &oFeature) const
Computes the Hamming distance "this" and the "other" descriptor ORB descriptor.
bool isPointFeature() const
a HASH table of descriptors
CFeatureList()
Constructor.
void getBothFeatureLists(CFeatureList &list1, CFeatureList &list2)
Returns the matching features as two separate CFeatureLists.
CFeature::Ptr 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.
uint16_t nTimesSeen
(this has not a predefined meaning)
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
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)
TFeatureType
Types of features - This means that the point has been detected with this algorithm,...
TFeatureID getMaxID() const
Get the maximum ID into the list.
void push_back(const CFeature::Ptr &f)
iterator erase(const iterator &it)
TFeatureTrackStatus track_status
featKLT, featHarris, featSURF, featBeacon
float descriptorSIFTDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
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)
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
CFeature::Ptr & operator[](const unsigned int index)
struct mrpt::vision::CFeature::TDescriptors descriptors
GLenum GLenum GLenum GLenum GLenum scale
void setLeftMaxID(const TFeatureID &leftID)
Explicitly set the max IDs values to certain values.
uint16_t nTimesLastSeen
sequence of images.
CFeature::Ptr 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...
void setFeatureResponse(size_t i, float r)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
float getFeatureX(size_t i) const
std::vector< CFeature::Ptr > TInternalFeatList
std::deque< double > multiScales
A set of scales where the.
TFeatureType get_type() const
Get the type of the feature.
void dumpToTextStream(std::ostream &out) const
Dump feature information into a text stream.
float getFeatureY(size_t i) const
virtual ~CMatchedFeatureList()
Virtual destructor.
EIGEN_STRONG_INLINE bool empty() const
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
GLsizei const GLchar ** string
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.
uint16_t nTimesNotSeen
of images.
virtual ~CFeature()
Virtual destructor.
void setScale(size_t i, float s)
void kdtree_mark_as_outdated() const
To be called by child classes when KD tree data changes.
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....
float kdtree_distance(const float *p1, const size_t idx_p2, size_t size) const
Returns the distance between the vector "p1[0:size-1]" and the data point with index "idx_p2" stored ...
TFeatureType type
be an odd number)
float kdtree_get_pt(const size_t idx, int dim) const
Returns the dim'th component of the idx'th point in the class:
std::deque< std::vector< double > > multiOrientations
multi-resolution descriptor has been computed
A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or mo...
TFeatureType get_type() const
The type of the first feature in the list.
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::CMatrix &desc1, const mrpt::math::CMatrix &desc2, float &minDistAngle, bool normalize_distances, bool dont_shift_angle)
Internal function used by "descriptorLogPolarImgDistanceTo" and "descriptorPolarImgDistanceTo".
@ featNotDefined
Non-defined feature (also used for Occupancy features)
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |