MRPT logo

mrpt::vision::CFeatureExtraction Class Reference

The central class from which images can be analyzed in search of different kinds of interest points and descriptors computed for them. More...

#include <mrpt/vision/CFeatureExtraction.h>

List of all members.

Classes

struct  TOptions
 The set of parameters for all the detectors & descriptor algorithms. More...

Public Types

enum  TSIFTImplementation { LoweBinary = 0, CSBinary, VedaldiBinary, Hess }

Public Member Functions

 CFeatureExtraction ()
 Constructor.
virtual ~CFeatureExtraction ()
 Virtual destructor.
void detectFeatures (const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
 Extract features from the image based on the method defined in TOptions.
void computeDescriptors (const CImage &in_img, CFeatureList &inout_features, TDescriptorType in_descriptor_list) const
 Compute one (or more) descriptors for the given set of interest points onto the image, which may have been filled out manually or from detectFeatures.
void findMoreFeatures (const CImage &img, const CFeatureList &inList, CFeatureList &outList, unsigned int nDesiredFeats=0) const
 Extract more features from the image (apart from the provided ones) based on the method defined in TOptions.

Public Attributes

TOptions options
 Set all the parameters of the desired method here before calling "detectFeatures".

Private Member Functions

void internal_computeSiftDescriptors (const CImage &in_img, CFeatureList &in_features) const
 Compute the SIFT descriptor of the provided features into the input image.
void internal_computeSurfDescriptors (const CImage &in_img, CFeatureList &in_features) const
 Compute the SURF descriptor of the provided features into the input image.
void internal_computeSpinImageDescriptors (const CImage &in_img, CFeatureList &in_features) const
 Compute the intensity-domain spin images descriptor of the provided features into the input image.
void internal_computePolarImageDescriptors (const CImage &in_img, CFeatureList &in_features) const
 Compute a polar-image descriptor of the provided features into the input image.
void internal_computeLogPolarImageDescriptors (const CImage &in_img, CFeatureList &in_features) const
 Compute a log-polar image descriptor of the provided features into the input image.
void selectGoodFeaturesKLT (const CImage &inImg, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, void *mask_=NULL) const
 Select good features using the openCV implementation of the KLT method.
void extractFeaturesKLT (const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
 Extract features from the image based on the KLT method.
void extractFeaturesBCD (const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
 Extract features from the image based on the BCD method.
void extractFeaturesSIFT (const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
 Extract features from the image based on the SIFT method.
void extractFeaturesSURF (const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
 Extract features from the image based on the SURF method.
void * my_scale_space_extrema (CFeatureList &featList, void *dog_pyr, int octvs, int intvls, double contr_thr, int curv_thr, void *storage) const
 Computes extrema in the scale space.
void my_adjust_for_img_dbl (void *features) const
 Adjust scale if the image was initially doubled.
void getTimesExtrema (void *dog_pyr, int octvs, int intvls, float row, float col, unsigned int &nMin, unsigned int &nMax) const
 Gets the number of times that a point in the image is higher or lower than the surroundings in the image-scale space.
double getLaplacianValue (void *dog_pyr, int octvs, int intvls, float row, float col) const
 Computes the Laplacian value of the feature in the corresponing image in the pyramid.
void insertCvSeqInCFeatureList (void *features, CFeatureList &list, unsigned int init_ID=0) const
 Append a sequence of openCV features into an MRPT feature list.
void convertCvSeqInCFeatureList (void *features, CFeatureList &list, unsigned int init_ID=0, const TImageROI &ROI=TImageROI()) const
 Converts a sequence of openCV features into an MRPT feature list.


Detailed Description

The central class from which images can be analyzed in search of different kinds of interest points and descriptors computed for them.

To extract features from an image, create an instance of CFeatureExtraction, fill out its CFeatureExtraction::options field, including the algorithm to use (see CFeatureExtraction::TMethodExtraction), and call CFeatureExtraction::detectFeatures. This will return a set of features of the class mrpt::vision::CFeature, which include details for each interest point as well as the desired descriptors and/or patches.

By default, a 21x21 patch is extracted for each detected feature. If the patch is not needed, set patchSize to 0 in CFeatureExtraction::options

The implemented detection algorithms are (see CFeatureExtraction::TMethodExtraction):

Additionally, given a list of interest points onto an image, the following descriptors can be computed for each point by calling CFeatureExtraction::computeDescriptors :

Note:
The descriptor "Intensity-domain spin images" is described in "A sparse texture representation using affine-invariant regions", S Lazebnik, C Schmid, J Ponce, 2003 IEEE Computer Society Conference on Computer Vision.
See also:
mrpt::vision::CFeature

Definition at line 70 of file CFeatureExtraction.h.


Member Enumeration Documentation

Enumerator:
LoweBinary 
CSBinary 
VedaldiBinary 
Hess 

Definition at line 73 of file CFeatureExtraction.h.


Constructor & Destructor Documentation

mrpt::vision::CFeatureExtraction::CFeatureExtraction (  ) 

Constructor.

virtual mrpt::vision::CFeatureExtraction::~CFeatureExtraction (  )  [virtual]

Virtual destructor.


Member Function Documentation

void mrpt::vision::CFeatureExtraction::computeDescriptors ( const CImage in_img,
CFeatureList inout_features,
TDescriptorType  in_descriptor_list 
) const

Compute one (or more) descriptors for the given set of interest points onto the image, which may have been filled out manually or from detectFeatures.

Parameters:
in_img (input) The image from where to compute the descriptors.
inout_features (input/output) The list of features whose descriptors are going to be computed.
in_descriptor_list (input) The bitwise OR of one or several descriptors defined in TDescriptorType.
Each value in "in_descriptor_list" represents one descriptor to be computed, for example:
    // This call will compute both, SIFT and Spin-Image descriptors for a list of feature points lstFeats.
    fext.computeDescriptors(img, lstFeats, descSIFT | descSpinImages );

Note:
The SIFT descriptors for already located features can only be computed through the Hess and CSBinary implementations which may be specified in CFeatureExtraction::TOptions::SIFTOptions.

This call will also use additional parameters from options

void mrpt::vision::CFeatureExtraction::convertCvSeqInCFeatureList ( void *  features,
CFeatureList list,
unsigned int  init_ID = 0,
const TImageROI ROI = TImageROI() 
) const [private]

Converts a sequence of openCV features into an MRPT feature list.

Parameters:
features The sequence of features.
list [in-out] The list of MRPT features.
init_ID [in][optional] The initial ID for the features (default = 0).
ROI [in][optional] The initial ID for the features (default = empty ROI -> not used).

void mrpt::vision::CFeatureExtraction::detectFeatures ( const CImage img,
CFeatureList feats,
unsigned int  init_ID = 0,
unsigned int  nDesiredFeatures = 0,
const TImageROI ROI = TImageROI() 
) const

Extract features from the image based on the method defined in TOptions.

Parameters:
img (input) The image from where to extract the images.
feats (output) A complete list of features (containing a patch for each one of them if options.patchsize > 0).
nDesiredFeatures (op. input) Number of features to be extracted. Default: all possible.
ROI (op. input) Region of Interest. Default: The whole image.
See also:
computeDescriptors

void mrpt::vision::CFeatureExtraction::extractFeaturesBCD ( const CImage img,
CFeatureList feats,
unsigned int  init_ID = 0,
unsigned int  nDesiredFeatures = 0,
const TImageROI ROI = TImageROI() 
) const [private]

Extract features from the image based on the BCD method.

Parameters:
img The image from where to extract the images.
feats The list of extracted features.
nDesiredFeatures Number of features to be extracted. Default: authomatic.
ROI (op. input) Region of Interest. Default: All the image.

void mrpt::vision::CFeatureExtraction::extractFeaturesKLT ( const CImage img,
CFeatureList feats,
unsigned int  init_ID = 0,
unsigned int  nDesiredFeatures = 0,
const TImageROI ROI = TImageROI() 
) const [private]

Extract features from the image based on the KLT method.

Parameters:
img The image from where to extract the images.
feats The list of extracted features.
nDesiredFeatures Number of features to be extracted. Default: authomatic.
ROI (op. input) Region of Interest. Default: All the image.

void mrpt::vision::CFeatureExtraction::extractFeaturesSIFT ( const CImage img,
CFeatureList feats,
unsigned int  init_ID = 0,
unsigned int  nDesiredFeatures = 0,
const TImageROI ROI = TImageROI() 
) const [private]

Extract features from the image based on the SIFT method.

Parameters:
img The image from where to extract the images.
feats The list of extracted features.
nDesiredFeatures Number of features to be extracted. Default: authomatic.
ROI (op. input) Region of Interest. Default: All the image.

void mrpt::vision::CFeatureExtraction::extractFeaturesSURF ( const CImage img,
CFeatureList feats,
unsigned int  init_ID = 0,
unsigned int  nDesiredFeatures = 0,
const TImageROI ROI = TImageROI() 
) const [private]

Extract features from the image based on the SURF method.

Parameters:
img The image from where to extract the images.
feats The list of extracted features.
nDesiredFeatures Number of features to be extracted. Default: authomatic.
ROI (op. input) Region of Interest. Default: All the image.

void mrpt::vision::CFeatureExtraction::findMoreFeatures ( const CImage img,
const CFeatureList inList,
CFeatureList outList,
unsigned int  nDesiredFeats = 0 
) const

Extract more features from the image (apart from the provided ones) based on the method defined in TOptions.

Parameters:
img (input) The image from where to extract the images.
inList (input) The actual features in the image.
outList (output) The list of new features (containing a patch for each one of them if options.patchsize > 0).
nDesiredFeatures (op. input) Number of features to be extracted. Default: all possible.

double mrpt::vision::CFeatureExtraction::getLaplacianValue ( void *  dog_pyr,
int  octvs,
int  intvls,
float  row,
float  col 
) const [private]

Computes the Laplacian value of the feature in the corresponing image in the pyramid.

Parameters:
dog_pyr Pyramid of images.
octvs Number of considered octaves.
intvls Number of intervales in octaves.
row The row of the feature in the original image.
col The column of the feature in the original image.

void mrpt::vision::CFeatureExtraction::getTimesExtrema ( void *  dog_pyr,
int  octvs,
int  intvls,
float  row,
float  col,
unsigned int &  nMin,
unsigned int &  nMax 
) const [private]

Gets the number of times that a point in the image is higher or lower than the surroundings in the image-scale space.

Parameters:
dog_pyr Pyramid of images.
octvs Number of considered octaves.
intvls Number of intervales in octaves.
row The row of the feature in the original image.
col The column of the feature in the original image.
nMin [out]: Times that the feature is lower than the surroundings.
nMax [out]: Times that the feature is higher than the surroundings.

void mrpt::vision::CFeatureExtraction::insertCvSeqInCFeatureList ( void *  features,
CFeatureList list,
unsigned int  init_ID = 0 
) const [private]

Append a sequence of openCV features into an MRPT feature list.

Parameters:
features The sequence of features.
list [in-out] The list of MRPT features.
init_ID [in] The initial ID for the new features.

void mrpt::vision::CFeatureExtraction::internal_computeLogPolarImageDescriptors ( const CImage in_img,
CFeatureList in_features 
) const [private]

Compute a log-polar image descriptor of the provided features into the input image.

Parameters:
in_img (input) The image from where to compute the descriptors.
in_features (input/output) The list of features whose descriptors are going to be computed.
Note:
Additional parameters from CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this method.

void mrpt::vision::CFeatureExtraction::internal_computePolarImageDescriptors ( const CImage in_img,
CFeatureList in_features 
) const [private]

Compute a polar-image descriptor of the provided features into the input image.

Parameters:
in_img (input) The image from where to compute the descriptors.
in_features (input/output) The list of features whose descriptors are going to be computed.
Note:
Additional parameters from CFeatureExtraction::TOptions::PolarImagesOptions are used in this method.

void mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors ( const CImage in_img,
CFeatureList in_features 
) const [private]

Compute the SIFT descriptor of the provided features into the input image.

Parameters:
in_img (input) The image from where to compute the descriptors.
in_features (input/output) The list of features whose descriptors are going to be computed.
Note:
The SIFT descriptors for already located features can only be computed through the Hess and CSBinary implementations which may be specified in CFeatureExtraction::TOptions::SIFTOptions.

void mrpt::vision::CFeatureExtraction::internal_computeSpinImageDescriptors ( const CImage in_img,
CFeatureList in_features 
) const [private]

Compute the intensity-domain spin images descriptor of the provided features into the input image.

Parameters:
in_img (input) The image from where to compute the descriptors.
in_features (input/output) The list of features whose descriptors are going to be computed.
Note:
Additional parameters from CFeatureExtraction::TOptions::SpinImagesOptions are used in this method.

void mrpt::vision::CFeatureExtraction::internal_computeSurfDescriptors ( const CImage in_img,
CFeatureList in_features 
) const [private]

Compute the SURF descriptor of the provided features into the input image.

Parameters:
in_img (input) The image from where to compute the descriptors.
in_features (input/output) The list of features whose descriptors are going to be computed.

void mrpt::vision::CFeatureExtraction::my_adjust_for_img_dbl ( void *  features  )  const [private]

Adjust scale if the image was initially doubled.

Parameters:
features The sequence of features.

void* mrpt::vision::CFeatureExtraction::my_scale_space_extrema ( CFeatureList featList,
void *  dog_pyr,
int  octvs,
int  intvls,
double  contr_thr,
int  curv_thr,
void *  storage 
) const [private]

Computes extrema in the scale space.

Parameters:
dog_pyr Pyramid of images.
octvs Number of considered octaves.
intvls Number of intervales in octaves.

void mrpt::vision::CFeatureExtraction::selectGoodFeaturesKLT ( const CImage inImg,
CFeatureList feats,
unsigned int  init_ID = 0,
unsigned int  nDesiredFeatures = 0,
void *  mask_ = NULL 
) const [private]

Select good features using the openCV implementation of the KLT method.

Parameters:
img (input) The image from where to select extract the images.
feats (output) A complete list of features (containing a patch for each one of them if options.patchsize > 0).
nDesiredFeatures (op. input) Number of features to be extracted. Default: all possible.
omitPixels (op. input) A mask for determining the ROI. (0: do not omit this pixel, 1: omit this pixel)


Member Data Documentation

Set all the parameters of the desired method here before calling "detectFeatures".

Definition at line 181 of file CFeatureExtraction.h.




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