100 std::deque<std::vector<std::vector<int32_t>>>
127 std::deque<std::vector<std::vector<int32_t>>>
139 return !
SIFT.empty();
143 return !
SURF.empty();
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;
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>
470 return m_feats[i]->isPointFeature();
475 return m_feats[i]->track_status;
504 :
public std::deque<std::pair<CFeature::Ptr, CFeature::Ptr>>
void updateMaxID(const TListIdx &idx)
Updates the value of the maximum ID of the features in the matched list, i.e.
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, using the given descriptor or the first present one.
Non-defined feature (also used for Occupancy features)
TFeatureID ID
ID of the feature.
EIGEN_STRONG_INLINE bool empty() const
const_reverse_iterator rend() const
uint8_t descriptorORBDistanceTo(const CFeature &oFeature) const
Computes the Hamming distance "this" and the "other" descriptor ORB descriptor.
uint64_t TFeatureID
Definition of a feature ID.
unsigned __int16 uint16_t
float descriptorSpinImgDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
bool hasDescriptorBLD() const
Whether this feature has this kind of descriptor.
uint16_t nTimesSeen
(this has not a predefined meaning)
float scale
Feature scale into the scale space.
TInternalFeatList::iterator iterator
Used in some methods to mean "any of the present descriptors".
std::vector< uint8_t > BLD
BLD feature descriptor.
void loadFromTextFile(const std::string &fileName)
Save feature list to a text file.
bool hasDescriptorLogPolarImg() const
Whether this feature has this kind of descriptor.
void setRightMaxID(const TFeatureID &rightID)
std::vector< CFeature::Ptr > TInternalFeatList
TFeatureTrackStatus track_status
featKLT, featHarris, featSURF, featBeacon
void setFeatureX(size_t i, float x)
bool hasDescriptorSpinImg() const
void dumpToConsole() const
float descriptorSIFTDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
TFeatureID getFeatureID(size_t i) const
float getFeatureY(size_t i) const
float descriptorSURFDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
float getScale(size_t i) const
uint16_t nTimesLastSeen
sequence of images.
void setFeatureResponse(size_t i, float r)
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.
EIGEN_STRONG_INLINE iterator begin()
void setMaxIDs(const TFeatureID &leftID, const TFeatureID &rightID)
bool hasDescriptorSIFT() const
bool isPointFeature(size_t i) const
std::vector< float > SURF
SURF feature descriptor.
std::deque< double > multiScales
A set of scales where the.
const_iterator begin() const
TFeatureType get_type() const
Get the type of the feature.
mrpt::math::CMatrix LogPolarImg
A log-polar image centered at the interest point.
CMatchedFeatureList()
Constructor.
float y
Coordinates in the image.
void setTrackStatus(size_t i, TFeatureTrackStatus s)
bool hasDescriptorMultiSIFT() const
Whether this feature has this kind of descriptor.
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 ...
const_reverse_iterator rbegin() const
TInternalFeatList m_feats
The actual container with the list of features.
A generic adaptor class for providing Nearest Neighbor (NN) lookup via the nanoflann library...
void setFeatureY(size_t i, float y)
reverse_iterator rbegin()
const_iterator end() const
void dumpToTextStream(std::ostream &out) const
Dump feature information into a text stream.
TInternalFeatList::reverse_iterator reverse_iterator
bool polarImgsNoRotation
If set to true (manually, default=false)
TFeatureType type
be an odd number)
double depth
The estimated depth in 3D of this feature wrt the camera.
void getBothFeatureLists(CFeatureList &list1, CFeatureList &list2)
Returns the matching features as two separate CFeatureLists.
void saveToTextFile(const std::string &filename, bool APPEND=false)
Save the feature to a text file in this format: "%% Dump of mrpt::vision::CFeatureList. Each line format is:\n" "%% ID TYPE X Y ORIENTATION SCALE TRACK_STATUS RESPONSE HAS_SIFT [SIFT] HAS_SURF [SURF] HAS_MULTI [MULTI_i] HAS_ORB [ORB]" "%% |---------------------- feature ------------------| |---------------------- descriptors ------------------------|" "%% with:\n" "%% TYPE : The used detector: 0:KLT, 1: Harris, 2: BCD, 3: SIFT, 4: SURF, 5: Beacon, 6: FAST, 7: ORB\n" "%% HAS_* : 1 if a descriptor of that type is associated to the feature.
uint16_t nTimesNotSeen
of images.
virtual ~CFeature()
Virtual destructor.
void getMaxID(const TListIdx &idx, TFeatureID &firstListID, TFeatureID &secondListID)
Returns the maximum ID of the features in the list.
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".
const CFeature::Ptr & operator[](const unsigned int index) const
CFeature::Ptr & operator[](const unsigned int index)
std::deque< std::vector< std::vector< int32_t > > > multiHashCoeffs
orientations (there is a vector of orientations for each scale)
std::vector< uint8_t > SIFT
SIFT feature descriptor.
std::deque< std::vector< double > > multiOrientations
multi-resolution descriptor has been computed
All the possible descriptors this feature may have.
Classes for computer vision, detectors, features, etc.
uint16_t SpinImg_range_rows
The number of rows (corresponding to.
TInternalFeatList::const_reverse_iterator const_reverse_iterator
A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or mo...
float descriptorLATCHDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
iterator erase(const iterator &it)
bool hasDescriptorORB() const
Whether this feature has this kind of descriptor.
void saveToTextFile(const std::string &fileName)
Save list of matched features to a text file.
GLsizei const GLchar ** string
A list of visual features, to be used as output by detectors, as input/output by trackers, etc.
uint8_t user_flags
A field for any other flags needed by the user.
float kdtree_get_pt(const size_t idx, int dim) const
Returns the dim'th component of the idx'th point in the class:
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
void mark_as_outdated() const
mrpt::math::TPoint3D p3D
camera that took its image
TInternalFeatList::const_iterator const_iterator
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...
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
TFeatureType
Types of features - This means that the point has been detected with this algorithm, which is independent of additional descriptors a feature may also have.
float getFeatureResponse(size_t i) const
bool hasDescriptorLATCH() const
Whether this feature has this kind of descriptor.
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...
struct mrpt::vision::CFeature::TDescriptors descriptors
void saveToTextFile(const std::string &fileName, bool APPEND=false)
Save feature list to a text file.
float response
process (old name: KLT_status)
virtual ~CFeatureList()
Virtual destructor.
bool getFirstDescriptorAsMatrix(mrpt::math::CMatrixFloat &desc) const
Return the first found descriptor, as a matrix.
CFeatureList()
Constructor.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
GLdouble GLdouble GLdouble r
void setFeatureID(size_t i, TFeatureID id)
std::vector< float > SpinImg
The 2D histogram as a single row.
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
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...
void kdtree_mark_as_outdated() const
To be called by child classes when KD tree data changes.
bool kdtree_get_bbox(BBOX &bb) const
std::vector< uint8_t > LATCH
LATCH feature descriptor.
void setLeftMaxID(const TFeatureID &leftID)
Explicitly set the max IDs values to certain values.
float patchCorrelationTo(const CFeature &oFeature) const
Computes the normalized cross-correlation between the patches of this and another feature (normalized...
virtual ~CMatchedFeatureList()
Virtual destructor.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
A matrix of dynamic size.
TFeatureID getMaxID() const
Get the maximum ID into the list.
void setFeatureYf(size_t i, float y)
void setFeatureXf(size_t i, float x)
void setScale(size_t i, float s)
float y2[2]
Coordinates for a LSD Detector to represent a line.
bool hasDescriptorPolarImg() const
Whether this feature has this kind of descriptor.
float orientation
KLT_val)
TFeatureType get_type() const
The type of the first feature in the list.
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...
This class is a "CSerializable" wrapper for "CMatrixFloat".
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.
uint16_t patchSize
Size of the patch (patchSize x patchSize) (it must.
const Scalar * const_iterator
void mark_kdtree_as_outdated() const
Call this when the list of features has been modified so the KD-tree is marked as outdated...
std::deque< std::vector< std::vector< int32_t > > > multiSIFTDescriptors
the call to "descriptorDistanceTo" will not consider all the rotations between polar image descriptor...
CFeature::Ptr getByID(const TFeatureID &ID) const
Get a reference to a Feature from its ID.
double initialDepth
in the current frame
float getFeatureX(size_t i) const
mrpt::math::CMatrix PolarImg
range bins in the 2D histogram) of the original matrix from which SpinImg was extracted as a vector...
void copyListFrom(const CFeatureList &otherList)
Copies the content of another CFeatureList inside this one.
void push_back(const CFeature::Ptr &f)
TFeatureTrackStatus getTrackStatus(size_t i)
A class for storing images as grayscale or RGB bitmaps.
bool isPointFeature() const
a HASH table of descriptors
TFeatureType get_type() const
The type of the first feature in the list.
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
bool hasDescriptorSURF() const
Whether this feature has this kind of descriptor.
size_t kdtree_get_point_count() const
Must return the number of data points.
std::vector< uint8_t > ORB
orientation and scale of the multiResolution feature (there is a vector of descriptors for each scale...