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::TOptions::featsType), 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::TOptions::featsType):
Additionally, given a list of interest points onto an image, the following descriptors can be computed for each point by calling CFeatureExtraction::computeDescriptors :
Apart from the normal entry point detectFeatures(), these other low-level static methods are provided for convenience:
Definition at line 59 of file CFeatureExtraction.h.
#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, OpenCV } |
Public Member Functions | |
| CFeatureExtraction () | |
| Constructor. More... | |
| virtual | ~CFeatureExtraction () |
| Virtual destructor. More... | |
| void | detectFeatures (const CImage &img, CFeatureList &feats, const unsigned int init_ID=0, const unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI(), const CMatrixBool *mask=NULL) const |
| Extract features from the image based on the method defined in TOptions. More... | |
| 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. More... | |
| 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. More... | |
Static Public Member Functions | |
Static methods with low-level detector functionality | |
| static void | detectFeatures_SSE2_FASTER9 (const CImage &img, TSimpleFeatureList &corners, const int threshold=20, bool append_to_list=false, uint8_t octave=0, std::vector< size_t > *out_feats_index_by_row=NULL) |
| A SSE2-optimized implementation of FASTER-9 (requires img to be grayscale). More... | |
| static void | detectFeatures_SSE2_FASTER10 (const CImage &img, TSimpleFeatureList &corners, const int threshold=20, bool append_to_list=false, uint8_t octave=0, std::vector< size_t > *out_feats_index_by_row=NULL) |
| Just like detectFeatures_SSE2_FASTER9() for another version of the detector. More... | |
| static void | detectFeatures_SSE2_FASTER12 (const CImage &img, TSimpleFeatureList &corners, const int threshold=20, bool append_to_list=false, uint8_t octave=0, std::vector< size_t > *out_feats_index_by_row=NULL) |
| Just like detectFeatures_SSE2_FASTER9() for another version of the detector. More... | |
Public Attributes | |
| TOptions | options |
| Set all the parameters of the desired method here before calling "detectFeatures". More... | |
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. More... | |
| void | internal_computeSurfDescriptors (const CImage &in_img, CFeatureList &in_features) const |
| Compute the SURF descriptor of the provided features into the input image. More... | |
| void | internal_computeORBDescriptors (const CImage &in_img, CFeatureList &in_features) const |
| Compute the ORB descriptor of the provided features into the input image. More... | |
| 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. More... | |
| void | internal_computePolarImageDescriptors (const CImage &in_img, CFeatureList &in_features) const |
| Compute a polar-image descriptor of the provided features into the input image. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| 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. More... | |
| void | extractFeaturesORB (const CImage &img, CFeatureList &feats, const unsigned int init_ID=0, const unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI(), const CMatrixBool *mask=NULL) const |
| Extract features from the image based on the ORB method. More... | |
| 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. More... | |
| void | extractFeaturesFAST (const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI(), const CMatrixBool *mask=NULL) const |
| Extract features from the image based on the FAST method. More... | |
| void | extractFeaturesFASTER_N (const int N, const CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const |
| Edward's "FASTER & Better" detector, N=9,10,12. More... | |
| 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. More... | |
| void | my_adjust_for_img_dbl (void *features) const |
| Adjust scale if the image was initially doubled. More... | |
| 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. More... | |
| 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. More... | |
| void | insertCvSeqInCFeatureList (void *features, CFeatureList &list, unsigned int init_ID=0) const |
| Append a sequence of openCV features into an MRPT feature list. More... | |
| 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. More... | |
| mrpt::vision::CFeatureExtraction::CFeatureExtraction | ( | ) |
Constructor.
|
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. |
Each value in "in_descriptor_list" represents one descriptor to be computed, for example:
|
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, | ||
| const unsigned int | init_ID = 0, |
||
| const unsigned int | nDesiredFeatures = 0, |
||
| const TImageROI & | ROI = TImageROI(), |
||
| const CMatrixBool * | mask = NULL |
||
| ) | 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. |
|
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. |
|
private |
Extract features from the image based on the FAST 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. |
|
private |
Edward's "FASTER & Better" detector, N=9,10,12.
|
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. |
|
private |
Extract features from the image based on the ORB 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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
private |
Compute the ORB 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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
private |
Adjust scale if the image was initially doubled.
| features | The sequence of features. |
|
private |
Computes extrema in the scale space.
| dog_pyr | Pyramid of images. |
| octvs | Number of considered octaves. |
| intvls | Number of intervales in octaves. |
|
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) |
| TOptions mrpt::vision::CFeatureExtraction::options |
Set all the parameters of the desired method here before calling "detectFeatures".
Definition at line 207 of file CFeatureExtraction.h.
| Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014 |