MRPT
1.9.9
|
A list of visual features, to be used as output by detectors, as input/output by trackers, etc.
Definition at line 304 of file CFeature.h.
#include <mrpt/vision/CFeature.h>
Public Types | |
using | self_t = KDTreeCapable< CFeatureList, float, nanoflann::L2_Simple_Adaptor< float, CFeatureList > > |
Public Member Functions | |
TFeatureType | get_type () const |
The type of the first feature in the list. More... | |
void | saveToTextFile (const std::string &fileName, bool APPEND=false) |
Save feature list to a text file. More... | |
void | loadFromTextFile (const std::string &fileName) |
Save feature list to a text file. More... | |
void | copyListFrom (const CFeatureList &otherList) |
Copies the content of another CFeatureList inside this one. More... | |
TFeatureID | getMaxID () const |
Get the maximum ID into the list. More... | |
CFeature::Ptr | getByID (const TFeatureID &ID) const |
Get a reference to a Feature from its ID. More... | |
CFeature::Ptr | getByID (const TFeatureID &ID, int &out_idx) 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. More... | |
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 feature in "max_dist") More... | |
CFeatureList () | |
Constructor. More... | |
virtual | ~CFeatureList () |
Virtual destructor. More... | |
void | mark_kdtree_as_outdated () const |
Call this when the list of features has been modified so the KD-tree is marked as outdated. More... | |
const CFeatureList & | derived () const |
CRTP helper method. More... | |
CFeatureList & | derived () |
CRTP helper method. More... | |
Methods that MUST be implemented by children classes of | |
KDTreeCapable | |
size_t | kdtree_get_point_count () const |
Must return the number of data points. More... | |
float | kdtree_get_pt (const size_t idx, int dim) const |
Returns the dim'th component of the idx'th point in the class: More... | |
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 in the class: More... | |
template<typename BBOX > | |
bool | kdtree_get_bbox (BBOX &bb) const |
getFeature*() methods for template-based access to feature list | |
float | getFeatureX (size_t i) const |
float | getFeatureY (size_t i) const |
TFeatureID | getFeatureID (size_t i) const |
float | getFeatureResponse (size_t i) const |
bool | isPointFeature (size_t i) const |
float | getScale (size_t i) const |
TFeatureTrackStatus | getTrackStatus (size_t i) |
void | setFeatureX (size_t i, float x) |
void | setFeatureXf (size_t i, float x) |
void | setFeatureY (size_t i, float y) |
void | setFeatureYf (size_t i, float y) |
void | setFeatureID (size_t i, TFeatureID id) |
void | setFeatureResponse (size_t i, float r) |
void | setScale (size_t i, float s) |
void | setTrackStatus (size_t i, TFeatureTrackStatus s) |
void | mark_as_outdated () const |
Public utility methods to query the KD-tree | |
size_t | kdTreeClosestPoint2D (float x0, float y0, float &out_x, float &out_y, float &out_dist_sqr) const |
KD Tree-based search for the closest point (only ONE) to some given 2D coordinates. More... | |
size_t | kdTreeClosestPoint2D (float x0, float y0, float &out_dist_sqr) const |
size_t | kdTreeClosestPoint2D (const TPoint2D &p0, TPoint2D &pOut, float &outDistSqr) const |
float | kdTreeClosestPoint2DsqrError (float x0, float y0) const |
Like kdTreeClosestPoint2D, but just return the square error from some point to its closest neighbor. More... | |
float | kdTreeClosestPoint2DsqrError (const TPoint2D &p0) const |
void | kdTreeTwoClosestPoint2D (float x0, float y0, float &out_x1, float &out_y1, float &out_x2, float &out_y2, float &out_dist_sqr1, float &out_dist_sqr2) const |
KD Tree-based search for the TWO closest point to some given 2D coordinates. More... | |
void | kdTreeTwoClosestPoint2D (const TPoint2D &p0, TPoint2D &pOut1, TPoint2D &pOut2, float &outDistSqr1, float &outDistSqr2) const |
std::vector< size_t > | kdTreeNClosestPoint2D (float x0, float y0, size_t knn, std::vector< float > &out_x, std::vector< float > &out_y, std::vector< float > &out_dist_sqr) const |
KD Tree-based search for the N closest point to some given 2D coordinates. More... | |
std::vector< size_t > | kdTreeNClosestPoint2D (const TPoint2D &p0, size_t N, std::vector< TPoint2D > &pOut, std::vector< float > &outDistSqr) const |
void | kdTreeNClosestPoint2DIdx (float x0, float y0, size_t knn, std::vector< size_t > &out_idx, std::vector< float > &out_dist_sqr) const |
KD Tree-based search for the N closest point to some given 2D coordinates and returns their indexes. More... | |
void | kdTreeNClosestPoint2DIdx (const TPoint2D &p0, size_t N, std::vector< size_t > &outIdx, std::vector< float > &outDistSqr) const |
size_t | kdTreeClosestPoint3D (float x0, float y0, float z0, float &out_x, float &out_y, float &out_z, float &out_dist_sqr) const |
KD Tree-based search for the closest point (only ONE) to some given 3D coordinates. More... | |
size_t | kdTreeClosestPoint3D (float x0, float y0, float z0, float &out_dist_sqr) const |
size_t | kdTreeClosestPoint3D (const TPoint3D &p0, TPoint3D &pOut, float &outDistSqr) const |
void | kdTreeNClosestPoint3D (float x0, float y0, float z0, size_t knn, std::vector< float > &out_x, std::vector< float > &out_y, std::vector< float > &out_z, std::vector< float > &out_dist_sqr) const |
KD Tree-based search for the N closest points to some given 3D coordinates. More... | |
void | kdTreeNClosestPoint3D (const TPoint3D &p0, size_t N, std::vector< TPoint3D > &pOut, std::vector< float > &outDistSqr) const |
void | kdTreeNClosestPoint3DWithIdx (float x0, float y0, float z0, size_t knn, std::vector< float > &out_x, std::vector< float > &out_y, std::vector< float > &out_z, std::vector< size_t > &out_idx, std::vector< float > &out_dist_sqr) const |
KD Tree-based search for the N closest points to some given 3D coordinates. More... | |
size_t | kdTreeRadiusSearch3D (const float x0, const float y0, const float z0, const float maxRadiusSqr, std::vector< std::pair< size_t, float >> &out_indices_dist) const |
KD Tree-based search for all the points within a given radius of some 3D point. More... | |
size_t | kdTreeRadiusSearch2D (const float x0, const float y0, const float maxRadiusSqr, std::vector< std::pair< size_t, float >> &out_indices_dist) const |
KD Tree-based search for all the points within a given radius of some 2D point. More... | |
void | kdTreeNClosestPoint3DIdx (float x0, float y0, float z0, size_t knn, std::vector< size_t > &out_idx, std::vector< float > &out_dist_sqr) const |
KD Tree-based search for the N closest point to some given 3D coordinates and returns their indexes. More... | |
void | kdTreeNClosestPoint3DIdx (const TPoint3D &p0, size_t N, std::vector< size_t > &outIdx, std::vector< float > &outDistSqr) const |
Public Attributes | |
TKDTreeSearchParams | kdtree_search_params |
Parameters to tune the ANN searches. More... | |
Protected Types | |
using | TInternalFeatList = std::vector< CFeature::Ptr > |
Protected Member Functions | |
void | kdtree_mark_as_outdated () const |
To be called by child classes when KD tree data changes. More... | |
Protected Attributes | |
TInternalFeatList | m_feats |
The actual container with the list of features. More... | |
Method and datatypes to emulate a STL container | |
using | iterator = TInternalFeatList::iterator |
using | const_iterator = TInternalFeatList::const_iterator |
using | reverse_iterator = TInternalFeatList::reverse_iterator |
using | const_reverse_iterator = TInternalFeatList::const_reverse_iterator |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
iterator | erase (const iterator &it) |
bool | empty () const |
size_t | size () const |
void | clear () |
void | resize (size_t N) |
void | push_back (const CFeature::Ptr &f) |
CFeature::Ptr & | operator[] (const unsigned int index) |
const CFeature::Ptr & | operator[] (const unsigned int index) const |
using mrpt::vision::CFeatureList::const_iterator = TInternalFeatList::const_iterator |
Definition at line 366 of file CFeature.h.
using mrpt::vision::CFeatureList::const_reverse_iterator = TInternalFeatList::const_reverse_iterator |
Definition at line 369 of file CFeature.h.
using mrpt::vision::CFeatureList::iterator = TInternalFeatList::iterator |
Definition at line 365 of file CFeature.h.
using mrpt::vision::CFeatureList::reverse_iterator = TInternalFeatList::reverse_iterator |
Definition at line 368 of file CFeature.h.
|
inherited |
Definition at line 81 of file KDTreeCapable.h.
|
protected |
Definition at line 307 of file CFeature.h.
CFeatureList::CFeatureList | ( | ) |
Constructor.
Definition at line 1029 of file CFeature.cpp.
|
virtual |
Virtual destructor.
Definition at line 1033 of file CFeature.cpp.
|
inline |
Definition at line 371 of file CFeature.h.
References m_feats.
Referenced by mrpt::vision::addFeaturesToImage(), mrpt::vision::checkTrackedFeatures(), mrpt::vision::computeMultiOrientations(), mrpt::vision::computeMultiResolutionDescriptors(), copyListFrom(), mrpt::vision::deleteRepeatedFeats(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), get_type(), mrpt::vision::getDispersion(), mrpt::vision::CFeatureExtraction::insertCvSeqInCFeatureList(), mrpt::vision::CFeatureExtraction::internal_computeBLDLineDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeLATCHDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeLogPolarImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computePolarImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSpinImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSurfDescriptors(), mrpt::maps::CLandmarksMap::loadSiftFeaturesFromImageObservation(), mrpt::vision::matchFeatures(), mrpt::vision::matchMultiResolutionFeatures(), mrpt::vision::CFeatureExtraction::my_scale_space_extrema(), mrpt::vision::projectMatchedFeatures(), mrpt::vision::relocalizeMultiDesc(), mrpt::vision::rowChecking(), mrpt::vision::detail::trackFeatures_deleteOOB(), mrpt::vision::CGenericFeatureTracker::trackFeaturesNewList(), and mrpt::slam::COccupancyGridMapFeatureExtractor::uncached_extractFeatures().
|
inline |
Definition at line 373 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 387 of file CFeature.h.
References m_feats, and mark_kdtree_as_outdated().
Referenced by mrpt::vision::CFeatureExtraction::convertCvSeqInCFeatureList(), mrpt::vision::CFeatureExtraction::detectFeatures(), mrpt::vision::CFeatureExtraction::extractFeaturesAKAZE(), mrpt::vision::CFeatureExtraction::extractFeaturesFAST(), mrpt::vision::CFeatureExtraction::extractFeaturesFASTER_N(), mrpt::vision::CFeatureExtraction::extractFeaturesKLT(), mrpt::vision::CFeatureExtraction::extractFeaturesLSD(), mrpt::vision::CFeatureExtraction::extractFeaturesORB(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), and mrpt::vision::CFeatureExtraction::extractFeaturesSURF().
void CFeatureList::copyListFrom | ( | const CFeatureList & | otherList | ) |
Copies the content of another CFeatureList inside this one.
The inner features are also copied.
Definition at line 1239 of file CFeature.cpp.
|
inlineinherited |
CRTP helper method.
Definition at line 87 of file KDTreeCapable.h.
|
inlineinherited |
CRTP helper method.
Definition at line 92 of file KDTreeCapable.h.
|
inline |
Definition at line 385 of file CFeature.h.
References m_feats.
Referenced by get_type(), mrpt::vision::CFeatureExtraction::internal_computeBLDLineDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeLATCHDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSurfDescriptors(), mrpt::vision::TSIFTDescriptorsKDTreeIndex< distance_t, metric_t >::TSIFTDescriptorsKDTreeIndex(), and mrpt::vision::TSURFDescriptorsKDTreeIndex< distance_t, metric_t >::TSURFDescriptorsKDTreeIndex().
|
inline |
Definition at line 372 of file CFeature.h.
References m_feats.
Referenced by mrpt::vision::addFeaturesToImage(), mrpt::vision::checkTrackedFeatures(), mrpt::vision::computeMultiOrientations(), mrpt::vision::computeMultiResolutionDescriptors(), copyListFrom(), mrpt::vision::deleteRepeatedFeats(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::vision::getDispersion(), mrpt::vision::CFeatureExtraction::insertCvSeqInCFeatureList(), mrpt::vision::CFeatureExtraction::internal_computeBLDLineDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeLATCHDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeLogPolarImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computePolarImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSpinImageDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSurfDescriptors(), mrpt::maps::CLandmarksMap::loadSiftFeaturesFromImageObservation(), mrpt::vision::matchFeatures(), mrpt::vision::matchMultiResolutionFeatures(), mrpt::vision::CFeatureExtraction::my_scale_space_extrema(), mrpt::vision::projectMatchedFeatures(), mrpt::vision::relocalizeMultiDesc(), mrpt::vision::rowChecking(), mrpt::vision::detail::trackFeatures_deleteOOB(), mrpt::vision::CGenericFeatureTracker::trackFeaturesNewList(), and mrpt::slam::COccupancyGridMapFeatureExtractor::uncached_extractFeatures().
|
inline |
Definition at line 374 of file CFeature.h.
References m_feats.
Definition at line 379 of file CFeature.h.
References m_feats, and mark_kdtree_as_outdated().
Referenced by mrpt::vision::checkTrackedFeatures(), mrpt::vision::deleteRepeatedFeats(), mrpt::vision::projectMatchedFeatures(), mrpt::vision::rowChecking(), and mrpt::vision::detail::trackFeatures_deleteOOB().
|
inline |
The type of the first feature in the list.
Definition at line 314 of file CFeature.h.
References begin(), empty(), and mrpt::vision::featNotDefined.
Referenced by mrpt::vision::matchFeatures().
CFeature::Ptr CFeatureList::getByID | ( | const TFeatureID & | ID | ) | const |
Get a reference to a Feature from its ID.
Definition at line 1255 of file CFeature.cpp.
References begin(), and mrpt::vision::CFeature::ID.
Referenced by mrpt::vision::relocalizeMultiDesc().
CFeature::Ptr CFeatureList::getByID | ( | const TFeatureID & | ID, |
int & | out_idx | ||
) | const |
Definition at line 1266 of file CFeature.cpp.
References begin(), and mrpt::vision::CFeature::ID.
void CFeatureList::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.
Definition at line 1282 of file CFeature.cpp.
|
inline |
Definition at line 463 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 464 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 461 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 462 of file CFeature.h.
References m_feats.
TFeatureID CFeatureList::getMaxID | ( | ) | const |
Get the maximum ID into the list.
Definition at line 1328 of file CFeature.cpp.
References ASSERT_, begin(), empty(), mrpt::vision::CFeature::ID, mrpt::keep_max(), MRPT_END, and MRPT_START.
|
inline |
Definition at line 472 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 473 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 468 of file CFeature.h.
References m_feats.
|
inline |
Returns the distance between the vector "p1[0:size-1]" and the data point with index "idx_p2" stored in the class:
Definition at line 433 of file CFeature.h.
References ASSERTDEB_, m_feats, and MRPT_UNUSED_PARAM.
|
inline |
Definition at line 451 of file CFeature.h.
References MRPT_UNUSED_PARAM.
|
inline |
Must return the number of data points.
Definition at line 420 of file CFeature.h.
References size().
|
inline |
Returns the dim'th component of the idx'th point in the class:
Definition at line 422 of file CFeature.h.
References ASSERTDEB_, and m_feats.
|
inlineprotectedinherited |
To be called by child classes when KD tree data changes.
Definition at line 730 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree_is_uptodate.
Referenced by mark_as_outdated(), and mark_kdtree_as_outdated().
|
inlineinherited |
KD Tree-based search for the closest point (only ONE) to some given 2D coordinates.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
out_x | The X coordinate of the found closest correspondence. |
out_y | The Y coordinate of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 123 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::derived(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree2d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_2D(), and THROW_EXCEPTION.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 152 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree2d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_2D(), and THROW_EXCEPTION.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 176 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2D(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
inlineinherited |
Like kdTreeClosestPoint2D, but just return the square error from some point to its closest neighbor.
Definition at line 191 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2D().
|
inlineinherited |
Definition at line 198 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2DsqrError(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
inlineinherited |
KD Tree-based search for the closest point (only ONE) to some given 3D coordinates.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
out_x | The X coordinate of the found closest correspondence. |
out_y | The Y coordinate of the found closest correspondence. |
out_z | The Z coordinate of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 406 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::derived(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree3d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_3D(), and THROW_EXCEPTION.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 437 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree3d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_3D(), and THROW_EXCEPTION.
|
inlineinherited |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 462 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint3D(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
inlineinherited |
KD Tree-based search for the N closest point to some given 2D coordinates.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
N | The number of closest points to search. |
out_x | The vector containing the X coordinates of the correspondences. |
out_y | The vector containing the Y coordinates of the correspondences. |
out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 291 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::derived(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree2d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_2D(), and THROW_EXCEPTION.
|
inlineinherited |
Definition at line 323 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint2D(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
inlineinherited |
KD Tree-based search for the N closest point to some given 2D coordinates and returns their indexes.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
N | The number of closest points to search. |
out_idx | The indexes of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 356 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree2d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_2D(), and THROW_EXCEPTION.
|
inlineinherited |
Definition at line 378 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint2DIdx(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
|
inlineinherited |
KD Tree-based search for the N closest points to some given 3D coordinates.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
N | The number of closest points to search. |
out_x | The vector containing the X coordinates of the correspondences. |
out_y | The vector containing the Y coordinates of the correspondences. |
out_z | The vector containing the Z coordinates of the correspondences. |
out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 497 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::derived(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree3d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_3D(), and THROW_EXCEPTION.
|
inlineinherited |
Definition at line 590 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint3D(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
inlineinherited |
KD Tree-based search for the N closest point to some given 3D coordinates and returns their indexes.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
N | The number of closest points to search. |
out_idx | The indexes of the found closest correspondence. |
out_dist_sqr | The square distance between the query and the returned point. |
Definition at line 694 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree3d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_3D(), and THROW_EXCEPTION.
|
inlineinherited |
Definition at line 717 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint3DIdx(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
inlineinherited |
KD Tree-based search for the N closest points to some given 3D coordinates.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
N | The number of closest points to search. |
out_x | The vector containing the X coordinates of the correspondences. |
out_y | The vector containing the Y coordinates of the correspondences. |
out_z | The vector containing the Z coordinates of the correspondences. |
out_idx | The vector containing the indexes of the correspondences. |
out_dist_sqr | The vector containing the square distance between the query and the returned points. |
Definition at line 555 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::derived(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree3d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_3D(), and THROW_EXCEPTION.
|
inlineinherited |
KD Tree-based search for all the points within a given radius of some 2D point.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
maxRadiusSqr | The square of the desired search radius. |
out_indices_dist | The output list, with pairs of indeces/squared distances for the found correspondences. |
Definition at line 659 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree2d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, and mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_2D().
|
inlineinherited |
KD Tree-based search for all the points within a given radius of some 3D point.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
z0 | The Z coordinate of the query. |
maxRadiusSqr | The square of the desired search radius. |
out_indices_dist | The output list, with pairs of indeces/squared distances for the found correspondences. |
Definition at line 624 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree3d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, and mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_3D().
|
inlineinherited |
KD Tree-based search for the TWO closest point to some given 2D coordinates.
This method automatically build the "m_kdtree_data" structure when:
x0 | The X coordinate of the query. |
y0 | The Y coordinate of the query. |
out_x1 | The X coordinate of the first correspondence. |
out_y1 | The Y coordinate of the first correspondence. |
out_x2 | The X coordinate of the second correspondence. |
out_y2 | The Y coordinate of the second correspondence. |
out_dist_sqr1 | The square distance between the query and the first returned point. |
out_dist_sqr2 | The square distance between the query and the second returned point. |
Definition at line 224 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::derived(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::index, nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::m_kdtree2d_data, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::m_num_points, MRPT_END, MRPT_START, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::TKDTreeDataHolder< _DIM >::query_point, mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::rebuild_kdTree_2D(), and THROW_EXCEPTION.
|
inlineinherited |
Definition at line 257 of file KDTreeCapable.h.
References mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeTwoClosestPoint2D(), mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
void CFeatureList::loadFromTextFile | ( | const std::string & | fileName | ) |
Save feature list to a text file.
Definition at line 1117 of file CFeature.cpp.
References mrpt::format(), MRPT_END, MRPT_START, push_back(), THROW_EXCEPTION, and val.
|
inline |
Definition at line 493 of file CFeature.h.
References mrpt::math::KDTreeCapable< CFeatureList >::kdtree_mark_as_outdated().
|
inline |
Call this when the list of features has been modified so the KD-tree is marked as outdated.
Definition at line 362 of file CFeature.h.
References mrpt::math::KDTreeCapable< CFeatureList >::kdtree_mark_as_outdated().
Referenced by clear(), erase(), push_back(), and resize().
CFeature::Ptr CFeatureList::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 feature in "max_dist")
x | [IN] The query point x-coordinate |
y | [IN] The query point y-coordinate |
max_dist | [IN/OUT] At input: The maximum distance to search for. At output: The actual distance to the feature. |
Definition at line 1303 of file CFeature.cpp.
References empty().
|
inline |
Definition at line 404 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 408 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 398 of file CFeature.h.
References m_feats, and mark_kdtree_as_outdated().
Referenced by mrpt::vision::CFeatureExtraction::convertCvSeqInCFeatureList(), mrpt::vision::CFeatureExtraction::detectFeatures(), mrpt::vision::CFeatureExtraction::extractFeaturesAKAZE(), mrpt::vision::CFeatureExtraction::extractFeaturesFAST(), mrpt::vision::CFeatureExtraction::extractFeaturesFASTER_N(), mrpt::vision::CFeatureExtraction::extractFeaturesKLT(), mrpt::vision::CFeatureExtraction::extractFeaturesLSD(), mrpt::vision::CFeatureExtraction::extractFeaturesORB(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), and mrpt::vision::CFeatureExtraction::extractFeaturesSURF().
|
inline |
Definition at line 375 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 377 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 376 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 378 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 392 of file CFeature.h.
References m_feats, and mark_kdtree_as_outdated().
Referenced by mrpt::vision::CFeatureExtraction::extractFeaturesORB(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::vision::CMatchedFeatureList::getBothFeatureLists(), and mrpt::vision::CFeatureExtraction::internal_computeORBDescriptors().
void CFeatureList::saveToTextFile | ( | const std::string & | fileName, |
bool | APPEND = false |
||
) |
Save feature list to a text file.
Definition at line 1039 of file CFeature.cpp.
References begin(), MRPT_END, MRPT_START, and THROW_EXCEPTION.
Referenced by mrpt::vision::CFeatureExtraction::extractFeaturesSIFT().
|
inline |
Definition at line 482 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 483 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 478 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 479 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 480 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 481 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 487 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 488 of file CFeature.h.
References m_feats.
|
inline |
Definition at line 386 of file CFeature.h.
References m_feats.
Referenced by mrpt::vision::checkTrackedFeatures(), mrpt::vision::computeMultiOrientations(), mrpt::vision::computeMultiResolutionDescriptors(), copyListFrom(), mrpt::vision::CFeatureExtraction::extractFeaturesORB(), mrpt::vision::CFeatureExtraction::extractFeaturesSIFT(), mrpt::vision::find_descriptor_pairings(), mrpt::vision::getDispersion(), mrpt::vision::CFeatureExtraction::internal_computeBLDLineDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeLATCHDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeORBDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors(), mrpt::vision::CFeatureExtraction::internal_computeSurfDescriptors(), mrpt::vision::detail::TSIFTDesc2KDTree_Adaptor< distance_t >::kdtree_distance(), mrpt::vision::detail::TSURFDesc2KDTree_Adaptor< distance_t >::kdtree_distance(), mrpt::vision::detail::TSIFTDesc2KDTree_Adaptor< distance_t >::kdtree_get_point_count(), mrpt::vision::detail::TSURFDesc2KDTree_Adaptor< distance_t >::kdtree_get_point_count(), kdtree_get_point_count(), mrpt::vision::matchFeatures(), mrpt::vision::matchMultiResolutionFeatures(), mrpt::vision::projectMatchedFeatures(), mrpt::vision::TSIFTDescriptorsKDTreeIndex< distance_t, metric_t >::regenerate_kdtreee(), mrpt::vision::TSURFDescriptorsKDTreeIndex< distance_t, metric_t >::regenerate_kdtreee(), mrpt::vision::relocalizeMultiDesc(), mrpt::vision::rowChecking(), and mrpt::vision::updateBaseList().
|
inherited |
Parameters to tune the ANN searches.
Definition at line 101 of file KDTreeCapable.h.
|
protected |
The actual container with the list of features.
Definition at line 310 of file CFeature.h.
Referenced by begin(), clear(), empty(), end(), erase(), getFeatureID(), getFeatureResponse(), getFeatureX(), getFeatureY(), getScale(), getTrackStatus(), isPointFeature(), kdtree_distance(), kdtree_get_pt(), operator[](), push_back(), rbegin(), rend(), resize(), setFeatureID(), setFeatureResponse(), setFeatureX(), setFeatureXf(), setFeatureY(), setFeatureYf(), setScale(), setTrackStatus(), and size().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |