MRPT logo

mrpt::vision::CFeature Class Reference

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. More...

#include <mrpt/vision/CFeature.h>

Inheritance diagram for mrpt::vision::CFeature:

mrpt::utils::CSerializable

List of all members.

Classes

struct  TDescriptors
 All the possible descriptors this feature may have. More...

Public Member Functions

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.
TFeatureType get_type () const
 Get the type of the feature.
 CFeature ()
 Constructor.
virtual ~CFeature ()
 Virtual destructor.

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.
TKLTFeatureStatus KLT_status
 Status of the feature tracking process.
float KLT_val
 Value of the goodness of the feature.
float orientation
 Main orientation of the feature.
float scale
 Feature scale into the scale space.
uint8_t IDSourceImage
 ID of the image from which the feature was extracted.
struct MRPTDLLIMPEXP
mrpt::vision::CFeature::TDescriptors 
descriptors
 All the possible descriptors this feature may have.

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


Detailed Description

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 108 of file vision/CFeature.h.


Constructor & Destructor Documentation

mrpt::vision::CFeature::CFeature (  ) 

Constructor.

virtual mrpt::vision::CFeature::~CFeature (  )  [inline, virtual]

Virtual destructor.

Definition at line 203 of file vision/CFeature.h.


Member Function Documentation

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.

Note:
If descriptorToUse is not descAny and that descriptor is not present in one of the features, an exception will be raised.
See also:
patchCorrelationTo

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.

Parameters:
oFeature The other feature to compare with.
minDistAngle The placeholder for the angle at which the smallest distance is found.
Returns:
The distance for the best orientation (minimum distance).

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.

Parameters:
oFeature The other feature to compare with.
minDistAngle The placeholder for the angle at which the smallest distance is found.
Returns:
The distance for the best orientation (minimum distance).

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.

TFeatureType mrpt::vision::CFeature::get_type (  )  const [inline]

Get the type of the feature.

Definition at line 196 of file vision/CFeature.h.

bool mrpt::vision::CFeature::getFirstDescriptorAsMatrix ( mrpt::math::CMatrixFloat desc  )  const

Return the first found descriptor, as a matrix.

Returns:
false on error, i.e. there is no valid descriptor.

static float mrpt::vision::CFeature::internal_distanceBetweenPolarImages ( const mrpt::math::CMatrix desc1,
const mrpt::math::CMatrix desc2,
float &  minDistAngle,
bool  normalize_distances,
bool  dont_shift_angle 
) [static, protected]

Internal function used by "descriptorLogPolarImgDistanceTo" and "descriptorPolarImgDistanceTo".

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).

Note:
If this or the other features does not have patches or they are of different sizes, an exception will be raised.
See also:
descriptorDistanceTo


Friends And Related Function Documentation

friend class CFeatureList [friend]

Definition at line 110 of file vision/CFeature.h.

friend class CMatchedFeatureList [friend]

Definition at line 111 of file vision/CFeature.h.


Member Data Documentation

All the possible descriptors this feature may have.

ID of the feature.

Definition at line 117 of file vision/CFeature.h.

ID of the image from which the feature was extracted.

Definition at line 125 of file vision/CFeature.h.

Status of the feature tracking process.

Definition at line 121 of file vision/CFeature.h.

Value of the goodness of the feature.

Definition at line 122 of file vision/CFeature.h.

Main orientation of the feature.

Definition at line 123 of file vision/CFeature.h.

A patch of the image surrounding the feature.

Definition at line 118 of file vision/CFeature.h.

Size of the patch (patchSize x patchSize) (it must be an odd number).

Definition at line 119 of file vision/CFeature.h.

Feature scale into the scale space.

Definition at line 124 of file vision/CFeature.h.

Type of the feature: featNotDefined, featSIFT, featKLT, featHarris, featSURF, featBeacon.

Definition at line 120 of file vision/CFeature.h.

Definition at line 116 of file vision/CFeature.h.

Coordinates in the image.

Definition at line 116 of file vision/CFeature.h.




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:21:34 EDT 2009