Main MRPT website > C++ reference
MRPT logo
vision/include/mrpt/vision/types.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2014, 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 #ifndef mrpt_vision_types_H
11 #define mrpt_vision_types_H
12 
14 #include <mrpt/utils/CImage.h>
18 
20 
21 namespace mrpt
22 {
23  namespace vision
24  {
25  /** \addtogroup mrpt_vision_grp
26  * @{ */
28 
29  typedef uint64_t TFeatureID; //!< Definition of a feature ID
30 
31  typedef uint64_t TLandmarkID; //!< Unique IDs for landmarks
32  typedef uint64_t TCameraPoseID; //!< Unique IDs for camera frames (poses)
33 
34  typedef mrpt::aligned_containers<TCameraPoseID,mrpt::poses::CPose3D>::map_t TFramePosesMap; //!< A list of camera frames (6D poses) indexed by unique IDs.
35  typedef mrpt::aligned_containers<mrpt::poses::CPose3D>::vector_t TFramePosesVec; //!< A list of camera frames (6D poses), which assumes indexes are unique, consecutive IDs.
36 
37  typedef std::map<TLandmarkID,mrpt::math::TPoint3D> TLandmarkLocationsMap; //!< A list of landmarks (3D points) indexed by unique IDs.
38  typedef std::vector<mrpt::math::TPoint3D> TLandmarkLocationsVec; //!< A list of landmarks (3D points), which assumes indexes are unique, consecutive IDs.
39 
40 
41  /** 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
42  */
44  {
45  featNotDefined = -1, //!< Non-defined feature (also used for Occupancy features)
46  featKLT = 0, //!< Kanade-Lucas-Tomasi feature [SHI'94]
47  featHarris, //!< Harris border and corner detector [HARRIS]
48  featBCD, //!< Binary corder detector
49  featSIFT, //!< Scale Invariant Feature Transform [LOWE'04]
50  featSURF, //!< Speeded Up Robust Feature [BAY'06]
51  featBeacon, //!< A especial case: this is not an image feature, but a 2D/3D beacon (used for range-only SLAM from mrpt::slam::CLandmark)
52  featFAST, //!< FAST feature detector, OpenCV's implementation ("Faster and better: A machine learning approach to corner detection", E. Rosten, R. Porter and T. Drummond, PAMI, 2009).
53  featFASTER9, //!< FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
54  featFASTER10, //!< FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
55  featFASTER12, //!< FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
56  featORB //!< ORB detector and descriptor, OpenCV's implementation ("ORB: an efficient alternative to SIFT or SURF", E. Rublee, V. Rabaud, K. Konolige, G. Bradski, ICCV, 2012).
57  };
58 
59  /** The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescriptors to indicate which descriptors are to be computed for features.
60  */
62  {
63  descAny = 0, //!< Used in some methods to mean "any of the present descriptors"
64  descSIFT = 1, //!< SIFT descriptors
65  descSURF = 2, //!< SURF descriptors
66  descSpinImages = 4, //!< Intensity-domain spin image descriptors
67  descPolarImages = 8, //!< Polar image descriptor
68  descLogPolarImages = 16, //!< Log-Polar image descriptor
69  descORB = 32 //!< Bit-based feature descriptor
70  };
71 
73  {
74  // Init value
75  status_IDLE = 0, //!< Inactive (right after detection, and before being tried to track)
76 
77  // Ok:
78  status_TRACKED = 5, //!< Feature correctly tracked
79 
80  // Bad:
81  status_OOB = 1, //!< Feature fell Out Of Bounds (out of the image limits, too close to image borders)
82  status_LOST = 10 //!< Unable to track this feature (mismatch is too high for the given tracking window: lack of texture? oclussion?)
83  };
84 
85 
86  /** One feature observation entry, used within sequences with TSequenceFeatureObservations */
88  {
89  inline TFeatureObservation() { }
90  inline TFeatureObservation(const TLandmarkID _id_feature, const TCameraPoseID _id_frame, const mrpt::utils::TPixelCoordf _px) : id_feature(_id_feature), id_frame(_id_frame), px(_px) { }
91 
92  TLandmarkID id_feature; //!< A unique ID of this feature
93  TCameraPoseID id_frame; //!< A unique ID of a "frame" (camera position) from where the feature was observed.
94  mrpt::utils::TPixelCoordf px; //!< The pixel coordinates of the observed feature
95  };
96 
97  /** One relative feature observation entry, used with some relative bundle-adjustment functions.
98  */
100  {
101  inline TRelativeFeaturePos() { }
102  inline TRelativeFeaturePos(const mrpt::vision::TCameraPoseID _id_frame_base, const mrpt::math::TPoint3D _pos) : id_frame_base(_id_frame_base), pos(_pos) { }
103 
104  mrpt::vision::TCameraPoseID id_frame_base; //!< The ID of the camera frame which is the coordinate reference of \a pos
105  mrpt::math::TPoint3D pos; //!< The (x,y,z) location of the feature, wrt to the camera frame \a id_frame_base
106  };
107 
108  /** An index of feature IDs and their relative locations */
109  typedef std::map<mrpt::vision::TFeatureID, TRelativeFeaturePos> TRelativeFeaturePosMap;
110 
111  /** A complete sequence of observations of features from different camera frames (poses).
112  * This structure is the input to some (Bundle-adjustment) methods in mrpt::vision
113  * \note Pixel coordinates can be either "raw" or "undistorted". Read the doc of functions handling this structure to see what they expect.
114  * \sa mrpt::vision::bundle_adj_full
115  */
116  struct VISION_IMPEXP TSequenceFeatureObservations : public std::vector<TFeatureObservation>
117  {
118  typedef std::vector<TFeatureObservation> BASE;
119 
121  inline TSequenceFeatureObservations(size_t size) : BASE(size) {}
123 
124  /** Saves all entries to a text file, with each line having this format: #FRAME_ID #FEAT_ID #PIXEL_X #PIXEL_Y
125  * The file is self-descripting, since the first line contains a comment line (starting with '%') explaining the format.
126  * Generated files can be loaded from MATLAB.
127  * \sa loadFromTextFile \exception std::exception On I/O error */
128  void saveToTextFile(const std::string &filName, bool skipFirstCommentLine = false) const;
129 
130  /** Load from a text file, in the format described in \a saveToTextFile \exception std::exception On I/O or format error */
131  void loadFromTextFile(const std::string &filName);
132 
133  /** Save the list of observations + the point locations + the camera frame poses to a pair of files in the format
134  * used by the Sparse Bundle Adjustment (SBA) C++ library.
135  *
136  * Point file lines: X Y Z nframes frame0 x0 y0 frame1 x1 y1 ...
137  *
138  * Camera file lines: qr qx qy qz x y z (Pose as a quaternion)
139  * \return false on any error
140  */
141  bool saveAsSBAFiles(
142  const TLandmarkLocationsVec &pts,
143  const std::string &pts_file,
144  const TFramePosesVec &cams,
145  const std::string &cams_file) const;
146 
147 
148  /** Remove all those features that don't have a minimum number of observations from different camera frame IDs.
149  * \return the number of erased entries.
150  * \sa After calling this you may want to call \a compressIDs */
151  size_t removeFewObservedFeatures(size_t minNumObservations = 3);
152 
153  /** Remove all but one out of \a decimate_ratio camera frame IDs from the list (eg: from N camera pose IDs at return there will be just N/decimate_ratio)
154  * The algorithm first builds a sorted list of frame IDs, then keep the lowest ID, remove the next "decimate_ratio-1", and so on.
155  * \sa After calling this you may want to call \a compressIDs */
156  void decimateCameraFrames(const size_t decimate_ratio);
157 
158  /** Rearrange frame and feature IDs such as they start at 0 and there are no gaps.
159  * \param old2new_camIDs If provided, the mapping from old to new IDs is stored here.
160  * \param old2new_lmIDs If provided, the mapping from old to new IDs is stored here. */
161  void compressIDs(
162  std::map<TCameraPoseID,TCameraPoseID> *old2new_camIDs=NULL,
163  std::map<TLandmarkID,TLandmarkID> *old2new_lmIDs=NULL );
164 
165  };
166 
167  /** Parameters associated to a stereo system
168  */
170  {
171  /** Initilization of default parameters
172  */
174 
175  /** See utils::CLoadableOptions
176  */
177  void loadFromConfigFile(
178  const mrpt::utils::CConfigFileBase &source,
179  const std::string &section);
180 
181  /** See utils::CLoadableOptions
182  */
183  void dumpToTextStream(mrpt::utils::CStream &out) const;
184 
185  /** Method for propagating the feature's image coordinate uncertainty into 3D space. Default value: Prop_Linear
186  */
188  {
189  /** Linear propagation of the uncertainty
190  */
191  Prop_Linear = -1,
192  /** Uncertainty propagation through the Unscented Transformation
193  */
195  /** Uncertainty propagation through the Scaled Unscented Transformation
196  */
197  Prop_SUT
198  };
199 
201 
202  /** Stereo Fundamental matrix */
204 
205  /** Intrinsic parameters
206  */
208  /** Baseline. Default value: baseline = 0.119f; [Bumblebee]
209  */
210  float baseline;
211  /** Standard deviation of the error in feature detection. Default value: stdPixel = 1
212  */
213  float stdPixel;
214  /** Standard deviation of the error in disparity computation. Default value: stdDisp = 1
215  */
216  float stdDisp;
217  /** Maximum allowed distance. Default value: maxZ = 20.0f
218  */
219  float maxZ;
220  /** Maximum allowed distance. Default value: minZ = 0.5f
221  */
222  float minZ;
223  /** Maximum allowed height. Default value: maxY = 3.0f
224  */
225  float maxY;
226  /** K factor for the UT. Default value: k = 1.5f
227  */
228  float factor_k;
229  /** Alpha factor for SUT. Default value: a = 1e-3
230  */
231  float factor_a;
232  /** Beta factor for the SUT. Default value: b = 2.0f
233  */
234  float factor_b;
235 
236  /** Parameters initialization
237  */
238  //TStereoSystemParams();
239 
240  }; // End struct TStereoSystemParams
241 
242  /** A structure for storing a 3D ROI
243  */
245  {
246  // Constructors
247  TROI();
248  TROI(float x1, float x2, float y1, float y2, float z1, float z2);
249 
250  // Members
251  float xMin;
252  float xMax;
253  float yMin;
254  float yMax;
255  float zMin;
256  float zMax;
257  }; // end struct TROI
258 
259  /** A structure for defining a ROI within an image
260  */
262  {
263  // Constructors
264  TImageROI();
265  TImageROI( float x1, float x2, float y1, float y2 );
266 
267  // Members
268  /** X coordinate limits [0,imageWidth)
269  */
270  float xMin, xMax;
271  /** Y coordinate limits [0,imageHeight)
272  */
273  float yMin, yMax;
274  }; // end struct TImageROI
275 
276  /** A structure containing options for the matching
277  */
279  {
280 
281  /** Method for propagating the feature's image coordinate uncertainty into 3D space. Default value: Prop_Linear
282  */
284  {
285  /** Matching by cross correlation of the image patches
286  */
287  mmCorrelation = 0,
288  /** Matching by Euclidean distance between SIFT descriptors
289  */
291  /** Matching by Euclidean distance between SURF descriptors
292  */
294  /** Matching by sum of absolute differences of the image patches
295  */
297  /** Matching by Hamming distance between ORB descriptors
298  */
299  mmDescriptorORB
300  };
301 
302  // For determining
303  bool useEpipolarRestriction; //!< Whether or not take into account the epipolar restriction for finding correspondences
304  bool hasFundamentalMatrix; //!< Whether or not there is a fundamental matrix
305  bool parallelOpticalAxis; //!< Whether or not the stereo rig has the optical axes parallel
306  bool useXRestriction; //!< Whether or not employ the x-coord restriction for finding correspondences (bumblebee camera, for example)
307  bool addMatches; //!< Whether or not to add the matches found into the input matched list (if false the input list will be cleared before being filled with the new matches)
308  bool useDisparityLimits; //!< Whether or not use limits (min,max) for the disparity, see also 'min_disp, max_disp'
309  bool enable_robust_1to1_match; //!< Whether or not only permit matches that are consistent from left->right and right->left
310 
311  float min_disp, max_disp; //!< Disparity limits, see also 'useDisparityLimits'
312 
314 
315  // General
316  TMatchingMethod matching_method; //!< Matching method
317  float epipolar_TH; //!< Epipolar constraint (rows of pixels)
318 
319  // SIFT
320  float maxEDD_TH; //!< Maximum Euclidean Distance Between SIFT Descriptors
321  float EDD_RATIO; //!< Boundary Ratio between the two lowest EDD
322 
323  // KLT
324  float minCC_TH; //!< Minimum Value of the Cross Correlation
325  float minDCC_TH; //!< Minimum Difference Between the Maximum Cross Correlation Values
326  float rCC_TH; //!< Maximum Ratio Between the two highest CC values
327 
328  // SURF
329  float maxEDSD_TH; //!< Maximum Euclidean Distance Between SURF Descriptors
330  float EDSD_RATIO; //!< Boundary Ratio between the two lowest SURF EDSD
331 
332  // SAD
333  double maxSAD_TH; //!< Minimum Euclidean Distance Between Sum of Absolute Differences
334  double SAD_RATIO; //!< Boundary Ratio between the two highest SAD
335 
336  // ORB
337  double maxORB_dist; //!< Maximun distance between ORB descriptors
338 
339 // // To estimate depth
340  bool estimateDepth; //!< Whether or not estimate the 3D position of the real features for the matches (only with parallelOpticalAxis by now).
341  double maxDepthThreshold; //!< The maximum allowed depth for the matching. If its computed depth is larger than this, the match won't be considered.
342 // double fx,cx,cy,baseline; //!< Intrinsic parameters of the stereo rig
343 
344  /** Constructor
345  */
346  TMatchingOptions( );
347 
348  /** See utils::CLoadableOptions
349  */
350  void loadFromConfigFile(
351  const mrpt::utils::CConfigFileBase &source,
352  const std::string &section);
353 
354  /** See utils::CLoadableOptions
355  */
356  void dumpToTextStream(mrpt::utils::CStream &out) const;
357 
358 #define COPY_MEMBER(_m) this->_m = o._m;
359 #define CHECK_MEMBER(_m) this->_m == o._m
360 
361  bool operator==( const TMatchingOptions & o ) const
362  {
363  return
364  CHECK_MEMBER(useXRestriction) &&
365  CHECK_MEMBER(useDisparityLimits) &&
366  CHECK_MEMBER(useEpipolarRestriction) &&
367  CHECK_MEMBER(addMatches) &&
368  CHECK_MEMBER(EDD_RATIO) &&
369  CHECK_MEMBER(EDSD_RATIO) &&
370  CHECK_MEMBER(enable_robust_1to1_match) &&
371  CHECK_MEMBER(epipolar_TH) &&
372  CHECK_MEMBER(estimateDepth) &&
373  CHECK_MEMBER(F) &&
374  CHECK_MEMBER(hasFundamentalMatrix) &&
375  CHECK_MEMBER(matching_method) &&
376  CHECK_MEMBER(maxDepthThreshold) &&
377  CHECK_MEMBER(maxEDD_TH) &&
378  CHECK_MEMBER(maxEDSD_TH) &&
379  CHECK_MEMBER(maxORB_dist) &&
380  CHECK_MEMBER(maxSAD_TH) &&
381  CHECK_MEMBER(max_disp) &&
382  CHECK_MEMBER(minCC_TH) &&
383  CHECK_MEMBER(minDCC_TH) &&
384  CHECK_MEMBER(min_disp) &&
385  CHECK_MEMBER(parallelOpticalAxis) &&
386  CHECK_MEMBER(rCC_TH) &&
387  CHECK_MEMBER(SAD_RATIO);
388  }
389 
390  void operator=( const TMatchingOptions & o )
391  {
392  COPY_MEMBER(useXRestriction)
393  COPY_MEMBER(useDisparityLimits)
394  COPY_MEMBER(useEpipolarRestriction)
395  COPY_MEMBER(addMatches)
396  COPY_MEMBER(EDD_RATIO)
397  COPY_MEMBER(EDSD_RATIO)
398  COPY_MEMBER(enable_robust_1to1_match)
399  COPY_MEMBER(epipolar_TH)
400  COPY_MEMBER(estimateDepth)
401  COPY_MEMBER(F)
402  COPY_MEMBER(hasFundamentalMatrix)
403  COPY_MEMBER(matching_method)
404  COPY_MEMBER(maxDepthThreshold)
405  COPY_MEMBER(maxEDD_TH)
406  COPY_MEMBER(maxEDSD_TH)
407  COPY_MEMBER(maxORB_dist)
408  COPY_MEMBER(maxSAD_TH)
409  COPY_MEMBER(max_disp)
410  COPY_MEMBER(minCC_TH)
411  COPY_MEMBER(minDCC_TH)
412  COPY_MEMBER(min_disp)
413  COPY_MEMBER(parallelOpticalAxis)
414  COPY_MEMBER(rCC_TH)
415  COPY_MEMBER(SAD_RATIO)
416  }
417 
418  }; // end struct TMatchingOptions
419 
420  /** Struct containing the output after matching multi-resolution SIFT-like descriptors
421  */
423  {
424  int nMatches;
425 
426  std::vector<int> firstListCorrespondences; //!< Contains the indexes within the second list corresponding to the first one.
427  std::vector<int> secondListCorrespondences; //!< Contains the indexes within the first list corresponding to the second one.
428  std::vector<int> firstListFoundScales; //!< Contains the scales of the first list where the correspondence was found.
429  std::vector<double> firstListDistance; //!< Contains the distances between the descriptors.
430 
431  TMultiResMatchingOutput() : nMatches(0),
432  firstListCorrespondences(), secondListCorrespondences(),
433  firstListFoundScales(), firstListDistance() {}
434 
435  }; // end struct TMultiResMatchingOutput
436 
437  /** Struct containing the options when matching multi-resolution SIFT-like descriptors
438  */
440  {
441  bool useOriFilter; //!< Whether or not use the filter based on orientation test
442  double oriThreshold; //!< The threshold for the orientation test
443 
444  bool useDepthFilter; //!< Whether or not use the filter based on the depth test
445 
446  double matchingThreshold; //!< The absolute threshold in descriptor distance for considering a match
447  double matchingRatioThreshold; //!< The ratio between the two lowest distances threshold for considering a match
448  uint32_t lowScl1, lowScl2; //!< The lowest scales in the two features to be taken into account in the matching process
449  uint32_t highScl1, highScl2; //!< The highest scales in the two features to be taken into account in the matching process
450 
451  uint32_t searchAreaSize; //!< Size of the squared area where to search for a match.
452  uint32_t lastSeenThreshold; //!< The allowed number of frames since a certain feature was seen for the last time.
453  uint32_t timesSeenThreshold; //!< The minimum number of frames for a certain feature to be considered stable.
454 
455  uint32_t minFeaturesToFind; //!< The minimum number of features allowed in the system. If current number is below this value, more features will be found.
456  uint32_t minFeaturesToBeLost; //!< The minimum number of features allowed in the system to not be considered to be lost.
457 
458  /** Default constructor
459  */
461  useOriFilter( true ), oriThreshold( 0.2 ),
462  useDepthFilter( true ), matchingThreshold( 1e4 ), matchingRatioThreshold( 0.5 ),
463  lowScl1(0), lowScl2(0), highScl1(6), highScl2(6), searchAreaSize(20), lastSeenThreshold(10), timesSeenThreshold(5),
464  minFeaturesToFind(30), minFeaturesToBeLost(5) {}
465 
467  const bool &_useOriFilter, const double &_oriThreshold, const bool &_useDepthFilter,
468  const double &_th, const double &_th2, const unsigned int &_lwscl1, const unsigned int &_lwscl2,
469  const unsigned int &_hwscl1, const unsigned int &_hwscl2, const int &_searchAreaSize, const int &_lsth, const int &_tsth,
470  const int &_minFeaturesToFind, const int &_minFeaturesToBeLost ) :
471  useOriFilter( _useOriFilter ), oriThreshold( _oriThreshold ), useDepthFilter( _useDepthFilter ),
472  matchingThreshold ( _th ), matchingRatioThreshold ( _th2 ), lowScl1( _lwscl1 ), lowScl2( _lwscl2 ),
473  highScl1( _hwscl1 ), highScl2( _hwscl2 ), searchAreaSize( _searchAreaSize ), lastSeenThreshold( _lsth ), timesSeenThreshold( _tsth ),
474  minFeaturesToFind( _minFeaturesToFind ), minFeaturesToBeLost(_minFeaturesToBeLost) {}
475 
476  void loadFromConfigFile( const mrpt::utils::CConfigFileBase &cfg, const std::string &section );
477  void saveToConfigFile( mrpt::utils::CConfigFileBase &cfg, const std::string &section ) const;
478  void dumpToTextStream( mrpt::utils::CStream &out) const;
479 
480  }; // end TMultiResDescMatchOptions
481 
482  /** Struct containing the options when computing the multi-resolution SIFT-like descriptors
483  */
485  {
486  uint32_t basePSize; //!< The size of the base patch
487  std::vector<double> scales; //!< The set of scales relatives to the base patch
488  uint32_t comLScl, comHScl; //!< The subset of scales for which to compute the descriptors
489  double sg1, sg2, sg3; //!< The sigmas for the Gaussian kernels
490  bool computeDepth; //!< Whether or not to compute the depth of the feature
491  bool blurImage; //!< Whether or not to blur the image previously to compute the descriptors
492  double fx,cx,cy,baseline; //!< Intrinsic stereo pair parameters for computing the depth of the feature
493  bool computeHashCoeffs; //!< Whether or not compute the coefficients for mantaining a HASH table of descriptors (for relocalization)
494 
495  double cropValue; //!< The SIFT-like descriptor is cropped at this value during normalization
496 
497  /** Default constructor
498  */
500  basePSize(23), sg1 (0.5), sg2(7.5), sg3(8.0), computeDepth(true), blurImage(true), fx(0.0), cx(0.0), cy(0.0), baseline(0.0), computeHashCoeffs(false), cropValue(0.2)
501  {
502  scales.resize(7);
503  scales[0] = 0.5;
504  scales[1] = 0.8;
505  scales[2] = 1.0;
506  scales[3] = 1.2;
507  scales[4] = 1.5;
508  scales[5] = 1.8;
509  scales[6] = 2.0;
510  comLScl = 0;
511  comHScl = 6;
512  }
513 
514  TMultiResDescOptions( const unsigned int &_basePSize, const std::vector<double> &_scales,
515  const unsigned int &_comLScl, const unsigned int &_comHScl,
516  const double &_sg1, const double &_sg2, const double &_sg3,
517  const bool &_computeDepth, const bool _blurImage, const double &_fx, const double &_cx, const double &_cy, const double &_baseline, const bool &_computeHashCoeffs, const double &_cropValue ):
518  basePSize( _basePSize ), comLScl( _comLScl ), comHScl( _comHScl ),
519  sg1( _sg1 ), sg2( _sg2 ), sg3( _sg3 ),
520  computeDepth( _computeDepth ), blurImage( _blurImage ), fx( _fx ), cx( _cx ), cy( _cy ), baseline( _baseline ), computeHashCoeffs( _computeHashCoeffs), cropValue( _cropValue )
521  {
522  scales.resize( _scales.size() );
523  for(unsigned int k = 0; k < _scales.size(); ++k)
524  scales[k] = _scales[k];
525  }
526 
527  void loadFromConfigFile( const mrpt::utils::CConfigFileBase &cfg, const std::string &section );
528  void saveToConfigFile( mrpt::utils::CConfigFileBase &cfg, const std::string &section ) const;
529  void dumpToTextStream( mrpt::utils::CStream &out) const;
530 
531  }; // end TMultiResDescOptions
532 
533 
534  /** @} */ // end of grouping
535 
536  }
537 }
538 
539 
540 #endif
uint32_t highScl2
The highest scales in the two features to be taken into account in the matching process.
Uncertainty propagation through the Unscented Transformation.
A pair (x,y) of pixel coordinates (subpixel resolution).
Definition: TPixelCoord.h:21
float EDD_RATIO
Boundary Ratio between the two lowest EDD.
float rCC_TH
Maximum Ratio Between the two highest CC values.
TLandmarkID id_feature
A unique ID of this feature.
Non-defined feature (also used for Occupancy features)
mrpt::math::CMatrixDouble33 F
Stereo Fundamental matrix.
uint32_t minFeaturesToFind
The minimum number of features allowed in the system. If current number is below this value...
void operator=(const TMatchingOptions &o)
double maxORB_dist
Maximun distance between ORB descriptors.
Used in some methods to mean "any of the present descriptors".
bool estimateDepth
Whether or not estimate the 3D position of the real features for the matches (only with parallelOptic...
std::map< mrpt::vision::TFeatureID, TRelativeFeaturePos > TRelativeFeaturePosMap
An index of feature IDs and their relative locations.
bool useXRestriction
Whether or not employ the x-coord restriction for finding correspondences (bumblebee camera...
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
double SAD_RATIO
Boundary Ratio between the two highest SAD.
Struct containing the output after matching multi-resolution SIFT-like descriptors.
One feature observation entry, used within sequences with TSequenceFeatureObservations.
std::map< TYPE1, TYPE2, std::less< TYPE1 >, Eigen::aligned_allocator< std::pair< const TYPE1, TYPE2 > > > map_t
#define CHECK_MEMBER(_m)
TSequenceFeatureObservations(const TSequenceFeatureObservations &o)
std::vector< int > secondListCorrespondences
Contains the indexes within the first list corresponding to the second one.
float epipolar_TH
Epipolar constraint (rows of pixels)
float EDSD_RATIO
Boundary Ratio between the two lowest SURF EDSD.
mrpt::utils::TPixelCoordf px
The pixel coordinates of the observed feature.
bool useEpipolarRestriction
Whether or not take into account the epipolar restriction for finding correspondences.
TFeatureObservation(const TLandmarkID _id_feature, const TCameraPoseID _id_frame, const mrpt::utils::TPixelCoordf _px)
std::vector< double > firstListDistance
Contains the distances between the descriptors.
A complete sequence of observations of features from different camera frames (poses).
This class allows loading and storing values and vectors of different types from a configuration text...
float yMin
Y coordinate limits [0,imageHeight)
A structure for storing a 3D ROI.
FAST feature detector, OpenCV's implementation ("Faster and better: A machine learning approach to co...
bool useDisparityLimits
Whether or not use limits (min,max) for the disparity, see also 'min_disp, max_disp'.
float stdPixel
Standard deviation of the error in feature detection.
Inactive (right after detection, and before being tried to track)
A structure for defining a ROI within an image.
bool computeHashCoeffs
Whether or not compute the coefficients for mantaining a HASH table of descriptors (for relocalizatio...
std::vector< int > firstListFoundScales
Contains the scales of the first list where the correspondence was found.
mrpt::aligned_containers< mrpt::poses::CPose3D >::vector_t TFramePosesVec
A list of camera frames (6D poses), which assumes indexes are unique, consecutive IDs...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
bool parallelOpticalAxis
Whether or not the stereo rig has the optical axes parallel.
Matching by sum of absolute differences of the image patches.
float minDCC_TH
Minimum Difference Between the Maximum Cross Correlation Values.
A numeric matrix of compile-time fixed size.
uint32_t basePSize
The size of the base patch.
uint32_t timesSeenThreshold
The minimum number of frames for a certain feature to be considered stable.
Parameters associated to a stereo system.
bool addMatches
Whether or not to add the matches found into the input matched list (if false the input list will be ...
uint32_t lastSeenThreshold
The allowed number of frames since a certain feature was seen for the last time.
Harris border and corner detector [HARRIS].
bool useDepthFilter
Whether or not use the filter based on the depth test.
Scale Invariant Feature Transform [LOWE'04].
TMatchingMethod
Method for propagating the feature's image coordinate uncertainty into 3D space.
double sg3
The sigmas for the Gaussian kernels.
TRelativeFeaturePos(const mrpt::vision::TCameraPoseID _id_frame_base, const mrpt::math::TPoint3D _pos)
FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
Matching by Euclidean distance between SURF descriptors.
std::vector< int > firstListCorrespondences
Contains the indexes within the second list corresponding to the first one.
double maxDepthThreshold
The maximum allowed depth for the matching. If its computed depth is larger than this, the match won't be considered.
FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
uint64_t TFeatureID
Definition of a feature ID.
Bit-based feature descriptor.
One relative feature observation entry, used with some relative bundle-adjustment functions...
double cropValue
The SIFT-like descriptor is cropped at this value during normalization.
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.
uint32_t searchAreaSize
Size of the squared area where to search for a match.
double maxSAD_TH
Minimum Euclidean Distance Between Sum of Absolute Differences.
Unable to track this feature (mismatch is too high for the given tracking window: lack of texture...
void loadFromTextFile(const std::string &file)
Load matrix from a text file, compatible with MATLAB text format.
std::vector< double > scales
The set of scales relatives to the base patch.
uint64_t TCameraPoseID
Unique IDs for camera frames (poses)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
uint64_t TLandmarkID
Unique IDs for landmarks.
bool computeDepth
Whether or not to compute the depth of the feature.
double oriThreshold
The threshold for the orientation test.
#define COPY_MEMBER(_m)
Struct containing the options when computing the multi-resolution SIFT-like descriptors.
bool operator==(const TMatchingOptions &o) const
size_t size(const MATRIXLIKE &m, int dim)
Definition: bits.h:38
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:69
bool enable_robust_1to1_match
Whether or not only permit matches that are consistent from left->right and right->left.
Speeded Up Robust Feature [BAY'06].
A structure containing options for the matching.
bool hasFundamentalMatrix
Whether or not there is a fundamental matrix.
std::vector< mrpt::math::TPoint3D > TLandmarkLocationsVec
A list of landmarks (3D points), which assumes indexes are unique, consecutive IDs.
Struct containing the options when matching multi-resolution SIFT-like descriptors.
float maxEDSD_TH
Maximum Euclidean Distance Between SURF Descriptors.
std::map< TLandmarkID, mrpt::math::TPoint3D > TLandmarkLocationsMap
A list of landmarks (3D points) indexed by unique IDs.
float minCC_TH
Minimum Value of the Cross Correlation.
Intensity-domain spin image descriptors.
mrpt::vision::TCameraPoseID id_frame_base
The ID of the camera frame which is the coordinate reference of pos.
TCameraPoseID id_frame
A unique ID of a "frame" (camera position) from where the feature was observed.
double matchingThreshold
The absolute threshold in descriptor distance for considering a match.
float maxEDD_TH
Maximum Euclidean Distance Between SIFT Descriptors.
TMultiResDescMatchOptions(const bool &_useOriFilter, const double &_oriThreshold, const bool &_useDepthFilter, const double &_th, const double &_th2, const unsigned int &_lwscl1, const unsigned int &_lwscl2, const unsigned int &_hwscl1, const unsigned int &_hwscl2, const int &_searchAreaSize, const int &_lsth, const int &_tsth, const int &_minFeaturesToFind, const int &_minFeaturesToBeLost)
A especial case: this is not an image feature, but a 2D/3D beacon (used for range-only SLAM from mrpt...
ORB detector and descriptor, OpenCV's implementation ("ORB: an efficient alternative to SIFT or SURF"...
uint32_t minFeaturesToBeLost
The minimum number of features allowed in the system to not be considered to be lost.
Lightweight 3D point.
Feature fell Out Of Bounds (out of the image limits, too close to image borders)
TMatchingMethod matching_method
Matching method.
mrpt::math::TPoint3D pos
The (x,y,z) location of the feature, wrt to the camera frame id_frame_base.
mrpt::aligned_containers< TCameraPoseID, mrpt::poses::CPose3D >::map_t TFramePosesMap
A list of camera frames (6D poses) indexed by unique IDs.
bool useOriFilter
Whether or not use the filter based on orientation test.
Kanade-Lucas-Tomasi feature [SHI'94].
bool blurImage
Whether or not to blur the image previously to compute the descriptors.
TMultiResDescOptions(const unsigned int &_basePSize, const std::vector< double > &_scales, const unsigned int &_comLScl, const unsigned int &_comHScl, const double &_sg1, const double &_sg2, const double &_sg3, const bool &_computeDepth, const bool _blurImage, const double &_fx, const double &_cx, const double &_cy, const double &_baseline, const bool &_computeHashCoeffs, const double &_cropValue)
std::vector< TYPE1, Eigen::aligned_allocator< TYPE1 > > vector_t
double matchingRatioThreshold
The ratio between the two lowest distances threshold for considering a match.
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
float stdDisp
Standard deviation of the error in disparity computation.
Matching by Euclidean distance between SIFT descriptors.
uint32_t lowScl2
The lowest scales in the two features to be taken into account in the matching process.
mrpt::math::CMatrixDouble33 K
Intrinsic parameters.
TUnc_Prop_Method
Method for propagating the feature's image coordinate uncertainty into 3D space.



Page generated by Doxygen 1.8.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014