24 class CMatchedFeatureList;
101 std::deque<std::vector<std::vector<int32_t>>>
128 std::deque<std::vector<std::vector<int32_t>>>
140 return !
SIFT.empty();
144 return !
SURF.empty();
176 return !
LATCH.empty();
203 bool normalize_distances =
true)
const;
208 const CFeature& oFeature,
bool normalize_distances =
true)
const;
213 const CFeature& oFeature,
bool normalize_distances =
true)
const;
218 const CFeature& oFeature,
bool normalize_distances =
true)
const;
228 const CFeature& oFeature,
float& minDistAngle,
229 bool normalize_distances =
true)
const;
239 const CFeature& oFeature,
float& minDistAngle,
240 bool normalize_distances =
true)
const;
250 const CFeature& oFeature,
bool normalize_distances =
true)
const;
254 const CFeature& oFeature,
bool normalize_distances =
true)
const;
295 float& minDistAngle,
bool normalize_distances,
bool dont_shift_angle);
339 const std::vector<TFeatureID>& IDs, std::vector<CFeature::Ptr>& out,
340 std::vector<int>& outIndex)
const;
435 const float* p1,
const size_t idx_p2,
size_t size)
const
440 const float d0 = p1[0] -
m_feats[idx_p2]->x;
441 const float d1 = p1[1] -
m_feats[idx_p2]->y;
442 return d0 * d0 + d1 * d1;
451 template <
typename BBOX>
471 return m_feats[i]->isPointFeature();
476 return m_feats[i]->track_status;
505 :
public std::deque<std::pair<CFeature::Ptr, CFeature::Ptr>>
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
This class is a "CSerializable" wrapper for "CMatrixFloat".
A matrix of dynamic size.
A generic adaptor class for providing Nearest Neighbor (NN) lookup via the nanoflann library.
void kdtree_mark_as_outdated() const
To be called by child classes when KD tree data changes.
A class for storing images as grayscale or RGB bitmaps.
The virtual base class which provides a unified interface for all persistent objects in MRPT.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or mo...
TFeatureType type
be an odd number)
float descriptorSIFTDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
struct mrpt::vision::CFeature::TDescriptors descriptors
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,...
std::deque< std::vector< double > > multiOrientations
multi-resolution descriptor has been computed
float response
process (old name: KLT_status)
float y
Coordinates in the image.
mrpt::math::TPoint3D p3D
camera that took its image
bool isPointFeature() const
a HASH table of descriptors
mrpt::utils::CImage patch
A patch of the image surrounding the feature.
std::deque< std::vector< std::vector< int32_t > > > multiHashCoeffs
orientations (there is a vector of orientations for each scale)
double initialDepth
in the current frame
float patchCorrelationTo(const CFeature &oFeature) const
Computes the normalized cross-correlation between the patches of this and another feature (normalized...
float scale
Feature scale into the scale space.
void dumpToTextStream(mrpt::utils::CStream &out) const
Dump feature information into a text stream.
float y2[2]
Coordinates for a LSD Detector to represent a line.
float descriptorBLDDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
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".
uint16_t nTimesNotSeen
of images.
float descriptorSURFDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
uint16_t nTimesSeen
(this has not a predefined meaning)
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,...
uint8_t user_flags
A field for any other flags needed by the user.
float descriptorSpinImgDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
std::deque< double > multiScales
A set of scales where the.
float descriptorLATCHDistanceTo(const CFeature &oFeature, bool normalize_distances=true) const
Computes the Euclidean Distance between "this" and the "other" descriptors.
std::shared_ptr< CFeature > Ptr
uint16_t nTimesLastSeen
sequence of images.
uint8_t descriptorORBDistanceTo(const CFeature &oFeature) const
Computes the Hamming distance "this" and the "other" descriptor ORB descriptor.
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 orientation
KLT_val)
bool getFirstDescriptorAsMatrix(mrpt::math::CMatrixFloat &desc) const
Return the first found descriptor, as a matrix.
virtual ~CFeature()
Virtual destructor.
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,...
TFeatureID ID
ID of the feature.
TFeatureTrackStatus track_status
featKLT, featHarris, featSURF, featBeacon
uint16_t patchSize
Size of the patch (patchSize x patchSize) (it must.
void dumpToConsole() const
double depth
The estimated depth in 3D of this feature wrt the camera.
TFeatureType get_type() const
Get the type of the feature.
A list of visual features, to be used as output by detectors, as input/output by trackers,...
void setFeatureYf(size_t i, float y)
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...
CFeature::Ptr getByID(const TFeatureID &ID) const
Get a reference to a Feature from its ID.
void saveToTextFile(const std::string &fileName, bool APPEND=false)
Save feature list to a text file.
const_reverse_iterator rbegin() const
iterator erase(const iterator &it)
void push_back(const CFeature::Ptr &f)
float getFeatureResponse(size_t i) const
TFeatureID getFeatureID(size_t i) const
void setTrackStatus(size_t i, TFeatureTrackStatus s)
const CFeature::Ptr & operator[](const unsigned int index) const
TFeatureID getMaxID() const
Get the maximum ID into the list.
void setFeatureResponse(size_t i, float r)
virtual ~CFeatureList()
Virtual destructor.
const_reverse_iterator rend() const
TInternalFeatList::const_reverse_iterator const_reverse_iterator
void setFeatureXf(size_t i, float x)
TFeatureTrackStatus getTrackStatus(size_t i)
reverse_iterator rbegin()
TInternalFeatList::const_iterator const_iterator
size_t kdtree_get_point_count() const
Must return the number of data points.
TInternalFeatList::reverse_iterator reverse_iterator
bool kdtree_get_bbox(BBOX &bb) const
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::vector< CFeature::Ptr > TInternalFeatList
TInternalFeatList::iterator iterator
CFeature::Ptr & operator[](const unsigned int index)
void setFeatureX(size_t i, float x)
void mark_as_outdated() const
float getFeatureY(size_t i) const
void copyListFrom(const CFeatureList &otherList)
Copies the content of another CFeatureList inside this one.
const_iterator end() const
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.
float kdtree_get_pt(const size_t idx, int dim) const
Returns the dim'th component of the idx'th point in the class:
void setFeatureY(size_t i, float y)
void setFeatureID(size_t i, TFeatureID id)
CFeatureList()
Constructor.
void loadFromTextFile(const std::string &fileName)
Save feature list to a text file.
TInternalFeatList m_feats
The actual container with the list of features.
void setScale(size_t i, float s)
float getScale(size_t i) const
TFeatureType get_type() const
The type of the first feature in the list.
float getFeatureX(size_t i) const
const_iterator begin() const
bool isPointFeature(size_t i) const
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 ...
virtual ~CMatchedFeatureList()
Virtual destructor.
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.
void setRightMaxID(const TFeatureID &rightID)
TFeatureType get_type() const
The type of the first feature in the list.
void setMaxIDs(const TFeatureID &leftID, const TFeatureID &rightID)
void updateMaxID(const TListIdx &idx)
Updates the value of the maximum ID of the features in the matched list, i.e.
void setLeftMaxID(const TFeatureID &leftID)
Explicitly set the max IDs values to certain values.
void getMaxID(const TListIdx &idx, TFeatureID &firstListID, TFeatureID &secondListID)
Returns the maximum ID of the features in the list.
void saveToTextFile(const std::string &fileName)
Save list of matched features to a text file.
CMatchedFeatureList()
Constructor.
EIGEN_STRONG_INLINE bool empty() const
const Scalar * const_iterator
EIGEN_STRONG_INLINE iterator begin()
GLdouble GLdouble GLdouble r
GLsizei const GLchar ** string
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
TFeatureType
Types of features - This means that the point has been detected with this algorithm,...
uint64_t TFeatureID
Definition of a feature ID.
@ descAny
Used in some methods to mean "any of the present descriptors".
@ featNotDefined
Non-defined feature (also used for Occupancy features)
#define ASSERTDEB_(f)
Defines an assertion mechanism - only when compiled in debug.
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
Classes for computer vision, detectors, features, etc.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int16 uint16_t
All the possible descriptors this feature may have.
uint16_t SpinImg_range_rows
The number of rows (corresponding to.
bool hasDescriptorPolarImg() const
Whether this feature has this kind of descriptor.
mrpt::math::CMatrix PolarImg
range bins in the 2D histogram) of the original matrix from which SpinImg was extracted as a vector.
bool hasDescriptorSIFT() const
bool hasDescriptorMultiSIFT() const
Whether this feature has this kind of descriptor.
std::vector< uint8_t > LATCH
LATCH feature descriptor.
bool hasDescriptorSURF() const
Whether this feature has this kind of descriptor.
bool hasDescriptorORB() const
Whether this feature has this kind of descriptor.
std::vector< float > SpinImg
The 2D histogram as a single row.
std::vector< float > SURF
SURF feature descriptor.
std::deque< std::vector< std::vector< int32_t > > > multiSIFTDescriptors
the call to "descriptorDistanceTo" will not consider all the rotations between polar image descriptor...
bool hasDescriptorLATCH() const
Whether this feature has this kind of descriptor.
bool polarImgsNoRotation
If set to true (manually, default=false)
mrpt::math::CMatrix LogPolarImg
A log-polar image centered at the interest point.
bool hasDescriptorBLD() const
Whether this feature has this kind of descriptor.
std::vector< uint8_t > SIFT
SIFT feature descriptor.
bool hasDescriptorLogPolarImg() const
Whether this feature has this kind of descriptor.
std::vector< uint8_t > BLD
BLD feature descriptor.
std::vector< uint8_t > ORB
orientation and scale of the multiResolution feature (there is a vector of descriptors for each scale...
bool hasDescriptorSpinImg() const