A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or more descriptors (see descriptors), in addition to an image patch.
The (Euclidean) distance between descriptors in a pair of features can be computed with descriptorDistanceTo, while the similarity of the patches is given by patchCorrelationTo.
Definition at line 78 of file CFeature.h.
#include <mrpt/vision/CFeature.h>

Classes | |
| struct | TDescriptors |
| All the possible descriptors this feature may have. More... | |
Public Member Functions | |
| bool | isPointFeature () const |
| Return false only for Blob detectors (SIFT, SURF) | |
| 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 in the range [0,1], such as 0=best, 1=worst). | |
| 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. | |
| float | descriptorSIFTDistanceTo (const CFeature &oFeature, bool normalize_distances=true) const |
| Computes the Euclidean Distance between "this" and the "other" descriptors. | |
| float | descriptorSURFDistanceTo (const CFeature &oFeature, bool normalize_distances=true) const |
| Computes the Euclidean Distance between "this" and the "other" descriptors. | |
| float | descriptorSpinImgDistanceTo (const CFeature &oFeature, bool normalize_distances=true) const |
| Computes the Euclidean Distance between "this" and the "other" 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, for the best shift in orientation. | |
| 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, for the best shift in orientation. | |
| 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" "%% |-------------------— feature ---------------—| |-------------------— descriptors ---------------------—|" "%% with:\n" "%% TYPE : The used detector: 0:KLT, 1: Harris, 2: BCD, 3: SIFT, 4: SURF, 5: Beacon, 6: FAST\n" "%% HAS_* : 1 if a descriptor of that type is associated to the feature." "%% SIFT : Present if HAS_SIFT=1: N DESC_0 ... DESC_N-1" "%% SURF : Present if HAS_SURF=1: N DESC_0 ... DESC_N-1" "%% MULTI : Present if HAS_MULTI=1: SCALE ORI N DESC_0 ... DESC_N-1" "%%----------------------------------------------------------------------------------------—\n"); | |
| TFeatureType | get_type () const |
| Get the type of the feature. | |
| void | dumpToTextStream (mrpt::utils::CStream &out) const |
| Dump feature information into a text stream. | |
| void | dumpToConsole () const |
| CFeature () | |
| Constructor. | |
| virtual | ~CFeature () |
| Virtual destructor. | |
| mrpt::utils::CObjectPtr | duplicateGetSmartPtr () const |
| Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer). | |
| CObject * | clone () const |
| Cloning interface for smart pointers. | |
Public Attributes | |
| float | x |
| float | y |
| Coordinates in the image. | |
| TFeatureID | ID |
| ID of the feature. | |
| CImage | patch |
| A patch of the image surrounding the feature. | |
| uint16_t | patchSize |
| Size of the patch (patchSize x patchSize) (it must be an odd number) | |
| TFeatureType | type |
| Type of the feature: featNotDefined, featSIFT, featKLT, featHarris, featSURF, featBeacon. | |
| TFeatureTrackStatus | track_status |
| Status of the feature tracking process (old name: KLT_status) | |
| float | response |
| A measure of the "goodness" of the feature (old name: KLT_val) | |
| float | orientation |
| Main orientation of the feature. | |
| float | scale |
| Feature scale into the scale space. | |
| uint8_t | user_flags |
| A field for any other flags needed by the user (this has not a predefined meaning) | |
| uint16_t | nTimesSeen |
| Number of frames it has been seen in a sequence of images. | |
| uint16_t | nTimesNotSeen |
| Number of frames it has not been seen in a sequence of images. | |
| uint16_t | nTimesLastSeen |
| Number of frames since it was seen for the last time. | |
| double | depth |
| The estimated depth in 3D of this feature wrt the camera in the current frame. | |
| double | initialDepth |
| The estimated depth in 3D of this feature wrt the camera that took its image. | |
| TPoint3D | p3D |
| The estimated 3D point of this feature wrt its camera. | |
| deque< double > | multiScales |
| A set of scales where the multi-resolution descriptor has been computed. | |
| deque< vector< double > > | multiOrientations |
| A vector of main orientations (there is a vector of orientations for each scale) | |
| deque< vector< vector< int32_t > > > | multiHashCoeffs |
| A set of vectors containing the coefficients for a HASH table of descriptors. | |
| struct VISION_IMPEXP mrpt::vision::CFeature::TDescriptors | descriptors |
Static Public Attributes | |
| static const mrpt::utils::TRuntimeClassId | classCObject |
RTTI stuff | |
| static const mrpt::utils::TRuntimeClassId | classCSerializable |
Protected Member Functions | |
CSerializable virtual methods | |
| void | writeToStream (mrpt::utils::CStream &out, int *getVersion) const |
| Introduces a pure virtual method responsible for writing to a CStream. | |
| void | readFromStream (mrpt::utils::CStream &in, int version) |
| Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori. | |
Static Protected Member Functions | |
| 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". | |
Friends | |
| class | CFeatureList |
| class | CMatchedFeatureList |
RTTI stuff | |
| typedef CFeaturePtr | SmartPtr |
| static mrpt::utils::CLASSINIT | _init_CFeature |
| static mrpt::utils::TRuntimeClassId | classCFeature |
| static const mrpt::utils::TRuntimeClassId * | classinfo |
| static const mrpt::utils::TRuntimeClassId * | _GetBaseClass () |
| virtual const mrpt::utils::TRuntimeClassId * | GetRuntimeClass () const |
| Returns information about the class of an object in runtime. | |
| virtual mrpt::utils::CObject * | duplicate () const |
| Returns a copy of the object, indepently of its class. | |
| static mrpt::utils::CObject * | CreateObject () |
| static CFeaturePtr | Create () |
A typedef for the associated smart pointer
Definition at line 83 of file CFeature.h.
| mrpt::vision::CFeature::CFeature | ( | ) |
Constructor.
|
inlinevirtual |
Virtual destructor.
Definition at line 207 of file CFeature.h.
|
staticprotected |
|
inlineinherited |
|
static |
|
static |
| float mrpt::vision::CFeature::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.
| float mrpt::vision::CFeature::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, for the best shift in orientation.
| oFeature | The other feature to compare with. |
| minDistAngle | The placeholder for the angle at which the smallest distance is found. |
| float mrpt::vision::CFeature::descriptorPolarImgDistanceTo | ( | const CFeature & | oFeature, |
| float & | minDistAngle, | ||
| bool | normalize_distances = true |
||
| ) | const |
Returns the minimum Euclidean Distance between "this" and the "other" polar image descriptor, for the best shift in orientation.
| oFeature | The other feature to compare with. |
| minDistAngle | The placeholder for the angle at which the smallest distance is found. |
| float mrpt::vision::CFeature::descriptorSIFTDistanceTo | ( | const CFeature & | oFeature, |
| bool | normalize_distances = true |
||
| ) | const |
Computes the Euclidean Distance between "this" and the "other" descriptors.
| float mrpt::vision::CFeature::descriptorSpinImgDistanceTo | ( | const CFeature & | oFeature, |
| bool | normalize_distances = true |
||
| ) | const |
Computes the Euclidean Distance between "this" and the "other" descriptors.
| float mrpt::vision::CFeature::descriptorSURFDistanceTo | ( | const CFeature & | oFeature, |
| bool | normalize_distances = true |
||
| ) | const |
Computes the Euclidean Distance between "this" and the "other" descriptors.
| void mrpt::vision::CFeature::dumpToConsole | ( | ) | const |
| void mrpt::vision::CFeature::dumpToTextStream | ( | mrpt::utils::CStream & | out | ) | const |
Dump feature information into a text stream.
|
virtual |
Returns a copy of the object, indepently of its class.
Implements mrpt::utils::CObject.
|
inlineinherited |
|
inline |
Get the type of the feature.
Definition at line 195 of file CFeature.h.
| bool mrpt::vision::CFeature::getFirstDescriptorAsMatrix | ( | mrpt::math::CMatrixFloat & | desc | ) | const |
Return the first found descriptor, as a matrix.
|
virtual |
Returns information about the class of an object in runtime.
Reimplemented from mrpt::utils::CSerializable.
|
staticprotected |
Internal function used by "descriptorLogPolarImgDistanceTo" and "descriptorPolarImgDistanceTo".
| bool mrpt::vision::CFeature::isPointFeature | ( | ) | const |
Return false only for Blob detectors (SIFT, SURF)
| float mrpt::vision::CFeature::patchCorrelationTo | ( | const CFeature & | oFeature | ) | const |
Computes the normalized cross-correlation between the patches of this and another feature (normalized in the range [0,1], such as 0=best, 1=worst).
|
protectedvirtual |
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly be users, instead use "stream >> object;" for reading it from a stream or "stream >> object_ptr;" if the class is unknown apriori.
| in | The input binary stream where the object data must read from. |
| version | The version of the object stored in the stream: use this version number in your code to know how to read the incoming data. |
| std::exception | On any error, see CStream::ReadBuffer |
Implements mrpt::utils::CSerializable.
| void mrpt::vision::CFeature::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" "%% |-------------------— feature ---------------—| |-------------------— descriptors ---------------------—|" "%% with:\n" "%% TYPE : The used detector: 0:KLT, 1: Harris, 2: BCD, 3: SIFT, 4: SURF, 5: Beacon, 6: FAST\n" "%% HAS_* : 1 if a descriptor of that type is associated to the feature." "%% SIFT : Present if HAS_SIFT=1: N DESC_0 ... DESC_N-1" "%% SURF : Present if HAS_SURF=1: N DESC_0 ... DESC_N-1" "%% MULTI : Present if HAS_MULTI=1: SCALE ORI N DESC_0 ... DESC_N-1" "%%----------------------------------------------------------------------------------------—\n");
|
protectedvirtual |
Introduces a pure virtual method responsible for writing to a CStream.
This can not be used directly be users, instead use "stream << object;" for writing it to a stream.
| out | The output binary stream where object must be dumped. |
| getVersion | If NULL, the object must be dumped. If not, only the version of the object dump must be returned in this pointer. This enables the versioning of objects dumping and backward compatibility with previously stored data. |
| std::exception | On any error, see CStream::WriteBuffer |
Implements mrpt::utils::CSerializable.
|
friend |
Definition at line 80 of file CFeature.h.
|
friend |
Definition at line 81 of file CFeature.h.
|
staticprotected |
Definition at line 83 of file CFeature.h.
|
static |
Definition at line 83 of file CFeature.h.
|
staticinherited |
|
staticinherited |
Definition at line 56 of file CSerializable.h.
|
static |
Definition at line 83 of file CFeature.h.
| double mrpt::vision::CFeature::depth |
The estimated depth in 3D of this feature wrt the camera in the current frame.
Definition at line 100 of file CFeature.h.
| struct VISION_IMPEXP mrpt::vision::CFeature::TDescriptors mrpt::vision::CFeature::descriptors |
| TFeatureID mrpt::vision::CFeature::ID |
ID of the feature.
Definition at line 87 of file CFeature.h.
| double mrpt::vision::CFeature::initialDepth |
The estimated depth in 3D of this feature wrt the camera that took its image.
Definition at line 101 of file CFeature.h.
| deque<vector<vector<int32_t> > > mrpt::vision::CFeature::multiHashCoeffs |
A set of vectors containing the coefficients for a HASH table of descriptors.
Definition at line 105 of file CFeature.h.
| deque<vector<double> > mrpt::vision::CFeature::multiOrientations |
A vector of main orientations (there is a vector of orientations for each scale)
Definition at line 104 of file CFeature.h.
| deque<double> mrpt::vision::CFeature::multiScales |
A set of scales where the multi-resolution descriptor has been computed.
Definition at line 103 of file CFeature.h.
| uint16_t mrpt::vision::CFeature::nTimesLastSeen |
Number of frames since it was seen for the last time.
Definition at line 98 of file CFeature.h.
| uint16_t mrpt::vision::CFeature::nTimesNotSeen |
Number of frames it has not been seen in a sequence of images.
Definition at line 97 of file CFeature.h.
| uint16_t mrpt::vision::CFeature::nTimesSeen |
Number of frames it has been seen in a sequence of images.
Definition at line 96 of file CFeature.h.
| float mrpt::vision::CFeature::orientation |
Main orientation of the feature.
Definition at line 93 of file CFeature.h.
| TPoint3D mrpt::vision::CFeature::p3D |
The estimated 3D point of this feature wrt its camera.
Definition at line 102 of file CFeature.h.
| CImage mrpt::vision::CFeature::patch |
A patch of the image surrounding the feature.
Definition at line 88 of file CFeature.h.
| uint16_t mrpt::vision::CFeature::patchSize |
Size of the patch (patchSize x patchSize) (it must be an odd number)
Definition at line 89 of file CFeature.h.
| float mrpt::vision::CFeature::response |
A measure of the "goodness" of the feature (old name: KLT_val)
Definition at line 92 of file CFeature.h.
| float mrpt::vision::CFeature::scale |
Feature scale into the scale space.
Definition at line 94 of file CFeature.h.
| TFeatureTrackStatus mrpt::vision::CFeature::track_status |
Status of the feature tracking process (old name: KLT_status)
Definition at line 91 of file CFeature.h.
| TFeatureType mrpt::vision::CFeature::type |
Type of the feature: featNotDefined, featSIFT, featKLT, featHarris, featSURF, featBeacon.
Definition at line 90 of file CFeature.h.
| uint8_t mrpt::vision::CFeature::user_flags |
A field for any other flags needed by the user (this has not a predefined meaning)
Definition at line 95 of file CFeature.h.
| float mrpt::vision::CFeature::x |
Definition at line 86 of file CFeature.h.
| float mrpt::vision::CFeature::y |
Coordinates in the image.
Definition at line 86 of file CFeature.h.
| Page generated by Doxygen 1.8.3 for MRPT 0.9.6 SVN: at Fri Feb 15 22:05:02 EST 2013 |