MRPT  2.0.4
CFeatureExtraction.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in https://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+
9  */
10 #pragma once
11 
12 #include <mrpt/img/CImage.h>
14 #include <mrpt/vision/CFeature.h>
15 #include <mrpt/vision/TKeyPoint.h>
16 #include <mrpt/vision/utils.h>
17 
18 namespace mrpt::vision
19 {
20 /** The central class from which images can be analyzed in search of different
21  *kinds of interest points and descriptors computed for them.
22  * To extract features from an image, create an instance of
23  *CFeatureExtraction,
24  * fill out its CFeatureExtraction::options field, including the algorithm to
25  *use (see
26  * CFeatureExtraction::TOptions::featsType), and call
27  *CFeatureExtraction::detectFeatures.
28  * This will return a set of features of the class mrpt::vision::CFeature,
29  *which include
30  * details for each interest point as well as the desired descriptors and/or
31  *patches.
32  *
33  * By default, a 21x21 patch is extracted for each detected feature. If the
34  *patch is not needed,
35  * set patchSize to 0 in CFeatureExtraction::options
36  *
37  * The implemented <b>detection</b> algorithms are (see
38  *CFeatureExtraction::TOptions::featsType):
39  * - KLT (Kanade-Lucas-Tomasi): A detector (no descriptor vector).
40  * - Harris: A detector (no descriptor vector).
41  * - BCD (Binary Corner Detector): A detector (no descriptor vector) (Not
42  *implemented yet).
43  * - SIFT: An implementation of the SIFT detector and descriptor. The
44  *implemention may be selected with
45  *CFeatureExtraction::TOptions::SIFTOptions::implementation.
46  * - SURF: OpenCV's implementation of SURF detector and descriptor.
47  * - The FAST feature detector (OpenCV's implementation)
48  *
49  * Additionally, given a list of interest points onto an image, the following
50  * <b>descriptors</b> can be computed for each point by calling
51  *CFeatureExtraction::computeDescriptors :
52  * - SIFT descriptor (Lowe's descriptors).
53  * - SURF descriptor (OpenCV's implementation - Requires OpenCV 1.1.0 from
54  *SVN
55  *or later).
56  * - Intensity-domain spin images (SpinImage): Creates a vector descriptor
57  *with the 2D histogram as a single row.
58  * - A circular patch in polar coordinates (Polar images): The matrix
59  *descriptor is a 2D polar image centered at the interest point.
60  * - A log-polar image patch (Log-polar images): The matrix descriptor is
61  *the
62  *2D log-polar image centered at the interest point.
63  *
64  *
65  * \note The descriptor "Intensity-domain spin images" is described in "A
66  *sparse texture representation using affine-invariant regions", S Lazebnik, C
67  *Schmid, J Ponce, 2003 IEEE Computer Society Conference on Computer Vision.
68  * \sa mrpt::vision::CFeature
69  * \ingroup mrptvision_features
70  */
72 {
73  public:
74  /** Timelogger: disabled by default */
76 
78  {
79  LoweBinary = 0 /* obsolete */,
80  CSBinary /* obsolete */,
81  VedaldiBinary /* obsolete */,
82  Hess /* obsolete */,
83  OpenCV /* DEFAULT */
84  };
85 
86  /** The set of parameters for all the detectors & descriptor algorithms */
88  {
89  TOptions() = default;
90  TOptions(const TKeyPointMethod ft) : TOptions() { featsType = ft; }
91 
92  // See base docs
93  void loadFromConfigFile(
95  const std::string& s) override;
96  void dumpToTextStream(std::ostream& out) const override;
97 
98  /** Type of the extracted features */
100 
101  /** Size of the patch to extract, or 0 if no patch is desired
102  * (default=21).
103  */
104  unsigned int patchSize{21};
105 
106  /** Whether to use a mask for determining the regions where not to look
107  * for keypoints (default=false).
108  */
109  bool useMask{false};
110 
111  /** Whether to add the found features to the input feature list or clear
112  * it before adding them (default=false).
113  */
114  bool addNewFeatures{false};
115 
116  /** Indicates if subpixel accuracy is desired for the extracted points
117  * (only applicable to KLT and Harris features)
118  */
119  bool FIND_SUBPIXEL{true};
120 
121  /** KLT Options */
122  struct TKLTOptions
123  {
124  /** size of the block of pixels used */
125  int radius{5};
126  /** (default=0.05f) for rejecting weak local maxima
127  * (with min_eig < threshold*max(eig_image) */
128  float threshold{0.05f};
129  /** minimum distance between features */
130  float min_distance{5.0f};
131  } KLTOptions;
132 
133  /** Harris Options */
135  {
136  /** (default=0.005) for rejecting weak local maxima
137  * (with min_eig < threshold*max(eig_image)) */
138  float threshold{0.005f};
139  /** standard deviation for the gaussian smoothing function */
140  float sigma{3.0f};
141  /** size of the block of pixels used */
142  int radius{3};
143  /** minimum distance between features */
144  float min_distance{5.0f};
145  double k{0.04};
146  } harrisOptions;
147 
148  /** BCD Options */
149  struct TBCDOptions
150  {
151  } BCDOptions;
152 
153  /** FAST Options */
155  {
156  /** default= 20 */
157  int threshold = 20;
158  /** (default=5) minimum distance between features (in pixels) */
159  unsigned int min_distance = 5;
160  /** Default = true */
161  bool nonmax_suppression{true};
162  /** (default=false) If true, use CImage::KLT_response to compute the
163  * response at each point.
164  */
165  bool use_KLT_response{false};
166  /** Used if use_KLT_response==true */
168  } FASTOptions;
169 
170  /** ORB Options */
171  struct TORBOptions
172  {
173  TORBOptions() = default;
174  size_t n_levels{1};
175  size_t min_distance{0};
176  float scale_factor{1.2f};
177  bool extract_patch{false};
178  } ORBOptions;
179 
180  /** SIFT Options */
182  {
183  TSIFTOptions() = default;
185  int octaveLayers{3};
186  double threshold{0.04}; //!< default= 0.04
187  double edgeThreshold{10}; //!< default= 10
188  } SIFTOptions;
189 
190  /** SURF Options */
192  {
193  TSURFOptions() = default;
194 
195  /** Compute the rotation invariant SURF */
196  bool rotation_invariant{true};
198  int nOctaves{2};
200  } SURFOptions;
201 
202  /** SpinImages Options */
204  {
205  /** Number of bins in the "intensity" axis of the 2D histogram
206  * (default=10). */
207  unsigned int hist_size_intensity{10};
208  /** Number of bins in the "distance" axis of the 2D histogram
209  * (default=10).*/
210  unsigned int hist_size_distance{10};
211  /** Standard deviation in "distance", used for the "soft histogram"
212  * (default=0.4 pixels) */
213  float std_dist{.4f};
214  /** Standard deviation in "intensity", used for the "soft histogram"
215  * (default=20 units [0,255]) */
216  float std_intensity{20};
217  /** Maximum radius of the area of which the histogram is built, in
218  * pixel units (default=20 pixels) */
219  unsigned int radius{20};
221 
222  /** PolarImagesOptions options */
224  {
225  /** Number of bins in the "angular" axis of the polar image
226  * (default=8). */
227  unsigned int bins_angle{8};
228  /** Number of bins in the "distance" axis of the polar image
229  * (default=6). */
230  unsigned int bins_distance{6};
231  /** Maximum radius of the area of which the polar image is built, in
232  * pixel units (default=20 pixels) */
233  unsigned int radius{20};
235 
236  /** LogPolarImagesOptions Options
237  */
239  {
240  /** Maximum radius of the area of which the log polar image is
241  * built, in pixel units (default=30 pixels) */
242  unsigned int radius{30};
243  /** (default=16) Log-Polar image patch will have dimensions WxH,
244  * with: W=num_angles, H= rho_scale*log(radius) */
245  unsigned int num_angles{16};
246  /** (default=5) Log-Polar image patch will have dimensions WxH,
247  * with: W=num_angles, H=rho_scale * log(radius) */
248  double rho_scale{5};
250 
251  // # added by Raghavender Sahdev
252  /** AKAZEOptions Options */
254  {
255  /** AKAZE::DESCRIPTOR_MLDB maps to 5 in open cv;
256  * http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE.html */
260  float threshold{0.001f};
261  int nOctaves{4};
263  /** KAZE::DIFF_PM_G2 maps to 1;
264  * http://docs.opencv.org/trunk/d3/d61/classcv_1_1KAZE.html */
265  int diffusivity{1};
266  } AKAZEOptions;
267 
268  /** LSDOptions Options */
269  struct TLSDOptions
270  {
271  int scale{2};
272  int nOctaves{1};
273  } LSDOptions;
274 
275  /** BLDOptions Descriptor Options */
276  struct TBLDOptions
277  {
278  int ksize_{11};
280  int widthOfBand{7};
281  int numOfOctave{1};
282  } BLDOptions;
283 
284  /** LATCHOptions Descriptor */
286  {
287  int bytes{32};
288  bool rotationInvariance{true};
290  } LATCHOptions;
291  };
292 
293  /** Set all the parameters of the desired method here before calling
294  * detectFeatures() */
296 
297  /** Extract features from the image based on the method defined in
298  * TOptions. \param img (input) The image from where to extract the
299  * images. \param feats (output) A complete list of features (containing
300  * a patch for each one of them if options.patchsize > 0). \param
301  * nDesiredFeatures (op. input) Number of features to be extracted.
302  * Default: all possible.
303  *
304  * \sa computeDescriptors
305  */
306  void detectFeatures(
307  const mrpt::img::CImage& img, CFeatureList& feats,
308  const unsigned int init_ID = 0, const unsigned int nDesiredFeatures = 0,
309  const TImageROI& ROI = TImageROI());
310 
311  /** Compute one (or more) descriptors for the given set of interest
312  * points onto the image, which may have been filled out manually or
313  * from \a detectFeatures \param in_img (input) The image from where to
314  * compute the descriptors. \param inout_features (input/output) The
315  * list of features whose descriptors are going to be computed. \param
316  * in_descriptor_list (input) The bitwise OR of one or several
317  * descriptors defined in TDescriptorType.
318  *
319  * Each value in "in_descriptor_list" represents one descriptor to be
320  * computed, for example:
321  * \code
322  * // This call will compute both, SIFT and Spin-Image descriptors
323  * for a list of feature points lstFeats. fext.computeDescriptors(img,
324  * lstFeats, descSIFT | descSpinImages ); \endcode
325  *
326  * \note The SIFT descriptors for already located features can only be
327  * computed through the Hess and
328  * CSBinary implementations which may be specified in
329  * CFeatureExtraction::TOptions::SIFTOptions.
330  *
331  * \note This call will also use additional parameters from \a options
332  */
333  void computeDescriptors(
334  const mrpt::img::CImage& in_img, CFeatureList& inout_features,
335  TDescriptorType in_descriptor_list);
336 
337  private:
338  /** Compute the SIFT descriptor of the provided features into the input
339  image
340  * \param in_img (input) The image from where to compute the descriptors.
341  * \param in_features (input/output) The list of features whose
342  descriptors are going to be computed.
343  *
344  * \note The SIFT descriptors for already located features can only be
345  computed through the Hess and
346  CSBinary implementations which may be specified in
347  CFeatureExtraction::TOptions::SIFTOptions.
348  */
350  const mrpt::img::CImage& in_img, CFeatureList& in_features);
351 
352  /** Compute the SURF descriptor of the provided features into the input
353  * image
354  * \param in_img (input) The image from where to compute the
355  * descriptors. \param in_features (input/output) The list of features
356  * whose descriptors are going to be computed.
357  */
359  const mrpt::img::CImage& in_img, CFeatureList& in_features);
360 
361  /** Compute the ORB descriptor of the provided features into the input
362  * image \param in_img (input) The image from where to compute the
363  * descriptors. \param in_features (input/output) The list of features
364  * whose descriptors are going to be computed.
365  */
367  const mrpt::img::CImage& in_img, CFeatureList& in_features);
368 
369  /** Compute the intensity-domain spin images descriptor of the provided
370  * features into the input image
371  * \param in_img (input) The image from where to compute the
372  * descriptors. \param in_features (input/output) The list of features
373  * whose descriptors are going to be computed.
374  *
375  * \note Additional parameters from
376  * CFeatureExtraction::TOptions::SpinImagesOptions are used in this
377  * method.
378  */
380  const mrpt::img::CImage& in_img, CFeatureList& in_features);
381 
382  /** Compute a polar-image descriptor of the provided features into the
383  * input image \param in_img (input) The image from where to compute the
384  * descriptors. \param in_features (input/output) The list of features
385  * whose descriptors are going to be computed.
386  *
387  * \note Additional parameters from
388  * CFeatureExtraction::TOptions::PolarImagesOptions are used in this
389  * method.
390  */
392  const mrpt::img::CImage& in_img, CFeatureList& in_features);
393 
394  /** Compute a log-polar image descriptor of the provided features into
395  * the input image \param in_img (input) The image from where to compute
396  * the descriptors. \param in_features (input/output) The list of
397  * features whose descriptors are going to be computed.
398  *
399  * \note Additional parameters from
400  * CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this
401  * method.
402  */
404  const mrpt::img::CImage& in_img, CFeatureList& in_features);
405  /** Compute a BLD descriptor of the provided features into the input
406  * image \param in_img (input) The image from where to compute the
407  * descriptors. \param in_features (input/output) The list of features
408  * whose descriptors are going to be computed.
409  *
410  * \note Additional parameters from
411  * CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this
412  * method.
413  */
415  const mrpt::img::CImage& in_img, CFeatureList& in_features);
416  /** Compute a LATCH descriptor of the provided features into the input
417  * image \param in_img (input) The image from where to compute the
418  * descriptors. \param in_features (input/output) The list of features
419  * whose descriptors are going to be computed.
420  *
421  * \note Additional parameters from
422  * CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this
423  * method.
424  */
426  const mrpt::img::CImage& in_img, CFeatureList& in_features);
427 
428  /** Extract features from the image based on the KLT method.
429  * \param img The image from where to extract the images.
430  * \param feats The list of extracted features.
431  * \param nDesiredFeatures Number of features to be extracted. Default:
432  * authomatic.
433  */
434  void extractFeaturesKLT(
435  const mrpt::img::CImage& img, CFeatureList& feats,
436  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
437  const TImageROI& ROI = TImageROI());
438 
439  // ------------------------------------------------------------------------------------
440  // SIFT
441  // ------------------------------------------------------------------------------------
442  /** Extract features from the image based on the SIFT method.
443  * \param img The image from where to extract the images.
444  * \param feats The list of extracted features.
445  * \param nDesiredFeatures Number of features to be extracted. Default:
446  * authomatic.
447  * \param ROI (op. input) Region of Interest. Default: All the image.
448  */
449  void extractFeaturesSIFT(
450  const mrpt::img::CImage& img, CFeatureList& feats,
451  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
452  const TImageROI& ROI = TImageROI());
453 
454  // ------------------------------------------------------------------------------------
455  // ORB
456  // ------------------------------------------------------------------------------------
457  /** Extract features from the image based on the ORB method.
458  * \param img The image from where to extract the images.
459  * \param feats The list of extracted features.
460  * \param nDesiredFeatures Number of features to be extracted. Default:
461  * authomatic.
462  */
463  void extractFeaturesORB(
464  const mrpt::img::CImage& img, CFeatureList& feats,
465  const unsigned int init_ID = 0, const unsigned int nDesiredFeatures = 0,
466  const TImageROI& ROI = TImageROI());
467 
468  // ------------------------------------------------------------------------------------
469  // SURF
470  // ------------------------------------------------------------------------------------
471  /** Extract features from the image based on the SURF method.
472  * \param img The image from where to extract the images.
473  * \param feats The list of extracted features.
474  * \param nDesiredFeatures Number of features to be extracted. Default:
475  * authomatic.
476  */
477  void extractFeaturesSURF(
478  const mrpt::img::CImage& img, CFeatureList& feats,
479  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
480  const TImageROI& ROI = TImageROI());
481 
482  // ------------------------------------------------------------------------------------
483  // FAST
484  // ------------------------------------------------------------------------------------
485  /** Extract features from the image based on the FAST method (OpenCV impl.)
486  * \param img The image from where to extract the images.
487  * \param feats The list of extracted features.
488  * \param nDesiredFeatures Number of features to be extracted. Default:
489  * authomatic.
490  */
491  void extractFeaturesFAST(
492  const mrpt::img::CImage& img, CFeatureList& feats,
493  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0);
494 
495  // # added by Raghavender Sahdev
496  //-------------------------------------------------------------------------------------
497  // AKAZE
498  //-------------------------------------------------------------------------------------
499  /** Extract features from the image based on the AKAZE method.
500  * \param img The image from where to extract the images.
501  * \param feats The list of extracted features.
502  * \param nDesiredFeatures Number of features to be extracted. Default:
503  * authomatic.
504  */
506  const mrpt::img::CImage& inImg, CFeatureList& feats,
507  unsigned int init_ID, unsigned int nDesiredFeatures,
508  const TImageROI& ROI = TImageROI());
509 
510  //-------------------------------------------------------------------------------------
511  // LSD
512  //-------------------------------------------------------------------------------------
513  /** Extract features from the image based on the LSD method.
514  * \param img The image from where to extract the images.
515  * \param feats The list of extracted features.
516  * \param nDesiredFeatures Number of features to be extracted. Default:
517  * authomatic.
518  */
519  void extractFeaturesLSD(
520  const mrpt::img::CImage& inImg, CFeatureList& feats,
521  unsigned int init_ID, unsigned int nDesiredFeatures,
522  const TImageROI& ROI = TImageROI());
523 
524 }; // end of class
525 } // namespace mrpt::vision
mrpt::vision::CFeatureExtraction::internal_computeSurfDescriptors
void internal_computeSurfDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the SURF descriptor of the provided features into the input image.
Definition: CFeatureExtraction_SURF.cpp:158
mrpt::vision::CFeatureExtraction::TOptions::TBCDOptions
BCD Options.
Definition: CFeatureExtraction.h:149
mrpt::vision::CFeatureExtraction::TOptions::KLTOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions KLTOptions
mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions::hist_size_distance
unsigned int hist_size_distance
Number of bins in the "distance" axis of the 2D histogram (default=10).
Definition: CFeatureExtraction.h:210
mrpt::vision::CFeatureExtraction::extractFeaturesFAST
void extractFeaturesFAST(const mrpt::img::CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0)
Extract features from the image based on the FAST method (OpenCV impl.)
Definition: CFeatureExtraction_FAST.cpp:25
mrpt::vision::CFeatureExtraction
The central class from which images can be analyzed in search of different kinds of interest points a...
Definition: CFeatureExtraction.h:71
mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions
PolarImagesOptions options
Definition: CFeatureExtraction.h:223
mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions::edgeThreshold
double edgeThreshold
default= 10
Definition: CFeatureExtraction.h:187
mrpt::vision::featKLT
@ featKLT
Kanade-Lucas-Tomasi feature [SHI'94].
Definition: vision/include/mrpt/vision/types.h:49
mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions::bins_distance
unsigned int bins_distance
Number of bins in the "distance" axis of the polar image (default=6).
Definition: CFeatureExtraction.h:230
mrpt::vision::CFeatureExtraction::extractFeaturesLSD
void extractFeaturesLSD(const mrpt::img::CImage &inImg, CFeatureList &feats, unsigned int init_ID, unsigned int nDesiredFeatures, const TImageROI &ROI=TImageROI())
Extract features from the image based on the LSD method.
Definition: CFeatureExtraction_LSD_BLD.cpp:44
mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions::num_angles
unsigned int num_angles
(default=16) Log-Polar image patch will have dimensions WxH, with: W=num_angles, H= rho_scale*log(rad...
Definition: CFeatureExtraction.h:245
mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions::TSURFOptions
TSURFOptions()=default
mrpt::vision::CFeatureExtraction::TOptions::TORBOptions::TORBOptions
TORBOptions()=default
mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions::ksize_
int ksize_
Definition: CFeatureExtraction.h:278
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::threshold
float threshold
Definition: CFeatureExtraction.h:260
mrpt::vision::CFeatureExtraction::OpenCV
@ OpenCV
Definition: CFeatureExtraction.h:83
mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions::bytes
int bytes
Definition: CFeatureExtraction.h:287
mrpt::vision::CFeatureExtraction::internal_computeSpinImageDescriptors
void internal_computeSpinImageDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the intensity-domain spin images descriptor of the provided features into the input image.
Definition: CFeatureExtraction_spinImg.cpp:24
mrpt::vision::CFeatureExtraction::CSBinary
@ CSBinary
Definition: CFeatureExtraction.h:80
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::descriptor_size
int descriptor_size
Definition: CFeatureExtraction.h:258
mrpt::vision::CFeatureExtraction::extractFeaturesORB
void extractFeaturesORB(const mrpt::img::CImage &img, CFeatureList &feats, const unsigned int init_ID=0, const unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI())
Extract features from the image based on the ORB method.
Definition: CFeatureExtraction_ORB.cpp:24
mrpt::vision::CFeatureExtraction::TOptions::loadFromConfigFile
void loadFromConfigFile(const mrpt::config::CConfigFileBase &c, const std::string &s) override
This method load the options from a ".ini"-like file or memory-stored string list.
Definition: CFeatureExtraction_common.cpp:221
mrpt::system::CTimeLogger
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X),...
Definition: system/CTimeLogger.h:50
mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions
SIFT Options
Definition: CFeatureExtraction.h:181
mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions::nonmax_suppression
bool nonmax_suppression
Default = true.
Definition: CFeatureExtraction.h:161
mrpt::vision::CFeatureExtraction::TOptions::ORBOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TORBOptions ORBOptions
mrpt::vision
Copyright (C) 2010 Hauke Strasdat Imperial College London Copyright (c) 2005-2020,...
Definition: bundle_adjustment.h:35
mrpt::vision::CFeatureExtraction::computeDescriptors
void computeDescriptors(const mrpt::img::CImage &in_img, CFeatureList &inout_features, TDescriptorType in_descriptor_list)
Compute one (or more) descriptors for the given set of interest points onto the image,...
Definition: CFeatureExtraction_common.cpp:86
mrpt::vision::CFeatureExtraction::extractFeaturesKLT
void extractFeaturesKLT(const mrpt::img::CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI())
Extract features from the image based on the KLT method.
Definition: CFeatureExtraction_harris_KLT.cpp:27
mrpt::vision::CFeatureExtraction::TOptions::LSDOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TLSDOptions LSDOptions
mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions::reductionRatio
int reductionRatio
Definition: CFeatureExtraction.h:279
mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions::widthOfBand
int widthOfBand
Definition: CFeatureExtraction.h:280
mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions::threshold
int threshold
default= 20
Definition: CFeatureExtraction.h:157
mrpt::vision::CFeatureExtraction::TOptions::BCDOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TBCDOptions BCDOptions
mrpt::vision::CFeatureExtraction::internal_computeSiftDescriptors
void internal_computeSiftDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the SIFT descriptor of the provided features into the input image.
Definition: CFeatureExtraction_SIFT.cpp:202
mrpt::vision::CFeatureExtraction::TOptions::BLDOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions BLDOptions
mrpt::vision::CFeatureExtraction::TOptions::LATCHOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions LATCHOptions
mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions::implementation
TSIFTImplementation implementation
Default: OpenCV.
Definition: CFeatureExtraction.h:184
mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions::bins_angle
unsigned int bins_angle
Number of bins in the "angular" axis of the polar image (default=8).
Definition: CFeatureExtraction.h:227
mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions::min_distance
float min_distance
minimum distance between features
Definition: CFeatureExtraction.h:130
out
mrpt::vision::TStereoCalibResults out
Definition: chessboard_stereo_camera_calib_unittest.cpp:25
TKeyPoint.h
mrpt::vision::CFeatureExtraction::TOptions::useMask
bool useMask
Whether to use a mask for determining the regions where not to look for keypoints (default=false).
Definition: CFeatureExtraction.h:109
mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions::numOfOctave
int numOfOctave
Definition: CFeatureExtraction.h:281
mrpt::vision::CFeatureExtraction::internal_computeLATCHDescriptors
void internal_computeLATCHDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute a LATCH descriptor of the provided features into the input image.
Definition: CFeatureExtraction_LATCH.cpp:49
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::diffusivity
int diffusivity
KAZE::DIFF_PM_G2 maps to 1; http://docs.opencv.org/trunk/d3/d61/classcv_1_1KAZE.html.
Definition: CFeatureExtraction.h:265
mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions::radius
int radius
size of the block of pixels used
Definition: CFeatureExtraction.h:125
mrpt::vision::CFeatureExtraction::extractFeaturesAKAZE
void extractFeaturesAKAZE(const mrpt::img::CImage &inImg, CFeatureList &feats, unsigned int init_ID, unsigned int nDesiredFeatures, const TImageROI &ROI=TImageROI())
Extract features from the image based on the AKAZE method.
Definition: CFeatureExtraction_AKAZE.cpp:31
mrpt::vision::CFeatureExtraction::TOptions::patchSize
unsigned int patchSize
Size of the patch to extract, or 0 if no patch is desired (default=21).
Definition: CFeatureExtraction.h:104
mrpt::vision::CFeatureExtraction::internal_computeORBDescriptors
void internal_computeORBDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the ORB descriptor of the provided features into the input image.
Definition: CFeatureExtraction_ORB.cpp:229
mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions::radius
unsigned int radius
Maximum radius of the area of which the polar image is built, in pixel units (default=20 pixels)
Definition: CFeatureExtraction.h:233
mrpt::vision::CFeatureExtraction::LoweBinary
@ LoweBinary
Definition: CFeatureExtraction.h:79
mrpt::vision::CFeatureExtraction::TOptions::dumpToTextStream
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form,...
Definition: CFeatureExtraction_common.cpp:144
mrpt::vision::CFeatureExtraction::Hess
@ Hess
Definition: CFeatureExtraction.h:82
mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions::KLT_response_half_win_size
int KLT_response_half_win_size
Used if use_KLT_response==true.
Definition: CFeatureExtraction.h:167
mrpt::vision::CFeatureExtraction::detectFeatures
void detectFeatures(const mrpt::img::CImage &img, CFeatureList &feats, const unsigned int init_ID=0, const unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI())
Extract features from the image based on the method defined in TOptions.
Definition: CFeatureExtraction_common.cpp:37
mrpt::vision::CFeatureExtraction::TOptions::TLSDOptions
LSDOptions Options.
Definition: CFeatureExtraction.h:269
mrpt::vision::CFeatureExtraction::TOptions::TORBOptions::n_levels
size_t n_levels
Definition: CFeatureExtraction.h:174
mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions::radius
unsigned int radius
Maximum radius of the area of which the histogram is built, in pixel units (default=20 pixels)
Definition: CFeatureExtraction.h:219
mrpt::vision::CFeatureList
A list of visual features, to be used as output by detectors, as input/output by trackers,...
Definition: CFeature.h:275
mrpt::vision::TImageROI
A structure for defining a ROI within an image.
Definition: vision/include/mrpt/vision/types.h:325
mrpt::vision::CFeatureExtraction::TOptions::featsType
TKeyPointMethod featsType
Type of the extracted features.
Definition: CFeatureExtraction.h:99
mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions::std_intensity
float std_intensity
Standard deviation in "intensity", used for the "soft histogram" (default=20 units [0,...
Definition: CFeatureExtraction.h:216
mrpt::vision::CFeatureExtraction::extractFeaturesSURF
void extractFeaturesSURF(const mrpt::img::CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI())
Extract features from the image based on the SURF method.
Definition: CFeatureExtraction_SURF.cpp:42
mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions::min_distance
unsigned int min_distance
(default=5) minimum distance between features (in pixels)
Definition: CFeatureExtraction.h:159
mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions::k
double k
Definition: CFeatureExtraction.h:145
mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions::rho_scale
double rho_scale
(default=5) Log-Polar image patch will have dimensions WxH, with: W=num_angles, H=rho_scale * log(rad...
Definition: CFeatureExtraction.h:248
mrpt::vision::CFeatureExtraction::TOptions::AKAZEOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions AKAZEOptions
mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions::octaveLayers
int octaveLayers
Definition: CFeatureExtraction.h:185
mrpt::vision::CFeatureExtraction::TOptions::LogPolarImagesOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions LogPolarImagesOptions
mrpt::vision::CFeatureExtraction::TOptions::TOptions
TOptions()=default
mrpt::vision::CFeatureExtraction::TOptions::TORBOptions
ORB Options.
Definition: CFeatureExtraction.h:171
mrpt::config::CConfigFileBase
This class allows loading and storing values and vectors of different types from a configuration text...
Definition: config/CConfigFileBase.h:44
mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions::nOctaves
int nOctaves
Definition: CFeatureExtraction.h:198
mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions::threshold
float threshold
(default=0.05f) for rejecting weak local maxima (with min_eig < threshold*max(eig_image)
Definition: CFeatureExtraction.h:128
mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions
BLDOptions Descriptor Options.
Definition: CFeatureExtraction.h:276
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::descriptor_type
int descriptor_type
AKAZE::DESCRIPTOR_MLDB maps to 5 in open cv; http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE....
Definition: CFeatureExtraction.h:257
mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions::threshold
double threshold
default= 0.04
Definition: CFeatureExtraction.h:186
mrpt::vision::CFeatureExtraction::TOptions::addNewFeatures
bool addNewFeatures
Whether to add the found features to the input feature list or clear it before adding them (default=f...
Definition: CFeatureExtraction.h:114
mrpt::config::CLoadableOptions
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
Definition: config/CLoadableOptions.h:26
mrpt::vision::CFeatureExtraction::TOptions
The set of parameters for all the detectors & descriptor algorithms.
Definition: CFeatureExtraction.h:87
mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions::radius
unsigned int radius
Maximum radius of the area of which the log polar image is built, in pixel units (default=30 pixels)
Definition: CFeatureExtraction.h:242
mrpt::vision::CFeatureExtraction::TSIFTImplementation
TSIFTImplementation
Definition: CFeatureExtraction.h:77
mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions
FAST Options.
Definition: CFeatureExtraction.h:154
mrpt::vision::CFeatureExtraction::extractFeaturesSIFT
void extractFeaturesSIFT(const mrpt::img::CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI())
Extract features from the image based on the SIFT method.
Definition: CFeatureExtraction_SIFT.cpp:38
mrpt::vision::CFeatureExtraction::TOptions::TORBOptions::extract_patch
bool extract_patch
Definition: CFeatureExtraction.h:177
mrpt::vision::CFeatureExtraction::options
TOptions options
Set all the parameters of the desired method here before calling detectFeatures()
Definition: CFeatureExtraction.h:295
mrpt::vision::CFeatureExtraction::TOptions::FASTOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions FASTOptions
mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions::hessianThreshold
int hessianThreshold
Definition: CFeatureExtraction.h:197
mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions::TSIFTOptions
TSIFTOptions()=default
mrpt::vision::CFeatureExtraction::TOptions::harrisOptions
struct mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions harrisOptions
mrpt::img::CImage
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:148
mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions::nLayersPerOctave
int nLayersPerOctave
Definition: CFeatureExtraction.h:199
mrpt::vision::TKeyPointMethod
TKeyPointMethod
Types of key point detectors.
Definition: vision/include/mrpt/vision/types.h:44
mrpt::vision::CFeatureExtraction::TOptions::FIND_SUBPIXEL
bool FIND_SUBPIXEL
Indicates if subpixel accuracy is desired for the extracted points (only applicable to KLT and Harris...
Definition: CFeatureExtraction.h:119
mrpt::vision::TDescriptorType
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
Definition: vision/include/mrpt/vision/types.h:76
mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions::use_KLT_response
bool use_KLT_response
(default=false) If true, use CImage::KLT_response to compute the response at each point.
Definition: CFeatureExtraction.h:165
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions
AKAZEOptions Options.
Definition: CFeatureExtraction.h:253
mrpt::vision::CFeatureExtraction::TOptions::TLSDOptions::nOctaves
int nOctaves
Definition: CFeatureExtraction.h:272
mrpt::vision::CFeatureExtraction::VedaldiBinary
@ VedaldiBinary
Definition: CFeatureExtraction.h:81
mrpt::vision::CFeatureExtraction::TOptions::PolarImagesOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions PolarImagesOptions
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::descriptor_channels
int descriptor_channels
Definition: CFeatureExtraction.h:259
mrpt::vision::CFeatureExtraction::internal_computeBLDLineDescriptors
void internal_computeBLDLineDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute a BLD descriptor of the provided features into the input image.
Definition: CFeatureExtraction_LSD_BLD.cpp:177
mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions::min_distance
float min_distance
minimum distance between features
Definition: CFeatureExtraction.h:144
mrpt::vision::CFeatureExtraction::TOptions::SURFOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions SURFOptions
mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions::threshold
float threshold
(default=0.005) for rejecting weak local maxima (with min_eig < threshold*max(eig_image))
Definition: CFeatureExtraction.h:138
CTimeLogger.h
mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions::rotation_invariant
bool rotation_invariant
Compute the rotation invariant SURF.
Definition: CFeatureExtraction.h:196
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::nOctaveLayers
int nOctaveLayers
Definition: CFeatureExtraction.h:262
mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions
SURF Options.
Definition: CFeatureExtraction.h:191
mrpt::vision::CFeatureExtraction::profiler
mrpt::system::CTimeLogger profiler
Timelogger: disabled by default.
Definition: CFeatureExtraction.h:75
mrpt::vision::CFeatureExtraction::TOptions::TOptions
TOptions(const TKeyPointMethod ft)
Definition: CFeatureExtraction.h:90
mrpt::vision::CFeatureExtraction::internal_computePolarImageDescriptors
void internal_computePolarImageDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute a polar-image descriptor of the provided features into the input image.
Definition: CFeatureExtraction_polarImg.cpp:27
mrpt::vision::CFeatureExtraction::TOptions::SpinImagesOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions SpinImagesOptions
mrpt::vision::CFeatureExtraction::TOptions::TORBOptions::min_distance
size_t min_distance
Definition: CFeatureExtraction.h:175
mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions
SpinImages Options.
Definition: CFeatureExtraction.h:203
mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions::nOctaves
int nOctaves
Definition: CFeatureExtraction.h:261
mrpt::vision::CFeatureExtraction::TOptions::TORBOptions::scale_factor
float scale_factor
Definition: CFeatureExtraction.h:176
mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions::rotationInvariance
bool rotationInvariance
Definition: CFeatureExtraction.h:288
CImage.h
mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions::std_dist
float std_dist
Standard deviation in "distance", used for the "soft histogram" (default=0.4 pixels)
Definition: CFeatureExtraction.h:213
mrpt::vision::CFeatureExtraction::TOptions::TLSDOptions::scale
int scale
Definition: CFeatureExtraction.h:271
mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions::hist_size_intensity
unsigned int hist_size_intensity
Number of bins in the "intensity" axis of the 2D histogram (default=10).
Definition: CFeatureExtraction.h:207
CFeature.h
mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions
LogPolarImagesOptions Options.
Definition: CFeatureExtraction.h:238
mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions::half_ssd_size
int half_ssd_size
Definition: CFeatureExtraction.h:289
mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions
Harris Options.
Definition: CFeatureExtraction.h:134
mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions::radius
int radius
size of the block of pixels used
Definition: CFeatureExtraction.h:142
mrpt::vision::CFeatureExtraction::TOptions::SIFTOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions SIFTOptions
mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions
KLT Options.
Definition: CFeatureExtraction.h:122
mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions::sigma
float sigma
standard deviation for the gaussian smoothing function
Definition: CFeatureExtraction.h:140
mrpt::vision::CFeatureExtraction::internal_computeLogPolarImageDescriptors
void internal_computeLogPolarImageDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute a log-polar image descriptor of the provided features into the input image.
Definition: CFeatureExtraction_logPolarImg.cpp:23
utils.h
mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions
LATCHOptions Descriptor.
Definition: CFeatureExtraction.h:285



Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sat Jun 27 14:00:59 UTC 2020