MRPT  1.9.9
CFeatureExtraction_common.cpp
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+
9  */
10 
11 #include "vision-precomp.h" // Precompiled headers
12 
14 #include <mrpt/system/CTicTac.h>
16 
17 using namespace mrpt;
18 using namespace mrpt::img;
19 using namespace mrpt::vision;
20 using namespace mrpt::img;
21 using namespace mrpt::system;
22 using namespace std;
23 
24 CFeatureExtraction::~CFeatureExtraction() {}
25 struct sort_pred
26 {
27  bool operator()(
28  const std::vector<unsigned int>& left,
29  const std::vector<unsigned int>& right)
30  {
31  return left[1] < right[1];
32  }
33 };
34 
35 /************************************************************************************************
36 * extractFeatures *
37 ************************************************************************************************/
38 void CFeatureExtraction::detectFeatures(
39  const CImage& img, CFeatureList& feats, const unsigned int init_ID,
40  const unsigned int nDesiredFeatures, const TImageROI& ROI) const
41 {
42  switch (options.featsType)
43  {
44  case featHarris:
45  MRPT_TODO(
46  "Refactor: check if OpenCV's tile method can be directly "
47  "called to save space here?")
48  if (options.harrisOptions.tile_image)
49  {
50  mrpt::system::CTicTac tictac;
51 
52  if (!(ROI.xMax == 0 && ROI.xMin == 0 && ROI.yMax == 0 &&
53  ROI.yMin == 0)) // ROI must be not active for this option
54  std::cout << "Warning: Image ROI is not taken into "
55  "account, as harrisOptions.tile is set to YES"
56  << std::endl;
57 
58  TImageROI newROI;
59 
60  unsigned int wd = img.getWidth();
61  unsigned int hg = img.getHeight();
62 
63  unsigned int tt =
64  0; // Total number of features detected in the whole image
65  std::vector<std::vector<unsigned int>> tam(8);
66  std::vector<CFeatureList> aux_feats(
67  8); // 2x4 tiles into the image -> 8 sets of features
68 
69  for (unsigned int k = 0; k < 4;
70  k++) // Search over the 2x4 tiled image
71  {
72  // Resize the inner vector
73  tam[k].resize(2);
74  tam[k + 4].resize(2);
75 
76  // First row
77  newROI.xMin = k * wd / 4.f;
78  newROI.yMin = 0;
79  newROI.xMax = wd / 4.f + k * wd / 4.f - 1;
80  newROI.yMax = hg / 2.f - 1;
81 
82  tictac.Tic();
83  extractFeaturesKLT(
84  img, aux_feats[k], init_ID, nDesiredFeatures, newROI);
85  cout << "Tiempo en extraer una tile: "
86  << tictac.Tac() * 1000.0f << endl;
87 
88  tam[k][0] = k;
89  tam[k][1] = aux_feats[k].size();
90 
91  // Second row
92  newROI.xMin = k * wd / 4;
93  newROI.yMin = hg / 2;
94  newROI.xMax = wd / 4 + k * wd / 4 - 1;
95  newROI.yMax = hg - 1;
96 
97  tictac.Tic();
98  extractFeaturesKLT(
99  img, aux_feats[k + 4], init_ID, nDesiredFeatures,
100  newROI);
101  cout << "Tiempo en extraer una tile: "
102  << tictac.Tac() * 1000.0f << endl;
103 
104  tam[k + 4][0] = k + 4;
105  tam[k + 4][1] = aux_feats[k + 4].size();
106 
107  tt += aux_feats[k].size() + aux_feats[k + 4].size();
108  }
109 
110  // Merge all the features
111  unsigned int new_nDesiredFeatures =
112  nDesiredFeatures <= 0 ? 300 : nDesiredFeatures;
113  unsigned int o_n_per_tile = floor(new_nDesiredFeatures / 8.0f);
114  feats.clear();
115  if (tt > new_nDesiredFeatures) // We have found too many
116  // features, we have to select
117  // them
118  {
119  // Order the size vector
120  std::sort(tam.begin(), tam.end(), sort_pred());
121 
122  if (tam[0][1] > o_n_per_tile) // The smallest subset
123  {
124  // Everything goes right -> Get o_n_per_tile features
125  // from each tile.
126  for (unsigned int m = 0; m < 8; m++)
127  for (unsigned int k = 0; k < o_n_per_tile; k++)
128  feats.push_back(aux_feats[m][k]);
129  }
130  else
131  {
132  std::vector<std::vector<unsigned int>>::iterator
133  itVector;
134  unsigned int n_per_tile = o_n_per_tile;
135 
136  for (itVector = tam.begin(); itVector != tam.end();
137  itVector++)
138  {
139  if ((*itVector)[1] <
140  n_per_tile) // Size of the subset
141  {
142  // We have to distribute the features among the
143  // tiles
144  for (unsigned int k = 0; k < (*itVector)[1];
145  k++)
146  {
147  feats.push_back(
148  aux_feats[(*itVector)[0]][k]);
149  n_per_tile += (n_per_tile - (*itVector)[1]);
150  } // end for
151  } // end if
152  else
153  {
154  for (unsigned int k = 0; k < n_per_tile; k++)
155  {
156  feats.push_back(
157  aux_feats[(*itVector)[0]][k]);
158  n_per_tile = o_n_per_tile;
159  } // end for
160  } // end else
161  } // end for 'itVector'
162  } // end else
163  } // end if tt > nDesiredFeatures
164  else // We have found less features than the desired
165  {
166  CFeatureList::iterator itList;
167  for (unsigned int m = 0; m < 8; m++)
168  for (itList = aux_feats[m].begin();
169  itList != aux_feats[m].end(); itList++)
170  feats.push_back(*itList);
171  ;
172  }
173 
174  } // end if
175 
176  else
177  extractFeaturesKLT(img, feats, init_ID, nDesiredFeatures, ROI);
178  break;
179 
180  case featKLT:
181  extractFeaturesKLT(img, feats, init_ID, nDesiredFeatures, ROI);
182  break;
183 
184  case featSIFT:
185  extractFeaturesSIFT(img, feats, init_ID, nDesiredFeatures, ROI);
186  break;
187 
188  case featBCD:
189  extractFeaturesBCD(img, feats, init_ID, nDesiredFeatures, ROI);
190  break;
191 
192  case featSURF:
193  extractFeaturesSURF(img, feats, init_ID, nDesiredFeatures, ROI);
194  break;
195 
196  case featFAST:
197  extractFeaturesFAST(img, feats, init_ID, nDesiredFeatures, ROI);
198  break;
199 
200  case featFASTER9:
201  extractFeaturesFASTER_N(
202  9, img, feats, init_ID, nDesiredFeatures, ROI);
203  break;
204  case featFASTER10:
205  extractFeaturesFASTER_N(
206  10, img, feats, init_ID, nDesiredFeatures, ROI);
207  break;
208  case featFASTER12:
209  extractFeaturesFASTER_N(
210  12, img, feats, init_ID, nDesiredFeatures, ROI);
211  break;
212 
213  case featORB:
214  extractFeaturesORB(img, feats, init_ID, nDesiredFeatures, ROI);
215  break;
216 
217  // # added by Raghavender Sahdev
218  case featAKAZE:
219  extractFeaturesAKAZE(img, feats, init_ID, nDesiredFeatures, ROI);
220  break;
221  case featLSD:
222  extractFeaturesLSD(img, feats, init_ID, nDesiredFeatures, ROI);
223  break;
224 
225  default:
226  THROW_EXCEPTION("options.method has an invalid value!");
227  break;
228  }
229 }
230 
231 /************************************************************************************************
232  computeDescriptors
233 ************************************************************************************************/
234 void CFeatureExtraction::computeDescriptors(
235  const CImage& in_img, CFeatureList& inout_features,
236  TDescriptorType in_descriptor_list) const
237 {
238  MRPT_START
239 
240  int nDescComputed = 0;
241 
242  if ((in_descriptor_list & descSIFT) != 0)
243  {
244  this->internal_computeSiftDescriptors(in_img, inout_features);
245  ++nDescComputed;
246  }
247  if ((in_descriptor_list & descSURF) != 0)
248  {
249  this->internal_computeSurfDescriptors(in_img, inout_features);
250  ++nDescComputed;
251  }
252  if ((in_descriptor_list & descSpinImages) != 0)
253  {
254  this->internal_computeSpinImageDescriptors(in_img, inout_features);
255  ++nDescComputed;
256  }
257  if ((in_descriptor_list & descPolarImages) != 0)
258  {
259  this->internal_computePolarImageDescriptors(in_img, inout_features);
260  ++nDescComputed;
261  }
262  if ((in_descriptor_list & descLogPolarImages) != 0)
263  {
264  this->internal_computeLogPolarImageDescriptors(in_img, inout_features);
265  ++nDescComputed;
266  }
267  if ((in_descriptor_list & descORB) != 0)
268  {
269  this->internal_computeORBDescriptors(in_img, inout_features);
270  ++nDescComputed;
271  }
272  // # added by Raghavender Sahdev
273  if ((in_descriptor_list & descBLD) != 0)
274  {
275  this->internal_computeBLDLineDescriptors(in_img, inout_features);
276  ++nDescComputed;
277  }
278  if ((in_descriptor_list & descLATCH) != 0)
279  {
280  this->internal_computeLATCHDescriptors(in_img, inout_features);
281  ++nDescComputed;
282  }
283  if (!nDescComputed)
285  "No known descriptor value found in in_descriptor_list=%u",
286  (unsigned)in_descriptor_list)
287 
288  MRPT_END
289 }
290 
291 /************************************************************************************************
292 * extractFeaturesBCD *
293 ************************************************************************************************/
294 void CFeatureExtraction::extractFeaturesBCD(
295  const CImage& img, CFeatureList& feats, unsigned int init_ID,
296  unsigned int nDesiredFeatures, const TImageROI& ROI) const
297 {
299  MRPT_UNUSED_PARAM(feats);
300  MRPT_UNUSED_PARAM(init_ID);
301  MRPT_UNUSED_PARAM(nDesiredFeatures);
302  MRPT_UNUSED_PARAM(ROI);
303 
304  THROW_EXCEPTION("Not implemented yet!");
305 } // end extractFeaturesBCD
306 
307 /*------------------------------------------------------------
308  TOptions()
309 -------------------------------------------------------------*/
310 CFeatureExtraction::TOptions::TOptions(const TFeatureType _featsType)
311  : featsType(_featsType) // Default Method: Kanade-Lucas-Tomasi
312 {
313  // General options
314  patchSize = 21; // Patch size
315  FIND_SUBPIXEL = true; // Find subpixel
316  useMask = false; // Use mask for finding features
317  addNewFeatures = false; // Add to existing feature list
318 
319  // Harris Options
320  harrisOptions.k = 0.04f;
321  harrisOptions.radius = 3; // 15;
323  0.005f; // 0.01f; The lower this is, more features will be found
324  harrisOptions.sigma = 3.0f;
325  harrisOptions.min_distance = 5; // 10;
326  harrisOptions.tile_image = false;
327 
328  // KLT Options
329  KLTOptions.min_distance = 5; // 10;
330  KLTOptions.threshold = 0.1f; // 0.005 ; 0.01f;
331  KLTOptions.radius = 15; // 3;
332  KLTOptions.tile_image = false;
333 
334  // SIFT Options
335  SIFTOptions.implementation = Hess; // Default implementation: Hess
336 
337  // SURF Options
338 
339  // BCD Options
340 
341  // FAST:
342  FASTOptions.threshold = 20;
346 
347  // ORB:
348  ORBOptions.extract_patch = false;
350  ORBOptions.n_levels = 8;
351  ORBOptions.scale_factor = 1.2f;
352 
353  // SpinImages Options:
359 
360  // TPolarImagesOptions
364 
365  // LogPolarImagesOptions
368  16; // Log-Polar image patch will have dimensions WxH, with:
369  // W=num_angles, H= rho_scale * log(radius)
371 
372  // added by Raghavender Sahdev
373  // AKAZEOptions
374  AKAZEOptions.diffusivity = 1; // KAZE::DIFF_PM_G2 maps to 1;
375  // http://docs.opencv.org/trunk/d3/d61/classcv_1_1KAZE.html
378  AKAZEOptions.threshold = 0.001f;
382  5; // AKAZE::DESCRIPTOR_MLDB maps to 5 in open cv;
383  // http://docs.opencv.org/trunk/d8/d30/classcv_1_1AKAZE.html
384 
385  // LSD Options
386  LSDOptions.scale = 2;
387  LSDOptions.nOctaves = 1;
388 
389  // BLD Options
390  // BLDOptions.ksize_ = 11;
394 
395  LATCHOptions.bytes = 32;
398 }
399 
400 /*---------------------------------------------------------------
401  dumpToTextStream
402  ---------------------------------------------------------------*/
404 {
405  out << mrpt::format(
406  "\n----------- [CFeatureExtraction::TOptions] ------------ \n\n");
407 
408  LOADABLEOPTS_DUMP_VAR(featsType, int)
409  LOADABLEOPTS_DUMP_VAR(patchSize, int)
410  LOADABLEOPTS_DUMP_VAR(FIND_SUBPIXEL, bool)
411  LOADABLEOPTS_DUMP_VAR(useMask, bool)
412  LOADABLEOPTS_DUMP_VAR(addNewFeatures, bool)
413 
414  LOADABLEOPTS_DUMP_VAR(harrisOptions.k, double)
415  LOADABLEOPTS_DUMP_VAR(harrisOptions.radius, int)
416  LOADABLEOPTS_DUMP_VAR(harrisOptions.threshold, float)
417  LOADABLEOPTS_DUMP_VAR(harrisOptions.sigma, float)
418  LOADABLEOPTS_DUMP_VAR(harrisOptions.min_distance, float)
419 
420  LOADABLEOPTS_DUMP_VAR(KLTOptions.min_distance, float)
421  LOADABLEOPTS_DUMP_VAR(KLTOptions.threshold, float)
422  LOADABLEOPTS_DUMP_VAR(KLTOptions.radius, int)
423 
424  LOADABLEOPTS_DUMP_VAR(SIFTOptions.implementation, int)
425 
426  LOADABLEOPTS_DUMP_VAR(SURFOptions.rotation_invariant, bool)
427  LOADABLEOPTS_DUMP_VAR(SURFOptions.hessianThreshold, int)
428  LOADABLEOPTS_DUMP_VAR(SURFOptions.nOctaves, int)
429  LOADABLEOPTS_DUMP_VAR(SURFOptions.nLayersPerOctave, int)
430 
431  LOADABLEOPTS_DUMP_VAR(FASTOptions.threshold, int)
432  LOADABLEOPTS_DUMP_VAR(FASTOptions.nonmax_suppression, bool)
433  LOADABLEOPTS_DUMP_VAR(FASTOptions.min_distance, float)
434  LOADABLEOPTS_DUMP_VAR(FASTOptions.use_KLT_response, bool)
435 
436  LOADABLEOPTS_DUMP_VAR(ORBOptions.scale_factor, float)
437  LOADABLEOPTS_DUMP_VAR(ORBOptions.min_distance, int)
438  LOADABLEOPTS_DUMP_VAR(ORBOptions.n_levels, int)
439  LOADABLEOPTS_DUMP_VAR(ORBOptions.extract_patch, bool)
440 
441  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.hist_size_distance, int)
442  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.hist_size_intensity, int)
443  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.radius, int)
444  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.std_dist, float)
445  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.std_intensity, float)
446 
447  LOADABLEOPTS_DUMP_VAR(PolarImagesOptions.bins_angle, int)
448  LOADABLEOPTS_DUMP_VAR(PolarImagesOptions.bins_distance, int)
449  LOADABLEOPTS_DUMP_VAR(PolarImagesOptions.radius, int)
450 
451  LOADABLEOPTS_DUMP_VAR(LogPolarImagesOptions.radius, int)
452  LOADABLEOPTS_DUMP_VAR(LogPolarImagesOptions.num_angles, int)
453  LOADABLEOPTS_DUMP_VAR(LogPolarImagesOptions.rho_scale, double)
454 
455  // # added by Raghavender Sahdev
456  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.descriptor_type, int)
457  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.descriptor_size, int)
458  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.descriptor_channels, int)
459  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.threshold, float)
460  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.nOctaves, int)
461  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.nOctaveLayers, int)
462  LOADABLEOPTS_DUMP_VAR(AKAZEOptions.diffusivity, int)
463 
464  LOADABLEOPTS_DUMP_VAR(LSDOptions.nOctaves, int)
465  LOADABLEOPTS_DUMP_VAR(LSDOptions.scale, int)
466 
467  LOADABLEOPTS_DUMP_VAR(BLDOptions.numOfOctave, int)
468  LOADABLEOPTS_DUMP_VAR(BLDOptions.reductionRatio, int)
469  LOADABLEOPTS_DUMP_VAR(BLDOptions.widthOfBand, int)
470 
471  LOADABLEOPTS_DUMP_VAR(LATCHOptions.bytes, int)
472  LOADABLEOPTS_DUMP_VAR(LATCHOptions.half_ssd_size, int)
473  LOADABLEOPTS_DUMP_VAR(LATCHOptions.rotationInvariance, bool)
474 
475  out << mrpt::format("\n");
476 }
477 
478 /*---------------------------------------------------------------
479  loadFromConfigFile
480  ---------------------------------------------------------------*/
482  const mrpt::config::CConfigFileBase& iniFile, const std::string& section)
483 {
484  featsType = iniFile.read_enum(section, "featsType", featsType);
485 
486  MRPT_LOAD_CONFIG_VAR(patchSize, int, iniFile, section)
487  MRPT_LOAD_CONFIG_VAR(FIND_SUBPIXEL, bool, iniFile, section)
488  MRPT_LOAD_CONFIG_VAR(useMask, bool, iniFile, section)
489  MRPT_LOAD_CONFIG_VAR(addNewFeatures, bool, iniFile, section)
490 
491  // string sect = section;
492  MRPT_LOAD_CONFIG_VAR(harrisOptions.k, double, iniFile, section)
493  MRPT_LOAD_CONFIG_VAR(harrisOptions.radius, int, iniFile, section)
494  MRPT_LOAD_CONFIG_VAR(harrisOptions.threshold, float, iniFile, section)
495  MRPT_LOAD_CONFIG_VAR(harrisOptions.sigma, float, iniFile, section)
496  MRPT_LOAD_CONFIG_VAR(harrisOptions.min_distance, float, iniFile, section)
497 
498  MRPT_LOAD_CONFIG_VAR(KLTOptions.min_distance, float, iniFile, section)
499  MRPT_LOAD_CONFIG_VAR(KLTOptions.threshold, float, iniFile, section)
500  MRPT_LOAD_CONFIG_VAR(KLTOptions.radius, int, iniFile, section)
501 
503  SIFTOptions.implementation, int, TSIFTImplementation, iniFile, section)
504  MRPT_LOAD_CONFIG_VAR(SIFTOptions.threshold, double, iniFile, section)
505  MRPT_LOAD_CONFIG_VAR(SIFTOptions.edgeThreshold, double, iniFile, section)
506 
507  MRPT_LOAD_CONFIG_VAR(SURFOptions.rotation_invariant, bool, iniFile, section)
508  MRPT_LOAD_CONFIG_VAR(SURFOptions.hessianThreshold, int, iniFile, section)
509  MRPT_LOAD_CONFIG_VAR(SURFOptions.nOctaves, int, iniFile, section)
510  MRPT_LOAD_CONFIG_VAR(SURFOptions.nLayersPerOctave, int, iniFile, section)
511 
512  MRPT_LOAD_CONFIG_VAR(FASTOptions.threshold, int, iniFile, section)
513  MRPT_LOAD_CONFIG_VAR(FASTOptions.nonmax_suppression, bool, iniFile, section)
514  MRPT_LOAD_CONFIG_VAR(FASTOptions.min_distance, float, iniFile, section)
515  MRPT_LOAD_CONFIG_VAR(FASTOptions.use_KLT_response, bool, iniFile, section)
516 
517  MRPT_LOAD_CONFIG_VAR(ORBOptions.extract_patch, bool, iniFile, section)
518  MRPT_LOAD_CONFIG_VAR(ORBOptions.min_distance, int, iniFile, section)
519  MRPT_LOAD_CONFIG_VAR(ORBOptions.n_levels, int, iniFile, section)
520  MRPT_LOAD_CONFIG_VAR(ORBOptions.scale_factor, float, iniFile, section)
521 
523  SpinImagesOptions.hist_size_distance, int, iniFile, section)
525  SpinImagesOptions.hist_size_intensity, int, iniFile, section)
526  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.radius, int, iniFile, section)
527  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.std_dist, float, iniFile, section)
529  SpinImagesOptions.std_intensity, float, iniFile, section)
530 
531  MRPT_LOAD_CONFIG_VAR(PolarImagesOptions.bins_angle, int, iniFile, section)
533  PolarImagesOptions.bins_distance, int, iniFile, section)
534  MRPT_LOAD_CONFIG_VAR(PolarImagesOptions.radius, int, iniFile, section)
535 
536  MRPT_LOAD_CONFIG_VAR(LogPolarImagesOptions.radius, int, iniFile, section)
538  LogPolarImagesOptions.num_angles, int, iniFile, section)
540  LogPolarImagesOptions.rho_scale, double, iniFile, section)
541 
542  // #added by Raghavender Sahdev
543  MRPT_LOAD_CONFIG_VAR(AKAZEOptions.descriptor_type, int, iniFile, section)
544  MRPT_LOAD_CONFIG_VAR(AKAZEOptions.descriptor_size, int, iniFile, section)
546  AKAZEOptions.descriptor_channels, int, iniFile, section)
547  MRPT_LOAD_CONFIG_VAR(AKAZEOptions.threshold, float, iniFile, section)
548  MRPT_LOAD_CONFIG_VAR(AKAZEOptions.nOctaves, int, iniFile, section)
549  MRPT_LOAD_CONFIG_VAR(AKAZEOptions.nOctaveLayers, int, iniFile, section)
550  MRPT_LOAD_CONFIG_VAR(AKAZEOptions.diffusivity, int, iniFile, section)
551 
552  MRPT_LOAD_CONFIG_VAR(LSDOptions.nOctaves, int, iniFile, section)
553  MRPT_LOAD_CONFIG_VAR(LSDOptions.scale, int, iniFile, section)
554 
555  MRPT_LOAD_CONFIG_VAR(BLDOptions.numOfOctave, int, iniFile, section)
556  MRPT_LOAD_CONFIG_VAR(BLDOptions.widthOfBand, int, iniFile, section)
557  MRPT_LOAD_CONFIG_VAR(BLDOptions.reductionRatio, int, iniFile, section)
558 
559  MRPT_LOAD_CONFIG_VAR(LATCHOptions.bytes, int, iniFile, section)
560  MRPT_LOAD_CONFIG_VAR(LATCHOptions.half_ssd_size, int, iniFile, section)
562  LATCHOptions.rotationInvariance, bool, iniFile, section)
563 }
double Tac() noexcept
Stops the stopwatch.
Definition: CTicTac.cpp:90
Scalar * iterator
Definition: eigen_plugins.h:26
struct mrpt::vision::CFeatureExtraction::TOptions::TLATCHOptions LATCHOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions FASTOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions LogPolarImagesOptions
#define MRPT_START
Definition: exceptions.h:262
bool useMask
Whether to use a mask for determining the regions where not to look for keypoints (default=false)...
TSIFTImplementation implementation
Default: Hess (OpenCV.
TInternalFeatList::iterator iterator
Definition: CFeature.h:365
LSD detector, OpenCV&#39;s implementation.
#define THROW_EXCEPTION(msg)
Definition: exceptions.h:41
FASTER-9 detector, Edward Rosten&#39;s libcvd implementation optimized for SSE2.
unsigned int radius
for the "soft histogram" (default=20 units [0,255])
double rho_scale
will have dimensions WxH, with: W=num_angles, H= rho_scale * log(radius)
unsigned int num_angles
log polar image is built, in pixel units (default=30 pixels)
A high-performance stopwatch, with typical resolution of nanoseconds.
EIGEN_STRONG_INLINE iterator begin()
Definition: eigen_plugins.h:29
bool FIND_SUBPIXEL
Indicates if subpixel accuracy is desired for the extracted points (only applicable to KLT and Harris...
STL namespace.
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.
bool operator()(const std::vector< unsigned int > &left, const std::vector< unsigned int > &right)
struct mrpt::vision::CFeatureExtraction::TOptions::TORBOptions ORBOptions
float yMin
Y coordinate limits [0,imageHeight)
FAST feature detector, OpenCV&#39;s implementation ("Faster and better: A machine learning approach to...
float std_dist
"distance" axis of the 2D histogram (default=10).
A structure for defining a ROI within an image.
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
"soft histogram" (default=0.4 pixels)
struct mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions SpinImagesOptions
GLint GLvoid * img
Definition: glext.h:3763
Harris border and corner detector [HARRIS].
Scale Invariant Feature Transform [LOWE&#39;04].
float min_distance
(default=5) minimum distance between
unsigned int bins_distance
of the polar image (default=8).
struct mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions PolarImagesOptions
string iniFile(myDataDir+string("benchmark-options.ini"))
FASTER-9 detector, Edward Rosten&#39;s libcvd implementation optimized for SSE2.
Classes for computer vision, detectors, features, etc.
Definition: CCamModel.h:18
FASTER-9 detector, Edward Rosten&#39;s libcvd implementation optimized for SSE2.
struct mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions harrisOptions
Bit-based feature descriptor.
GLsizei const GLchar ** string
Definition: glext.h:4101
A list of visual features, to be used as output by detectors, as input/output by trackers, etc.
Definition: CFeature.h:304
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
void loadFromConfigFile(const mrpt::config::CConfigFileBase &source, const std::string &section) override
This method load the options from a ".ini"-like file or memory-stored string list.
float xMin
X coordinate limits [0,imageWidth)
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
TFeatureType
Types of features - This means that the point has been detected with this algorithm, which is independent of additional descriptors a feature may also have.
#define MRPT_LOAD_CONFIG_VAR( variableName, variableType, configFileObject, sectionNameStr)
An useful macro for loading variables stored in a INI-like file under a key with the same name that t...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define MRPT_TODO(x)
Definition: common.h:129
struct mrpt::vision::CFeatureExtraction::TOptions::TAKAZEOptions AKAZEOptions
struct mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions SIFTOptions
Speeded Up Robust Feature [BAY&#39;06].
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Definition: format.cpp:16
#define MRPT_END
Definition: exceptions.h:266
unsigned int radius
axis of the polar image (default=6).
struct mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions KLTOptions
unsigned int bins_angle
Number of bins in the "angular" axis.
Intensity-domain spin image descriptors.
AKAZE detector, OpenCV&#39;s implementation.
ORB detector and descriptor, OpenCV&#39;s implementation ("ORB: an efficient alternative to SIFT or SU...
void Tic() noexcept
Starts the stopwatch.
Definition: CTicTac.cpp:79
unsigned int patchSize
Size of the patch to extract, or 0 if no patch is desired (default=21).
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
Definition: exceptions.h:43
unsigned int radius
Maximum radius of the area of which the.
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
"intensity" axis of the 2D histogram (default=10).
Kanade-Lucas-Tomasi feature [SHI&#39;94].
#define MRPT_LOAD_CONFIG_VAR_CAST( variableName, variableType, variableTypeCast, configFileObject, sectionNameStr)
void push_back(const CFeature::Ptr &f)
Definition: CFeature.h:398
A class for storing images as grayscale or RGB bitmaps.
Definition: img/CImage.h:130
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
Definition: common.h:186



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020