#include <mrpt/vision/CFeatureExtraction.h>
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. |
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 :
Definition at line 70 of file CFeatureExtraction.h.
Definition at line 73 of file CFeatureExtraction.h.
mrpt::vision::CFeatureExtraction::CFeatureExtraction | ( | ) |
Constructor.
virtual mrpt::vision::CFeatureExtraction::~CFeatureExtraction | ( | ) | [virtual] |
Virtual destructor.
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.
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. |
// This call will compute both, SIFT and Spin-Image descriptors for a list of feature points lstFeats. fext.computeDescriptors(img, lstFeats, descSIFT | descSpinImages );
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.
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.
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. |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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::internal_computePolarImageDescriptors | ( | const CImage & | in_img, | |
CFeatureList & | in_features | |||
) | const [private] |
Compute a polar-image descriptor of the provided features into the input image.
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::internal_computeSiftDescriptors | ( | const CImage & | in_img, | |
CFeatureList & | in_features | |||
) | const [private] |
Compute the SIFT descriptor of the provided features into the input image.
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::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.
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::internal_computeSurfDescriptors | ( | const CImage & | in_img, | |
CFeatureList & | in_features | |||
) | const [private] |
Compute the SURF descriptor of the provided features into the input image.
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.
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.
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.
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) |
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.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:10:56 EDT 2009 |