Main MRPT website > C++ reference for MRPT 1.5.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-2017, 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 #include "vision-precomp.h" // Precompiled headers
11 
13 #include <mrpt/utils/CTicTac.h>
14 #include <mrpt/utils/CStream.h>
15 
16 using namespace mrpt;
17 using namespace mrpt::vision;
18 using namespace mrpt::utils;
19 using namespace mrpt::system;
20 using namespace std;
21 
22 
23 /************************************************************************************************
24 * Constructor *
25 ************************************************************************************************/
27 {
28 }
29 
30 /************************************************************************************************
31 * Destructor *
32 ************************************************************************************************/
34 {
35 }
36 
37 struct sort_pred {
38  bool operator()(const std::vector<unsigned int> &left, const std::vector<unsigned int> &right) {
39  return left[1] < right[1];
40  }
41 };
42 
43 /************************************************************************************************
44 * extractFeatures *
45 ************************************************************************************************/
47  const CImage & img,
48  CFeatureList & feats,
49  const unsigned int init_ID,
50  const unsigned int nDesiredFeatures,
51  const TImageROI & ROI) const
52 {
53  switch( options.featsType )
54  {
55  case featHarris:
56  MRPT_TODO("Refactor: check if OpenCV's tile method can be directly called to save space here?")
57  if( options.harrisOptions.tile_image )
58  {
59  mrpt::utils::CTicTac tictac;
60 
61  if( !( ROI.xMax == 0 && ROI.xMin == 0 && ROI.yMax == 0 && ROI.yMin == 0 ) ) // ROI must be not active for this option
62  std::cout << "Warning: Image ROI is not taken into account, as harrisOptions.tile is set to YES" << std::endl;
63 
64  TImageROI newROI;
65 
66  unsigned int wd = img.getWidth();
67  unsigned int hg = img.getHeight();
68 
69  unsigned int tt = 0; // Total number of features detected in the whole image
70  std::vector<std::vector<unsigned int> > tam( 8 );
71  std::vector<CFeatureList> aux_feats( 8 ); // 2x4 tiles into the image -> 8 sets of features
72 
73  for( unsigned int k = 0; k < 4; k++ ) // Search over the 2x4 tiled image
74  {
75  // Resize the inner vector
76  tam[k].resize(2);
77  tam[k+4].resize(2);
78 
79  // First row
80  newROI.xMin = k*wd/4.f;
81  newROI.yMin = 0;
82  newROI.xMax = wd/4.f + k*wd/4.f - 1;
83  newROI.yMax = hg/2.f - 1;
84 
85  tictac.Tic();
86  extractFeaturesKLT( img, aux_feats[k], init_ID, nDesiredFeatures, newROI );
87  cout << "Tiempo en extraer una tile: " << tictac.Tac()*1000.0f << endl;
88 
89  tam[k][0] = k;
90  tam[k][1] = aux_feats[k].size();
91 
92  // Second row
93  newROI.xMin = k*wd/4;
94  newROI.yMin = hg/2;
95  newROI.xMax = wd/4 + k*wd/4 - 1;
96  newROI.yMax = hg-1;
97 
98  tictac.Tic();
99  extractFeaturesKLT( img, aux_feats[k+4], init_ID, nDesiredFeatures, newROI );
100  cout << "Tiempo en extraer una tile: " << tictac.Tac()*1000.0f << endl;
101 
102  tam[k+4][0] = k+4;
103  tam[k+4][1] = aux_feats[k+4].size();
104 
105  tt += aux_feats[k].size() + aux_feats[k+4].size();
106  }
107 
108  // Merge all the features
109  unsigned int new_nDesiredFeatures = nDesiredFeatures <= 0 ? 300 : nDesiredFeatures;
110  unsigned int o_n_per_tile = floor( new_nDesiredFeatures/8.0f );
111  feats.clear();
112  if( tt > new_nDesiredFeatures ) // We have found too many features, we have to select them
113  {
114  // Order the size vector
115  std::sort(tam.begin(), tam.end(), sort_pred());
116 
117  if( tam[0][1] > o_n_per_tile ) // The smallest subset
118  {
119  // Everything goes right -> Get o_n_per_tile features from each tile.
120  for( unsigned int m = 0; m < 8; m++ )
121  for( unsigned int k = 0; k < o_n_per_tile; k++ )
122  feats.push_back( aux_feats[m][k] );
123  }
124  else
125  {
126  std::vector<std::vector<unsigned int> >::iterator itVector;
127  unsigned int n_per_tile = o_n_per_tile;
128 
129  for( itVector = tam.begin(); itVector != tam.end(); itVector++ )
130  {
131  if( (*itVector)[1] < n_per_tile ) // Size of the subset
132  {
133  // We have to distribute the features among the tiles
134  for(unsigned int k = 0; k < (*itVector)[1]; k++)
135  {
136  feats.push_back( aux_feats[(*itVector)[0]][k] );
137  n_per_tile += (n_per_tile - (*itVector)[1]);
138  } // end for
139  } // end if
140  else
141  {
142  for(unsigned int k = 0; k < n_per_tile; k++)
143  {
144  feats.push_back( aux_feats[(*itVector)[0]][k] );
145  n_per_tile = o_n_per_tile;
146  } // end for
147  } // end else
148  } // end for 'itVector'
149  } // end else
150  } // end if tt > nDesiredFeatures
151  else // We have found less features than the desired
152  {
153  CFeatureList::iterator itList;
154  for( unsigned int m = 0; m < 8; m++ )
155  for( itList = aux_feats[m].begin(); itList != aux_feats[m].end(); itList++ )
156  feats.push_back( *itList );;
157  }
158 
159  } // end if
160 
161  else
162  extractFeaturesKLT(img, feats, init_ID, nDesiredFeatures, ROI);
163  break;
164 
165  case featKLT:
166  extractFeaturesKLT(img, feats, init_ID, nDesiredFeatures, ROI);
167  break;
168 
169  case featSIFT:
170  extractFeaturesSIFT(img, feats, init_ID, nDesiredFeatures, ROI);
171  break;
172 
173  case featBCD:
174  extractFeaturesBCD(img, feats, init_ID, nDesiredFeatures, ROI);
175  break;
176 
177  case featSURF:
178  extractFeaturesSURF(img, feats, init_ID, nDesiredFeatures, ROI);
179  break;
180 
181  case featFAST:
182  extractFeaturesFAST(img, feats, init_ID, nDesiredFeatures, ROI);
183  break;
184 
185  case featFASTER9:
186  extractFeaturesFASTER_N(9,img, feats, init_ID, nDesiredFeatures, ROI);
187  break;
188  case featFASTER10:
189  extractFeaturesFASTER_N(10,img, feats, init_ID, nDesiredFeatures, ROI);
190  break;
191  case featFASTER12:
192  extractFeaturesFASTER_N(12,img, feats, init_ID, nDesiredFeatures, ROI);
193  break;
194 
195  case featORB:
196  extractFeaturesORB( img, feats, init_ID, nDesiredFeatures, ROI );
197  break;
198 
199  default:
200  THROW_EXCEPTION("options.method has an invalid value!");
201  break;
202  }
203 }
204 
205 /************************************************************************************************
206  computeDescriptors
207 ************************************************************************************************/
209  const CImage &in_img,
210  CFeatureList &inout_features,
211  TDescriptorType in_descriptor_list) const
212 {
213  MRPT_START
214 
215  int nDescComputed = 0;
216 
217  if ((in_descriptor_list & descSIFT) != 0)
218  {
219  this->internal_computeSiftDescriptors(in_img,inout_features);
220  ++nDescComputed;
221  }
222  if ((in_descriptor_list & descSURF) != 0)
223  {
224  this->internal_computeSurfDescriptors(in_img,inout_features);
225  ++nDescComputed;
226  }
227  if ((in_descriptor_list & descSpinImages) != 0)
228  {
229  this->internal_computeSpinImageDescriptors(in_img,inout_features);
230  ++nDescComputed;
231  }
232  if ((in_descriptor_list & descPolarImages) != 0)
233  {
234  this->internal_computePolarImageDescriptors(in_img,inout_features);
235  ++nDescComputed;
236  }
237  if ((in_descriptor_list & descLogPolarImages) != 0)
238  {
239  this->internal_computeLogPolarImageDescriptors(in_img,inout_features);
240  ++nDescComputed;
241  }
242  if ((in_descriptor_list & descORB) != 0)
243  {
244  this->internal_computeORBDescriptors(in_img,inout_features);
245  ++nDescComputed;
246  }
247 
248  if (!nDescComputed)
249  THROW_EXCEPTION_FMT("No known descriptor value found in in_descriptor_list=%u",(unsigned)in_descriptor_list)
250 
251  MRPT_END
252 }
253 
254 /************************************************************************************************
255 * extractFeaturesBCD *
256 ************************************************************************************************/
258  const CImage &img,
259  CFeatureList &feats,
260  unsigned int init_ID,
261  unsigned int nDesiredFeatures,
262  const TImageROI &ROI) const
263 {
265  MRPT_UNUSED_PARAM(feats);
266  MRPT_UNUSED_PARAM(init_ID);
267  MRPT_UNUSED_PARAM(nDesiredFeatures);
268  MRPT_UNUSED_PARAM(ROI);
269 
270  THROW_EXCEPTION("Not implemented yet!");
271 } // end extractFeaturesBCD
272 
273 
274 
275 /*------------------------------------------------------------
276  TOptions()
277 -------------------------------------------------------------*/
279  featsType ( _featsType) // Default Method: Kanade-Lucas-Tomasi
280 {
281  // General options
282  patchSize = 21; // Patch size
283  FIND_SUBPIXEL = true; // Find subpixel
284  useMask = false; // Use mask for finding features
285  addNewFeatures = false; // Add to existing feature list
286 
287  // Harris Options
288  harrisOptions.k = 0.04f;
289  harrisOptions.radius = 3; //15;
290  harrisOptions.threshold = 0.005f; //0.01f; The lower this is, more features will be found
291  harrisOptions.sigma = 3.0f;
292  harrisOptions.min_distance = 5; //10;
293  harrisOptions.tile_image = false;
294 
295  // KLT Options
296  KLTOptions.min_distance = 5; //10;
297  KLTOptions.threshold = 0.1f; //0.005 ; 0.01f;
298  KLTOptions.radius = 15; //3;
299  KLTOptions.tile_image = false;
300 
301  // SIFT Options
302  SIFTOptions.implementation = Hess; // Default implementation: Hess
303 
304  // SURF Options
305 
306  // BCD Options
307 
308  // FAST:
309  FASTOptions.threshold = 20;
313 
314  // ORB:
315  ORBOptions.extract_patch = false;
317  ORBOptions.n_levels = 8;
318  ORBOptions.scale_factor = 1.2f;
319 
320  // SpinImages Options:
326 
327  // TPolarImagesOptions
331 
332  // LogPolarImagesOptions
334  LogPolarImagesOptions.num_angles = 16; // Log-Polar image patch will have dimensions WxH, with: W=num_angles, H= rho_scale * log(radius)
336 
337 }
338 
339 /*---------------------------------------------------------------
340  dumpToTextStream
341  ---------------------------------------------------------------*/
343 {
344  out.printf("\n----------- [CFeatureExtraction::TOptions] ------------ \n\n");
345 
346  LOADABLEOPTS_DUMP_VAR(featsType,int)
347  LOADABLEOPTS_DUMP_VAR(patchSize, int)
348  LOADABLEOPTS_DUMP_VAR(FIND_SUBPIXEL, bool)
349  LOADABLEOPTS_DUMP_VAR(useMask, bool)
350  LOADABLEOPTS_DUMP_VAR(addNewFeatures, bool)
351 
352  LOADABLEOPTS_DUMP_VAR(harrisOptions.k,double)
353  LOADABLEOPTS_DUMP_VAR(harrisOptions.radius,int)
354  LOADABLEOPTS_DUMP_VAR(harrisOptions.threshold,float)
355  LOADABLEOPTS_DUMP_VAR(harrisOptions.sigma,float)
356  LOADABLEOPTS_DUMP_VAR(harrisOptions.min_distance,float)
357 
358  LOADABLEOPTS_DUMP_VAR(KLTOptions.min_distance,float)
359  LOADABLEOPTS_DUMP_VAR(KLTOptions.threshold,float)
360  LOADABLEOPTS_DUMP_VAR(KLTOptions.radius,int)
361 
362  LOADABLEOPTS_DUMP_VAR(SIFTOptions.implementation,int)
363 
364  LOADABLEOPTS_DUMP_VAR(SURFOptions.rotation_invariant,bool)
365  LOADABLEOPTS_DUMP_VAR(SURFOptions.hessianThreshold,int)
366  LOADABLEOPTS_DUMP_VAR(SURFOptions.nOctaves,int)
367  LOADABLEOPTS_DUMP_VAR(SURFOptions.nLayersPerOctave,int)
368 
369  LOADABLEOPTS_DUMP_VAR(FASTOptions.threshold,int)
370  LOADABLEOPTS_DUMP_VAR(FASTOptions.nonmax_suppression,bool)
371  LOADABLEOPTS_DUMP_VAR(FASTOptions.min_distance,float)
372  LOADABLEOPTS_DUMP_VAR(FASTOptions.use_KLT_response,bool)
373 
374  LOADABLEOPTS_DUMP_VAR(ORBOptions.scale_factor,float)
375  LOADABLEOPTS_DUMP_VAR(ORBOptions.min_distance,int)
376  LOADABLEOPTS_DUMP_VAR(ORBOptions.n_levels,int)
377  LOADABLEOPTS_DUMP_VAR(ORBOptions.extract_patch,bool)
378 
379  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.hist_size_distance,int)
380  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.hist_size_intensity,int)
381  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.radius,int)
382  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.std_dist,float)
383  LOADABLEOPTS_DUMP_VAR(SpinImagesOptions.std_intensity,float)
384 
385  LOADABLEOPTS_DUMP_VAR(PolarImagesOptions.bins_angle,int)
386  LOADABLEOPTS_DUMP_VAR(PolarImagesOptions.bins_distance,int)
387  LOADABLEOPTS_DUMP_VAR(PolarImagesOptions.radius,int)
388 
389  LOADABLEOPTS_DUMP_VAR(LogPolarImagesOptions.radius,int)
390  LOADABLEOPTS_DUMP_VAR(LogPolarImagesOptions.num_angles,int)
391  LOADABLEOPTS_DUMP_VAR(LogPolarImagesOptions.rho_scale,double)
392 
393  out.printf("\n");
394 }
395 
396 /*---------------------------------------------------------------
397  loadFromConfigFile
398  ---------------------------------------------------------------*/
400  const mrpt::utils::CConfigFileBase &iniFile,
401  const std::string &section)
402 {
403  MRPT_LOAD_CONFIG_VAR_CAST(featsType, int, TFeatureType, iniFile,section)
404  MRPT_LOAD_CONFIG_VAR(patchSize, int, iniFile, section)
405  MRPT_LOAD_CONFIG_VAR(FIND_SUBPIXEL, bool, iniFile, section)
406  MRPT_LOAD_CONFIG_VAR(useMask, bool, iniFile, section)
407  MRPT_LOAD_CONFIG_VAR(addNewFeatures, bool, iniFile, section)
408 
409  //string sect = section;
410  MRPT_LOAD_CONFIG_VAR(harrisOptions.k,double, iniFile,section)
411  MRPT_LOAD_CONFIG_VAR(harrisOptions.radius,int, iniFile,section)
412  MRPT_LOAD_CONFIG_VAR(harrisOptions.threshold,float, iniFile,section)
413  MRPT_LOAD_CONFIG_VAR(harrisOptions.sigma,float, iniFile,section)
414  MRPT_LOAD_CONFIG_VAR(harrisOptions.min_distance,float, iniFile,section)
415 
416  MRPT_LOAD_CONFIG_VAR(KLTOptions.min_distance,float, iniFile,section)
417  MRPT_LOAD_CONFIG_VAR(KLTOptions.threshold,float, iniFile,section)
418  MRPT_LOAD_CONFIG_VAR(KLTOptions.radius,int, iniFile,section)
419 
420  MRPT_LOAD_CONFIG_VAR_CAST(SIFTOptions.implementation,int,TSIFTImplementation, iniFile,section)
421  MRPT_LOAD_CONFIG_VAR(SIFTOptions.threshold,double, iniFile,section)
422  MRPT_LOAD_CONFIG_VAR(SIFTOptions.edgeThreshold,double, iniFile,section)
423 
424  MRPT_LOAD_CONFIG_VAR(SURFOptions.rotation_invariant,bool, iniFile,section)
425  MRPT_LOAD_CONFIG_VAR(SURFOptions.hessianThreshold,int, iniFile,section)
426  MRPT_LOAD_CONFIG_VAR(SURFOptions.nOctaves,int, iniFile,section)
427  MRPT_LOAD_CONFIG_VAR(SURFOptions.nLayersPerOctave,int, iniFile,section)
428 
429  MRPT_LOAD_CONFIG_VAR(FASTOptions.threshold,int, iniFile,section)
430  MRPT_LOAD_CONFIG_VAR(FASTOptions.nonmax_suppression,bool, iniFile,section)
431  MRPT_LOAD_CONFIG_VAR(FASTOptions.min_distance,float, iniFile,section)
432  MRPT_LOAD_CONFIG_VAR(FASTOptions.use_KLT_response,bool, iniFile,section)
433 
434  MRPT_LOAD_CONFIG_VAR(ORBOptions.extract_patch,bool, iniFile,section)
435  MRPT_LOAD_CONFIG_VAR(ORBOptions.min_distance,int, iniFile,section)
436  MRPT_LOAD_CONFIG_VAR(ORBOptions.n_levels,int, iniFile,section)
437  MRPT_LOAD_CONFIG_VAR(ORBOptions.scale_factor,float, iniFile,section)
438 
439  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.hist_size_distance,int, iniFile,section)
440  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.hist_size_intensity,int, iniFile,section)
441  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.radius,int, iniFile,section)
442  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.std_dist,float, iniFile,section)
443  MRPT_LOAD_CONFIG_VAR(SpinImagesOptions.std_intensity,float, iniFile,section)
444 
445  MRPT_LOAD_CONFIG_VAR(PolarImagesOptions.bins_angle,int, iniFile,section)
446  MRPT_LOAD_CONFIG_VAR(PolarImagesOptions.bins_distance,int, iniFile,section)
447  MRPT_LOAD_CONFIG_VAR(PolarImagesOptions.radius,int, iniFile,section)
448 
449  MRPT_LOAD_CONFIG_VAR(LogPolarImagesOptions.radius,int, iniFile,section)
450  MRPT_LOAD_CONFIG_VAR(LogPolarImagesOptions.num_angles,int, iniFile,section)
451  MRPT_LOAD_CONFIG_VAR(LogPolarImagesOptions.rho_scale,double, iniFile,section)
452 
453 }
454 
void loadFromConfigFile(const mrpt::utils::CConfigFileBase &source, const std::string &section) MRPT_OVERRIDE
This method load the options from a ".ini"-like file or memory-stored string list.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
Definition: zip.h:16
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TFASTOptions FASTOptions
bool useMask
Whether to use a mask for determining the regions where not to look for keypoints (default=false)...
TSIFTImplementation implementation
Default: Hess (OpenCV should be preferred, but its nonfree module is not always available by default ...
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TPolarImagesOptions PolarImagesOptions
This namespace provides a OS-independent interface to many useful functions: filenames manipulation...
Definition: math_frwds.h:29
FASTER-9 detector, Edward Rosten&#39;s libcvd implementation optimized for SSE2.
A class for storing images as grayscale or RGB bitmaps.
Definition: CImage.h:101
unsigned int radius
Maximum radius of the area of which the histogram is built, in pixel units (default=20 pixels) ...
#define THROW_EXCEPTION(msg)
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TLogPolarImagesOptions LogPolarImagesOptions
void detectFeatures(const mrpt::utils::CImage &img, CFeatureList &feats, const unsigned int init_ID=0, const unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
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(ra...
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
Scalar * iterator
Definition: eigen_plugins.h:23
#define LOADABLEOPTS_DUMP_VAR(variableName, variableType)
Macro for dumping a variable to a stream, within the method "dumpToTextStream(out)" (Variable types a...
unsigned int num_angles
(default=16) Log-Polar image patch will have dimensions WxH, with: W=num_angles, H= rho_scale * log(r...
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TSIFTOptions SIFTOptions
EIGEN_STRONG_INLINE iterator begin()
Definition: eigen_plugins.h:26
bool FIND_SUBPIXEL
Indicates if subpixel accuracy is desired for the extracted points (only applicable to KLT and Harris...
STL namespace.
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TSpinImagesOptions SpinImagesOptions
void Tic()
Starts the stopwatch.
Definition: CTicTac.cpp:77
TOptions(const TFeatureType featsType=featKLT)
Initalizer.
bool use_KLT_response
(default=false) If true, use CImage::KLT_response to compute the response at each point instead of th...
bool operator()(const std::vector< unsigned int > &left, const std::vector< unsigned int > &right)
#define MRPT_TODO(x)
This class allows loading and storing values and vectors of different types from a configuration text...
float yMin
Y coordinate limits [0,imageHeight)
FAST feature detector, OpenCV&#39;s implementation ("Faster and better: A machine learning approach to co...
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.
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::THarrisOptions harrisOptions
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
virtual ~CFeatureExtraction()
Virtual destructor.
float std_intensity
Standard deviation in "intensity", used for the "soft histogram" (default=20 units [0...
void dumpToTextStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
#define MRPT_END
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
GLint GLvoid * img
Definition: glext.h:3645
Harris border and corner detector [HARRIS].
#define MRPT_LOAD_CONFIG_VAR_CAST(variableName, variableType, variableTypeCast, configFileObject, sectionNameStr)
Scale Invariant Feature Transform [LOWE&#39;04].
float min_distance
(default=5) minimum distance between features (in pixels)
This class implements a high-performance stopwatch.
Definition: CTicTac.h:24
unsigned int bins_distance
Number of bins in the "distance" axis of the polar image (default=6).
FASTER-9 detector, Edward Rosten&#39;s libcvd implementation optimized for SSE2.
Classes for computer vision, detectors, features, etc.
void push_back(const CFeaturePtr &f)
Definition: CFeature.h:285
FASTER-9 detector, Edward Rosten&#39;s libcvd implementation optimized for SSE2.
Bit-based feature descriptor.
GLsizei const GLchar ** string
Definition: glext.h:3919
A list of visual features, to be used as output by detectors, as input/output by trackers, etc.
Definition: CFeature.h:211
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
float xMin
X coordinate limits [0,imageWidth)
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_START
#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.
Speeded Up Robust Feature [BAY&#39;06].
unsigned int radius
Maximum radius of the area of which the polar image is built, in pixel units (default=20 pixels) ...
void computeDescriptors(const mrpt::utils::CImage &in_img, CFeatureList &inout_features, TDescriptorType in_descriptor_list) const
Compute one (or more) descriptors for the given set of interest points onto the image, which may have been filled out manually or from detectFeatures.
double Tac()
Stops the stopwatch.
Definition: CTicTac.cpp:92
TInternalFeatList::iterator iterator
Definition: CFeature.h:261
unsigned int bins_angle
Number of bins in the "angular" axis of the polar image (default=8).
Intensity-domain spin image descriptors.
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TKLTOptions KLTOptions
ORB detector and descriptor, OpenCV&#39;s implementation ("ORB: an efficient alternative to SIFT or SURF"...
void extractFeaturesBCD(const mrpt::utils::CImage &img, CFeatureList &feats, unsigned int init_ID=0, unsigned int nDesiredFeatures=0, const TImageROI &ROI=TImageROI()) const
Extract features from the image based on the BCD method.
unsigned int patchSize
Size of the patch to extract, or 0 if no patch is desired (default=21).
struct VISION_IMPEXP mrpt::vision::CFeatureExtraction::TOptions::TORBOptions ORBOptions
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).
Kanade-Lucas-Tomasi feature [SHI&#39;94].
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.
Definition: CStream.cpp:507



Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020