29 #ifndef mrpt_vision_types_H
30 #define mrpt_vision_types_H
47 using namespace mrpt::math;
48 using namespace mrpt::utils;
149 typedef std::vector<TFeatureObservation>
BASE;
159 void saveToTextFile(
const std::string &filName,
bool skipFirstCommentLine =
false)
const;
174 const std::string &pts_file,
176 const std::string &cams_file)
const;
182 size_t removeFewObservedFeatures(
size_t minNumObservations = 3);
187 void decimateCameraFrames(
const size_t decimate_ratio);
193 std::map<TCameraPoseID,TCameraPoseID> *old2new_camIDs=NULL,
194 std::map<TLandmarkID,TLandmarkID> *old2new_lmIDs=NULL );
208 void loadFromConfigFile(
210 const std::string §ion);
214 void dumpToTextStream(
CStream &out)
const;
279 TROI(
float x1,
float x2,
float y1,
float y2,
float z1,
float z2);
296 TImageROI(
float x1,
float x2,
float y1,
float y2 );
371 void loadFromConfigFile(
373 const std::string §ion);
377 void dumpToTextStream(
CStream &out)
const;
393 firstListCorrespondences(), secondListCorrespondences(),
394 firstListFoundScales(), firstListDistance() {}
422 useOriFilter( true ), oriThreshold( 0.2 ),
423 useDepthFilter( true ), matchingThreshold( 1e4 ), matchingRatioThreshold( 0.5 ),
424 lowScl1(0), lowScl2(0), highScl1(6), highScl2(6), searchAreaSize(20), lastSeenThreshold(10), timesSeenThreshold(5),
425 minFeaturesToFind(30), minFeaturesToBeLost(5) {}
428 const bool &_useOriFilter,
const double &_oriThreshold,
const bool &_useDepthFilter,
429 const double &_th,
const double &_th2,
const unsigned int &_lwscl1,
const unsigned int &_lwscl2,
430 const unsigned int &_hwscl1,
const unsigned int &_hwscl2,
const int &_searchAreaSize,
const int &_lsth,
const int &_tsth,
431 const int &_minFeaturesToFind,
const int &_minFeaturesToBeLost ) :
432 useOriFilter( _useOriFilter ), oriThreshold( _oriThreshold ), useDepthFilter( _useDepthFilter ),
433 matchingThreshold ( _th ), matchingRatioThreshold ( _th2 ), lowScl1( _lwscl1 ), lowScl2( _lwscl2 ),
434 highScl1( _hwscl1 ), highScl2( _hwscl2 ), searchAreaSize( _searchAreaSize ), lastSeenThreshold( _lsth ), timesSeenThreshold( _tsth ),
435 minFeaturesToFind( _minFeaturesToFind ), minFeaturesToBeLost(_minFeaturesToBeLost) {}
453 double fx,cx,cy,baseline;
461 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)
476 const unsigned int &_comLScl,
const unsigned int &_comHScl,
477 const double &_sg1,
const double &_sg2,
const double &_sg3,
478 const bool &_computeDepth,
const bool _blurImage,
const double &_fx,
const double &_cx,
const double &_cy,
const double &_baseline,
const bool &_computeHashCoeffs,
const double &_cropValue ):
479 basePSize( _basePSize ), comLScl( _comLScl ), comHScl( _comHScl ),
480 sg1( _sg1 ), sg2( _sg2 ), sg3( _sg3 ),
481 computeDepth( _computeDepth ), blurImage( _blurImage ), fx( _fx ), cx( _cx ), cy( _cy ), baseline( _baseline ), computeHashCoeffs( _computeHashCoeffs), cropValue( _cropValue )
483 scales.resize( _scales.size() );
484 for(
unsigned int k = 0; k < _scales.size(); ++k)
485 scales[k] = _scales[k];