MRPT  1.9.9
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-2019, 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  * - The FASTER (9,10,12) detectors (Edward Rosten's libcvd implementation
49  *optimized for SSE2).
50  *
51  * Additionally, given a list of interest points onto an image, the following
52  * <b>descriptors</b> can be computed for each point by calling
53  *CFeatureExtraction::computeDescriptors :
54  * - SIFT descriptor (Lowe's descriptors).
55  * - SURF descriptor (OpenCV's implementation - Requires OpenCV 1.1.0 from
56  *SVN
57  *or later).
58  * - Intensity-domain spin images (SpinImage): Creates a vector descriptor
59  *with the 2D histogram as a single row.
60  * - A circular patch in polar coordinates (Polar images): The matrix
61  *descriptor is a 2D polar image centered at the interest point.
62  * - A log-polar image patch (Log-polar images): The matrix descriptor is
63  *the
64  *2D log-polar image centered at the interest point.
65  *
66  *
67  * Apart from the normal entry point \a detectFeatures(), these other
68  *low-level static methods are provided for convenience:
69  * - CFeatureExtraction::detectFeatures_SSE2_FASTER9()
70  * - CFeatureExtraction::detectFeatures_SSE2_FASTER10()
71  * - CFeatureExtraction::detectFeatures_SSE2_FASTER12()
72  *
73  * \note The descriptor "Intensity-domain spin images" is described in "A
74  *sparse texture representation using affine-invariant regions", S Lazebnik, C
75  *Schmid, J Ponce, 2003 IEEE Computer Society Conference on Computer Vision.
76  * \sa mrpt::vision::CFeature
77  * \ingroup mrptvision_features
78  */
80 {
81  public:
82  /** Timelogger: disabled by default */
84 
86  {
87  LoweBinary = 0 /* obsolete */,
88  CSBinary /* obsolete */,
89  VedaldiBinary /* obsolete */,
90  Hess /* obsolete */,
91  OpenCV /* DEFAULT */
92  };
93 
94  /** The set of parameters for all the detectors & descriptor algorithms */
96  {
97  TOptions() = default;
98  TOptions(const TKeyPointMethod ft) : TOptions() { featsType = ft; }
99 
100  // See base docs
101  void loadFromConfigFile(
103  const std::string& s) override;
104  void dumpToTextStream(std::ostream& out) const override;
105 
106  /** Type of the extracted features */
108 
109  /** Size of the patch to extract, or 0 if no patch is desired
110  * (default=21).
111  */
112  unsigned int patchSize{21};
113 
114  /** Whether to use a mask for determining the regions where not to look
115  * for keypoints (default=false).
116  */
117  bool useMask{false};
118 
119  /** Whether to add the found features to the input feature list or clear
120  * it before adding them (default=false).
121  */
122  bool addNewFeatures{false};
123 
124  /** Indicates if subpixel accuracy is desired for the extracted points
125  * (only applicable to KLT and Harris features)
126  */
127  bool FIND_SUBPIXEL{true};
128 
129  /** KLT Options */
130  struct TKLTOptions
131  {
132  /** size of the block of pixels used */
133  int radius{5};
134  /** (default=0.05f) for rejecting weak local maxima
135  * (with min_eig < threshold*max(eig_image) */
136  float threshold{0.05f};
137  /** minimum distance between features */
138  float min_distance{5.0f};
139  } KLTOptions;
140 
141  /** Harris Options */
143  {
144  /** (default=0.005) for rejecting weak local maxima
145  * (with min_eig < threshold*max(eig_image)) */
146  float threshold{0.005f};
147  /** standard deviation for the gaussian smoothing function */
148  float sigma{3.0f};
149  /** size of the block of pixels used */
150  int radius{3};
151  /** minimum distance between features */
152  float min_distance{5.0f};
153  double k{0.04};
154  } harrisOptions;
155 
156  /** BCD Options */
157  struct TBCDOptions
158  {
159  } BCDOptions;
160 
161  /** FAST and FASTER Options */
163  {
164  /** default= 20 */
165  int threshold{20};
166  /** (default=5) minimum distance between features (in pixels) */
168  /** Default = true */
169  bool nonmax_suppression{true};
170  /** (default=false) If true, use CImage::KLT_response to compute the
171  * response at each point.
172  */
173  bool use_KLT_response{false};
174  /** Used if use_KLT_response==true */
176  } FASTOptions;
177 
178  /** ORB Options */
179  struct TORBOptions
180  {
181  TORBOptions() = default;
182  size_t n_levels{1};
183  size_t min_distance{0};
184  float scale_factor{1.2f};
185  bool extract_patch{false};
186  } ORBOptions;
187 
188  /** SIFT Options */
190  {
191  TSIFTOptions() = default;
193  int octaveLayers{3};
194  double threshold{0.04}; //!< default= 0.04
195  double edgeThreshold{10}; //!< default= 10
196  } SIFTOptions;
197 
198  /** SURF Options */
200  {
201  TSURFOptions() = default;
202 
203  /** Compute the rotation invariant SURF */
204  bool rotation_invariant{true};
206  int nOctaves{2};
208  } SURFOptions;
209 
210  /** SpinImages Options */
212  {
213  /** Number of bins in the "intensity" axis of the 2D histogram
214  * (default=10). */
215  unsigned int hist_size_intensity{10};
216  /** Number of bins in the "distance" axis of the 2D histogram
217  * (default=10).*/
218  unsigned int hist_size_distance{10};
219  /** Standard deviation in "distance", used for the "soft histogram"
220  * (default=0.4 pixels) */
221  float std_dist{.4f};
222  /** Standard deviation in "intensity", used for the "soft histogram"
223  * (default=20 units [0,255]) */
224  float std_intensity{20};
225  /** Maximum radius of the area of which the histogram is built, in
226  * pixel units (default=20 pixels) */
227  unsigned int radius{20};
229 
230  /** PolarImagesOptions options */
232  {
233  /** Number of bins in the "angular" axis of the polar image
234  * (default=8). */
235  unsigned int bins_angle{8};
236  /** Number of bins in the "distance" axis of the polar image
237  * (default=6). */
238  unsigned int bins_distance{6};
239  /** Maximum radius of the area of which the polar image is built, in
240  * pixel units (default=20 pixels) */
241  unsigned int radius{20};
243 
244  /** LogPolarImagesOptions Options
245  */
247  {
248  /** Maximum radius of the area of which the log polar image is
249  * built, in pixel units (default=30 pixels) */
250  unsigned int radius{30};
251  /** (default=16) Log-Polar image patch will have dimensions WxH,
252  * with: W=num_angles, H= rho_scale*log(radius) */
253  unsigned int num_angles{16};
254  /** (default=5) Log-Polar image patch will have dimensions WxH,
255  * with: W=num_angles, H=rho_scale * log(radius) */
256  double rho_scale{5};
258 
259  // # added by Raghavender Sahdev
260  /** AKAZEOptions Options */
262  {
263  /** AKAZE::DESCRIPTOR_MLDB maps to 5 in open cv;
264  * http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE.html */
268  float threshold{0.001f};
269  int nOctaves{4};
271  /** KAZE::DIFF_PM_G2 maps to 1;
272  * http://docs.opencv.org/trunk/d3/d61/classcv_1_1KAZE.html */
273  int diffusivity{1};
274  } AKAZEOptions;
275 
276  /** LSDOptions Options */
277  struct TLSDOptions
278  {
279  int scale{2};
280  int nOctaves{1};
281  } LSDOptions;
282 
283  /** BLDOptions Descriptor Options */
284  struct TBLDOptions
285  {
286  int ksize_{11};
288  int widthOfBand{7};
289  int numOfOctave{1};
290  } BLDOptions;
291 
292  /** LATCHOptions Descriptor */
294  {
295  int bytes{32};
296  bool rotationInvariance{true};
298  } LATCHOptions;
299  };
300 
301  /** Set all the parameters of the desired method here before calling
302  * detectFeatures() */
304 
305  /** Extract features from the image based on the method defined in
306  * TOptions. \param img (input) The image from where to extract the
307  * images. \param feats (output) A complete list of features (containing
308  * a patch for each one of them if options.patchsize > 0). \param
309  * nDesiredFeatures (op. input) Number of features to be extracted.
310  * Default: all possible.
311  *
312  * \sa computeDescriptors
313  */
314  void detectFeatures(
315  const mrpt::img::CImage& img, CFeatureList& feats,
316  const unsigned int init_ID = 0, const unsigned int nDesiredFeatures = 0,
317  const TImageROI& ROI = TImageROI());
318 
319  /** Compute one (or more) descriptors for the given set of interest
320  * points onto the image, which may have been filled out manually or
321  * from \a detectFeatures \param in_img (input) The image from where to
322  * compute the descriptors. \param inout_features (input/output) The
323  * list of features whose descriptors are going to be computed. \param
324  * in_descriptor_list (input) The bitwise OR of one or several
325  * descriptors defined in TDescriptorType.
326  *
327  * Each value in "in_descriptor_list" represents one descriptor to be
328  * computed, for example:
329  * \code
330  * // This call will compute both, SIFT and Spin-Image descriptors
331  * for a list of feature points lstFeats. fext.computeDescriptors(img,
332  * lstFeats, descSIFT | descSpinImages ); \endcode
333  *
334  * \note The SIFT descriptors for already located features can only be
335  * computed through the Hess and
336  * CSBinary implementations which may be specified in
337  * CFeatureExtraction::TOptions::SIFTOptions.
338  *
339  * \note This call will also use additional parameters from \a options
340  */
341  void computeDescriptors(
342  const mrpt::img::CImage& in_img, CFeatureList& inout_features,
343  TDescriptorType in_descriptor_list);
344 
345  /** @name Static methods with low-level detector functionality
346  @{ */
347 
348  /** A SSE2-optimized implementation of FASTER-9 (requires img to be
349  * grayscale). If SSE2 is not available, it gratefully falls back to a
350  * non-optimized version.
351  *
352  * Only the pt.{x,y} fields are filled out for each feature: the rest
353  * of fields are left <b>uninitialized</b> and their content is
354  * <b>undefined</b>.
355  * Note that (x,y) are already scaled to the 0-level image coordinates
356  * if octave>0, by means of:
357  *
358  * \code
359  * pt.x = detected.x << octave;
360  * pt.y = detected.y << octave;
361  * \endcode
362  *
363  * If \a append_to_list is true, the \a corners list is not cleared
364  * before adding the newly detected feats.
365  *
366  * If a valid pointer is provided for \a out_feats_index_by_row, upon
367  * return you will find a vector with
368  * as many entries as rows in the image (the real number of rows,
369  * disregarding the value of \a octave).
370  * The number in each entry is the 0-based index (in \a corners) of
371  * the first feature that falls in that line of the image. This index
372  * can be used to fasten looking for correspondences.
373  *
374  * \ingroup mrptvision_features
375  */
376  static void detectFeatures_SSE2_FASTER9(
377  const mrpt::img::CImage& img, TKeyPointList& corners,
378  const int threshold = 20, bool append_to_list = false,
379  uint8_t octave = 0,
380  std::vector<size_t>* out_feats_index_by_row = nullptr);
381 
382  /** Just like \a detectFeatures_SSE2_FASTER9() for another version of
383  * the detector. \ingroup mrptvision_features */
384  static void detectFeatures_SSE2_FASTER10(
385  const mrpt::img::CImage& img, TKeyPointList& corners,
386  const int threshold = 20, bool append_to_list = false,
387  uint8_t octave = 0,
388  std::vector<size_t>* out_feats_index_by_row = nullptr);
389 
390  /** Just like \a detectFeatures_SSE2_FASTER9() for another version of
391  * the detector. \ingroup mrptvision_features */
392  static void detectFeatures_SSE2_FASTER12(
393  const mrpt::img::CImage& img, TKeyPointList& corners,
394  const int threshold = 20, bool append_to_list = false,
395  uint8_t octave = 0,
396  std::vector<size_t>* out_feats_index_by_row = nullptr);
397 
398  /** @} */
399 
400  private:
401  /** Compute the SIFT descriptor of the provided features into the input
402  image
403  * \param in_img (input) The image from where to compute the descriptors.
404  * \param in_features (input/output) The list of features whose
405  descriptors are going to be computed.
406  *
407  * \note The SIFT descriptors for already located features can only be
408  computed through the Hess and
409  CSBinary implementations which may be specified in
410  CFeatureExtraction::TOptions::SIFTOptions.
411  */
413  const mrpt::img::CImage& in_img, CFeatureList& in_features);
414 
415  /** Compute the SURF descriptor of the provided features into the input
416  * image
417  * \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  */
422  const mrpt::img::CImage& in_img, CFeatureList& in_features);
423 
424  /** Compute the ORB descriptor of the provided features into the input
425  * image \param in_img (input) The image from where to compute the
426  * descriptors. \param in_features (input/output) The list of features
427  * whose descriptors are going to be computed.
428  */
430  const mrpt::img::CImage& in_img, CFeatureList& in_features);
431 
432  /** Compute the intensity-domain spin images descriptor of the provided
433  * features into the input image
434  * \param in_img (input) The image from where to compute the
435  * descriptors. \param in_features (input/output) The list of features
436  * whose descriptors are going to be computed.
437  *
438  * \note Additional parameters from
439  * CFeatureExtraction::TOptions::SpinImagesOptions are used in this
440  * method.
441  */
443  const mrpt::img::CImage& in_img, CFeatureList& in_features);
444 
445  /** Compute a polar-image descriptor of the provided features into the
446  * input image \param in_img (input) The image from where to compute the
447  * descriptors. \param in_features (input/output) The list of features
448  * whose descriptors are going to be computed.
449  *
450  * \note Additional parameters from
451  * CFeatureExtraction::TOptions::PolarImagesOptions are used in this
452  * method.
453  */
455  const mrpt::img::CImage& in_img, CFeatureList& in_features);
456 
457  /** Compute a log-polar image descriptor of the provided features into
458  * the input image \param in_img (input) The image from where to compute
459  * the descriptors. \param in_features (input/output) The list of
460  * features whose descriptors are going to be computed.
461  *
462  * \note Additional parameters from
463  * CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this
464  * method.
465  */
467  const mrpt::img::CImage& in_img, CFeatureList& in_features);
468  /** Compute a BLD descriptor of the provided features into the input
469  * image \param in_img (input) The image from where to compute the
470  * descriptors. \param in_features (input/output) The list of features
471  * whose descriptors are going to be computed.
472  *
473  * \note Additional parameters from
474  * CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this
475  * method.
476  */
478  const mrpt::img::CImage& in_img, CFeatureList& in_features);
479  /** Compute a LATCH descriptor of the provided features into the input
480  * image \param in_img (input) The image from where to compute the
481  * descriptors. \param in_features (input/output) The list of features
482  * whose descriptors are going to be computed.
483  *
484  * \note Additional parameters from
485  * CFeatureExtraction::TOptions::LogPolarImagesOptions are used in this
486  * method.
487  */
489  const mrpt::img::CImage& in_img, CFeatureList& in_features);
490 
491  /** Extract features from the image based on the KLT method.
492  * \param img The image from where to extract the images.
493  * \param feats The list of extracted features.
494  * \param nDesiredFeatures Number of features to be extracted. Default:
495  * authomatic.
496  */
497  void extractFeaturesKLT(
498  const mrpt::img::CImage& img, CFeatureList& feats,
499  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
500  const TImageROI& ROI = TImageROI());
501 
502  // ------------------------------------------------------------------------------------
503  // SIFT
504  // ------------------------------------------------------------------------------------
505  /** Extract features from the image based on the SIFT method.
506  * \param img The image from where to extract the images.
507  * \param feats The list of extracted features.
508  * \param nDesiredFeatures Number of features to be extracted. Default:
509  * authomatic.
510  * \param ROI (op. input) Region of Interest. Default: All the image.
511  */
512  void extractFeaturesSIFT(
513  const mrpt::img::CImage& img, CFeatureList& feats,
514  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
515  const TImageROI& ROI = TImageROI());
516 
517  // ------------------------------------------------------------------------------------
518  // ORB
519  // ------------------------------------------------------------------------------------
520  /** Extract features from the image based on the ORB method.
521  * \param img The image from where to extract the images.
522  * \param feats The list of extracted features.
523  * \param nDesiredFeatures Number of features to be extracted. Default:
524  * authomatic.
525  */
526  void extractFeaturesORB(
527  const mrpt::img::CImage& img, CFeatureList& feats,
528  const unsigned int init_ID = 0, const unsigned int nDesiredFeatures = 0,
529  const TImageROI& ROI = TImageROI());
530 
531  // ------------------------------------------------------------------------------------
532  // SURF
533  // ------------------------------------------------------------------------------------
534  /** Extract features from the image based on the SURF method.
535  * \param img The image from where to extract the images.
536  * \param feats The list of extracted features.
537  * \param nDesiredFeatures Number of features to be extracted. Default:
538  * authomatic.
539  */
540  void extractFeaturesSURF(
541  const mrpt::img::CImage& img, CFeatureList& feats,
542  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
543  const TImageROI& ROI = TImageROI());
544 
545  // ------------------------------------------------------------------------------------
546  // FAST
547  // ------------------------------------------------------------------------------------
548  /** Extract features from the image based on the FAST method (OpenCV impl.)
549  * \param img The image from where to extract the images.
550  * \param feats The list of extracted features.
551  * \param nDesiredFeatures Number of features to be extracted. Default:
552  * authomatic.
553  */
554  void extractFeaturesFAST(
555  const mrpt::img::CImage& img, CFeatureList& feats,
556  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0);
557 
558  /** Edward's "FASTER & Better" detector, N=9,10,12. (libCVD impl.) */
560  const int N, const mrpt::img::CImage& img, CFeatureList& feats,
561  unsigned int init_ID = 0, unsigned int nDesiredFeatures = 0,
562  const TImageROI& ROI = TImageROI());
563 
564  // # added by Raghavender Sahdev
565  //-------------------------------------------------------------------------------------
566  // AKAZE
567  //-------------------------------------------------------------------------------------
568  /** Extract features from the image based on the AKAZE method.
569  * \param img The image from where to extract the images.
570  * \param feats The list of extracted features.
571  * \param nDesiredFeatures Number of features to be extracted. Default:
572  * authomatic.
573  */
575  const mrpt::img::CImage& inImg, CFeatureList& feats,
576  unsigned int init_ID, unsigned int nDesiredFeatures,
577  const TImageROI& ROI = TImageROI());
578 
579  //-------------------------------------------------------------------------------------
580  // LSD
581  //-------------------------------------------------------------------------------------
582  /** Extract features from the image based on the LSD method.
583  * \param img The image from where to extract the images.
584  * \param feats The list of extracted features.
585  * \param nDesiredFeatures Number of features to be extracted. Default:
586  * authomatic.
587  */
588  void extractFeaturesLSD(
589  const mrpt::img::CImage& inImg, CFeatureList& feats,
590  unsigned int init_ID, unsigned int nDesiredFeatures,
591  const TImageROI& ROI = TImageROI());
592 
593 }; // end of class
594 } // namespace mrpt::vision
bool rotation_invariant
Compute the rotation invariant SURF.
struct mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions LATCHOptions
void internal_computeSiftDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the SIFT descriptor of the provided features into the input image.
struct mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions FASTOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions LogPolarImagesOptions
int descriptor_type
AKAZE::DESCRIPTOR_MLDB maps to 5 in open cv; http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE.html.
float threshold
(default=0.005) for rejecting weak local maxima (with min_eig < threshold*max(eig_image)) ...
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.
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.
bool useMask
Whether to use a mask for determining the regions where not to look for keypoints (default=false)...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
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.
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:6604
unsigned int radius
Maximum radius of the area of which the histogram is built, in pixel units (default=20 pixels) ...
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.
double rho_scale
(default=5) Log-Polar image patch will have dimensions WxH, with: W=num_angles, H=rho_scale * log(rad...
unsigned int num_angles
(default=16) Log-Polar image patch will have dimensions WxH, with: W=num_angles, H= rho_scale*log(rad...
TOptions options
Set all the parameters of the desired method here before calling detectFeatures() ...
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.
bool FIND_SUBPIXEL
Indicates if subpixel accuracy is desired for the extracted points (only applicable to KLT and Harris...
The set of parameters for all the detectors & descriptor algorithms.
struct mrpt::vision::CFeatureExtraction::TOptions::TBLDOptions BLDOptions
void dumpToTextStream(std::ostream &out) const override
This method should clearly display all the contents of the structure in textual form, sending it to a std::ostream.
GLdouble s
Definition: glext.h:3682
bool use_KLT_response
(default=false) If true, use CImage::KLT_response to compute the response at each point...
void internal_computeSurfDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the SURF descriptor of the provided features into the input image.
struct mrpt::vision::CFeatureExtraction::TOptions::TORBOptions ORBOptions
static void detectFeatures_SSE2_FASTER10(const mrpt::img::CImage &img, TKeyPointList &corners, const int threshold=20, bool append_to_list=false, uint8_t octave=0, std::vector< size_t > *out_feats_index_by_row=nullptr)
Just like detectFeatures_SSE2_FASTER9() for another version of the detector.
unsigned char uint8_t
Definition: rptypes.h:44
float std_dist
Standard deviation in "distance", used for the "soft histogram" (default=0.4 pixels) ...
A structure for defining a ROI within an image.
float min_distance
minimum distance between features
struct mrpt::vision::CFeatureExtraction::TOptions::TLSDOptions LSDOptions
This class allows loading and storing values and vectors of different types from a configuration text...
float std_intensity
Standard deviation in "intensity", used for the "soft histogram" (default=20 units [0...
struct mrpt::vision::CFeatureExtraction::TOptions::TBCDOptions BCDOptions
mrpt::system::CTimeLogger profiler
Timelogger: disabled by default.
struct mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions SpinImagesOptions
const GLubyte * c
Definition: glext.h:6406
GLint GLvoid * img
Definition: glext.h:3769
float min_distance
(default=5) minimum distance between features (in pixels)
unsigned int bins_distance
Number of bins in the "distance" axis of the polar image (default=6).
struct mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions PolarImagesOptions
float min_distance
minimum distance between features
TKeyPointMethod
Types of key point detectors.
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
void internal_computeORBDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute the ORB descriptor of the provided features into the input image.
Classes for computer vision, detectors, features, etc.
Definition: CDifodo.h:17
float threshold
(default=0.05f) for rejecting weak local maxima (with min_eig < threshold*max(eig_image) ...
struct mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions harrisOptions
TKeyPointMethod featsType
Type of the extracted features.
void internal_computeLATCHDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute a LATCH descriptor of the provided features into the input image.
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.
GLsizei const GLchar ** string
Definition: glext.h:4116
A list of visual features, to be used as output by detectors, as input/output by trackers, etc.
Definition: CFeature.h:275
void extractFeaturesFASTER_N(const int N, const mrpt::img::CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI())
Edward&#39;s "FASTER & Better" detector, N=9,10,12.
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.
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.
int diffusivity
KAZE::DIFF_PM_G2 maps to 1; http://docs.opencv.org/trunk/d3/d61/classcv_1_1KAZE.html.
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.
struct mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions AKAZEOptions
float sigma
standard deviation for the gaussian smoothing function
A versatile "profiler" that logs the time spent within each pair of calls to enter(X)-leave(X), among other stats.
struct mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions SIFTOptions
unsigned int hist_size_intensity
Number of bins in the "intensity" axis of the 2D histogram (default=10).
unsigned int radius
Maximum radius of the area of which the polar image is built, in pixel units (default=20 pixels) ...
struct mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions KLTOptions
void internal_computeBLDLineDescriptors(const mrpt::img::CImage &in_img, CFeatureList &in_features)
Compute a BLD descriptor of the provided features into the input image.
Kanade-Lucas-Tomasi feature [SHI&#39;94].
static void detectFeatures_SSE2_FASTER9(const mrpt::img::CImage &img, TKeyPointList &corners, const int threshold=20, bool append_to_list=false, uint8_t octave=0, std::vector< size_t > *out_feats_index_by_row=nullptr)
A SSE2-optimized implementation of FASTER-9 (requires img to be grayscale).
unsigned int bins_angle
Number of bins in the "angular" axis of the polar image (default=8).
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.
int KLT_response_half_win_size
Used if use_KLT_response==true.
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.)
unsigned int patchSize
Size of the patch to extract, or 0 if no patch is desired (default=21).
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...
static void detectFeatures_SSE2_FASTER12(const mrpt::img::CImage &img, TKeyPointList &corners, const int threshold=20, bool append_to_list=false, uint8_t octave=0, std::vector< size_t > *out_feats_index_by_row=nullptr)
Just like detectFeatures_SSE2_FASTER9() for another version of the detector.
unsigned int radius
Maximum radius of the area of which the log polar image is built, in pixel units (default=30 pixels) ...
bool addNewFeatures
Whether to add the found features to the input feature list or clear it before adding them (default=f...
unsigned int hist_size_distance
Number of bins in the "distance" axis of the 2D histogram (default=10).
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, which may have been filled out manually or from detectFeatures.
struct mrpt::vision::CFeatureExtraction::TOptions::TSURFOptions SURFOptions
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:147
The central class from which images can be analyzed in search of different kinds of interest points a...



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019