Main MRPT website > C++ reference
MRPT logo
types.h
Go to the documentation of this file.
00001 /* +---------------------------------------------------------------------------+
00002    |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |
00003    |                                                                           |
00004    |                       http://www.mrpt.org/                                |
00005    |                                                                           |
00006    |   Copyright (C) 2005-2011  University of Malaga                           |
00007    |                                                                           |
00008    |    This software was written by the Machine Perception and Intelligent    |
00009    |      Robotics Lab, University of Malaga (Spain).                          |
00010    |    Contact: Jose-Luis Blanco  <jlblanco@ctima.uma.es>                     |
00011    |                                                                           |
00012    |  This file is part of the MRPT project.                                   |
00013    |                                                                           |
00014    |     MRPT is free software: you can redistribute it and/or modify          |
00015    |     it under the terms of the GNU General Public License as published by  |
00016    |     the Free Software Foundation, either version 3 of the License, or     |
00017    |     (at your option) any later version.                                   |
00018    |                                                                           |
00019    |   MRPT is distributed in the hope that it will be useful,                 |
00020    |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |
00021    |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |
00022    |     GNU General Public License for more details.                          |
00023    |                                                                           |
00024    |     You should have received a copy of the GNU General Public License     |
00025    |     along with MRPT.  If not, see <http://www.gnu.org/licenses/>.         |
00026    |                                                                           |
00027    +---------------------------------------------------------------------------+ */
00028 
00029 #ifndef mrpt_vision_types_H
00030 #define mrpt_vision_types_H
00031 
00032 #include <mrpt/utils/CImage.h>
00033 #include <mrpt/utils/CLoadableOptions.h>
00034 #include <mrpt/utils/TMatchingPair.h>
00035 
00036 #include <mrpt/vision/link_pragmas.h>
00037 
00038 namespace mrpt
00039 {
00040         namespace vision
00041         {
00042                 /** \addtogroup mrpt_vision_grp
00043                   *  @{ */
00044         
00045                 using std::vector;
00046                 //using namespace mrpt::slam;
00047                 using namespace mrpt::math;
00048                 using namespace mrpt::utils;
00049 
00050 
00051                 typedef uint64_t TFeatureID;    //!< Definition of a feature ID
00052 
00053                 typedef uint64_t TLandmarkID;   //!< Unique IDs for landmarks
00054                 typedef uint64_t TCameraPoseID; //!< Unique IDs for camera frames (poses)
00055 
00056                 typedef mrpt::aligned_containers<TCameraPoseID,CPose3D>::map_t  TFramePosesMap;        //!< A list of camera frames (6D poses) indexed by unique IDs.
00057                 typedef mrpt::aligned_containers<CPose3D>::vector_t             TFramePosesVec;        //!< A list of camera frames (6D poses), which assumes indexes are unique, consecutive IDs.
00058 
00059                 typedef std::map<TLandmarkID,TPoint3D>   TLandmarkLocationsMap; //!< A list of landmarks (3D points) indexed by unique IDs.
00060                 typedef std::vector<TPoint3D>            TLandmarkLocationsVec; //!< A list of landmarks (3D points), which assumes indexes are unique, consecutive IDs.
00061 
00062 
00063                 /** 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
00064                 */
00065                 enum TFeatureType
00066                 {
00067                         featNotDefined = -1,    //!< Non-defined feature (also used for Occupancy features)
00068                         featKLT = 0,                    //!< Kanade-Lucas-Tomasi feature [SHI'94]
00069                         featHarris,                             //!< Harris border and corner detector [HARRIS]
00070                         featBCD,                                //!< Binary corder detector
00071                         featSIFT,                               //!< Scale Invariant Feature Transform [LOWE'04]
00072                         featSURF,                               //!< Speeded Up Robust Feature [BAY'06]
00073                         featBeacon,                             //!< A especial case: this is not an image feature, but a 2D/3D beacon (used for range-only SLAM from mrpt::slam::CLandmark)
00074                         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).
00075                         featFASTER9,                    //!< FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
00076                         featFASTER10,                   //!< FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
00077                         featFASTER12                    //!< FASTER-9 detector, Edward Rosten's libcvd implementation optimized for SSE2.
00078                 };
00079 
00080                 /** The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescriptors to indicate which descriptors are to be computed for features.
00081                   */
00082                 enum TDescriptorType
00083                 {
00084                         descAny                         = 0,  //!< Used in some methods to mean "any of the present descriptors"
00085                         descSIFT            = 1,  //!< SIFT descriptors
00086                         descSURF                        = 2,  //!< SURF descriptors
00087                         descSpinImages      = 4,  //!< Intensity-domain spin image descriptors
00088                         descPolarImages     = 8,  //!< Polar image descriptor
00089                         descLogPolarImages      = 16  //!< Log-Polar image descriptor
00090                 };
00091 
00092                 enum TFeatureTrackStatus
00093                 {
00094                         // Init value
00095                         status_IDLE     = 0,    //!< Inactive (right after detection, and before being tried to track)
00096 
00097                         // Ok:
00098                         status_TRACKED  = 5,    //!< Feature correctly tracked
00099 
00100                         // Bad:
00101                         status_OOB              = 1,    //!< Feature felt Out Of Bounds
00102                         status_LOST     = 10,   //!< Unable to track this feature
00103 
00104                         // KLT specific:
00105                         statusKLT_IDLE  = 0,    //!< Inactive
00106                         statusKLT_OOB   = 1,    //!< Out Of Bounds      (Value identical to status_OOB)
00107                         statusKLT_SMALL_DET     = 2,    //!< Determinant of the matrix too small
00108                         statusKLT_LARGE_RESIDUE = 3,    //!< Error too big
00109                         statusKLT_MAX_RESIDUE   = 4,
00110                         statusKLT_TRACKED       = 5,    //!< Feature correctly tracked (Value identical to status_TRACKED)
00111                         statusKLT_MAX_ITERATIONS        = 6     //!< Iteration maximum reached
00112                 };
00113 
00114                 typedef TFeatureTrackStatus TKLTFeatureStatus; //!< For backward compatibility
00115 
00116 
00117                 /** One feature observation entry, used within sequences with TSequenceFeatureObservations */
00118                 struct VISION_IMPEXP TFeatureObservation
00119                 {
00120                         inline TFeatureObservation() { }
00121                         inline TFeatureObservation(const TLandmarkID _id_feature, const TCameraPoseID  _id_frame, const TPixelCoordf _px) : id_feature(_id_feature), id_frame(_id_frame), px(_px) { }
00122 
00123                         TLandmarkID    id_feature;  //!< A unique ID of this feature
00124                         TCameraPoseID  id_frame;    //!< A unique ID of a "frame" (camera position) from where the feature was observed.
00125                         TPixelCoordf   px;          //!< The pixel coordinates of the observed feature
00126                 };
00127 
00128                 /** One relative feature observation entry, used with some relative bundle-adjustment functions.
00129                   */
00130                 struct TRelativeFeaturePos
00131                 {
00132                         inline TRelativeFeaturePos() { }
00133                         inline TRelativeFeaturePos(const mrpt::vision::TCameraPoseID  _id_frame_base, const mrpt::math::TPoint3D _pos) : id_frame_base(_id_frame_base), pos(_pos) {  }
00134 
00135                         mrpt::vision::TCameraPoseID  id_frame_base;     //!< The ID of the camera frame which is the coordinate reference of \a pos
00136                         mrpt::math::TPoint3D         pos;  //!< The (x,y,z) location of the feature, wrt to the camera frame \a id_frame_base
00137                 };
00138 
00139                 /** An index of feature IDs and their relative locations */
00140                 typedef std::map<mrpt::vision::TFeatureID, TRelativeFeaturePos>  TRelativeFeaturePosMap;
00141 
00142                 /** A complete sequence of observations of features from different camera frames (poses).
00143                   *  This structure is the input to some (Bundle-adjustment) methods in mrpt::vision
00144                   *  \note Pixel coordinates can be either "raw" or "undistorted". Read the doc of functions handling this structure to see what they expect.
00145                   *  \sa mrpt::vision::bundle_adj_full
00146                   */
00147                 struct VISION_IMPEXP TSequenceFeatureObservations : public std::vector<TFeatureObservation>
00148                 {
00149                         typedef std::vector<TFeatureObservation> BASE;
00150 
00151                         inline TSequenceFeatureObservations() {}
00152                         inline TSequenceFeatureObservations(size_t size) : BASE(size) {}
00153                         inline TSequenceFeatureObservations(const TSequenceFeatureObservations& o) : BASE(o) {}
00154 
00155                         /** Saves all entries to a text file, with each line having this format: #FRAME_ID  #FEAT_ID  #PIXEL_X  #PIXEL_Y
00156                           * The file is self-descripting, since the first line contains a comment line (starting with '%') explaining the format.
00157                           * Generated files can be loaded from MATLAB.
00158                           * \sa loadFromTextFile \exception std::exception On I/O error  */
00159                         void saveToTextFile(const std::string &filName, bool skipFirstCommentLine = false) const;
00160 
00161                         /** Load from a text file, in the format described in \a saveToTextFile \exception std::exception On I/O or format error */
00162                         void loadFromTextFile(const std::string &filName);
00163 
00164                         /** Save the list of observations + the point locations + the camera frame poses to a pair of files in the format
00165                           *  used by the Sparse Bundle Adjustment (SBA) C++ library.
00166                           *
00167                           *  Point file lines: X Y Z  nframes  frame0 x0 y0  frame1 x1 y1 ...
00168                           *
00169                           *  Camera file lines: qr qx qy qz x y z  (Pose as a quaternion)
00170                           * \return false on any error
00171                           */
00172                         bool saveAsSBAFiles(
00173                                 const TLandmarkLocationsVec &pts,
00174                                 const std::string &pts_file,
00175                                 const TFramePosesVec        &cams,
00176                                 const std::string &cams_file) const;
00177 
00178 
00179                         /** Remove all those features that don't have a minimum number of observations from different camera frame IDs.
00180                           * \return the number of erased entries.
00181                           * \sa After calling this you may want to call \a compressIDs */
00182                         size_t removeFewObservedFeatures(size_t minNumObservations = 3);
00183 
00184                         /** 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)
00185                           * The algorithm first builds a sorted list of frame IDs, then keep the lowest ID, remove the next "decimate_ratio-1", and so on.
00186                           * \sa After calling this you may want to call \a compressIDs */
00187                         void decimateCameraFrames(const size_t decimate_ratio);
00188 
00189                         /** Rearrange frame and feature IDs such as they start at 0 and there are no gaps.
00190                           * \param old2new_camIDs If provided, the mapping from old to new IDs is stored here.
00191                           * \param old2new_lmIDs If provided, the mapping from old to new IDs is stored here. */
00192                         void compressIDs(
00193                                 std::map<TCameraPoseID,TCameraPoseID>  *old2new_camIDs=NULL,
00194                                 std::map<TLandmarkID,TLandmarkID>      *old2new_lmIDs=NULL );
00195 
00196                 };
00197 
00198                 /** Parameters associated to a stereo system
00199                   */
00200                 struct VISION_IMPEXP TStereoSystemParams : public mrpt::utils::CLoadableOptions
00201                 {
00202                         /** Initilization of default parameters
00203                          */
00204                         TStereoSystemParams(    );
00205 
00206                         /** See utils::CLoadableOptions
00207                           */
00208                         void  loadFromConfigFile(
00209                                 const mrpt::utils::CConfigFileBase      &source,
00210                                 const std::string               &section);
00211 
00212                         /** See utils::CLoadableOptions
00213                           */
00214                         void  dumpToTextStream(CStream  &out) const;
00215 
00216                         /** Method for propagating the feature's image coordinate uncertainty into 3D space. Default value: Prop_Linear
00217                           */
00218                         enum TUnc_Prop_Method
00219                         {
00220                                 /** Linear propagation of the uncertainty
00221                                   */
00222                                 Prop_Linear = -1,
00223                                 /** Uncertainty propagation through the Unscented Transformation
00224                                   */
00225                                 Prop_UT,
00226                                 /** Uncertainty propagation through the Scaled Unscented Transformation
00227                                   */
00228                                 Prop_SUT
00229                         };
00230 
00231                         TUnc_Prop_Method uncPropagation;
00232 
00233                         /** Stereo Fundamental matrix */
00234                         CMatrixDouble33 F;
00235 
00236                         /** Intrinsic parameters
00237                           */
00238                         CMatrixDouble33 K;
00239                         /** Baseline. Default value: baseline = 0.119f; [Bumblebee]
00240                           */
00241                         float           baseline;
00242                         /** Standard deviation of the error in feature detection. Default value: stdPixel = 1
00243                           */
00244                         float           stdPixel;
00245                         /** Standard deviation of the error in disparity computation. Default value: stdDisp = 1
00246                           */
00247                         float           stdDisp;
00248                         /** Maximum allowed distance. Default value: maxZ = 20.0f
00249                           */
00250                         float           maxZ;
00251                         /** Maximum allowed distance. Default value: minZ = 0.5f
00252                           */
00253                         float           minZ;
00254                         /** Maximum allowed height. Default value: maxY = 3.0f
00255                           */
00256                         float           maxY;
00257                         /** K factor for the UT. Default value: k = 1.5f
00258                           */
00259                         float           factor_k;
00260                         /** Alpha factor for SUT. Default value: a = 1e-3
00261                           */
00262                         float           factor_a;
00263                         /** Beta factor for the SUT. Default value: b = 2.0f
00264                           */
00265                         float           factor_b;
00266 
00267                         /** Parameters initialization
00268                           */
00269                         //TStereoSystemParams();
00270 
00271                 }; // End struct TStereoSystemParams
00272 
00273                 /** A structure for storing a 3D ROI
00274                   */
00275                 struct VISION_IMPEXP TROI
00276                 {
00277                         // Constructors
00278                         TROI();
00279                         TROI(float x1, float x2, float y1, float y2, float z1, float z2);
00280 
00281                         // Members
00282                         float   xMin;
00283                         float   xMax;
00284                         float   yMin;
00285                         float   yMax;
00286                         float   zMin;
00287                         float   zMax;
00288                 }; // end struct TROI
00289 
00290                 /** A structure for defining a ROI within an image
00291                   */
00292                 struct VISION_IMPEXP TImageROI
00293                 {
00294                         // Constructors
00295                         TImageROI();
00296                         TImageROI( float x1, float x2, float y1, float y2 );
00297 
00298                         // Members
00299                         /** X coordinate limits [0,imageWidth)
00300                           */
00301                         float   xMin, xMax;
00302                         /** Y coordinate limits [0,imageHeight)
00303                           */
00304                         float   yMin, yMax;
00305                 }; // end struct TImageROI
00306 
00307                 /** A structure containing options for the matching
00308                   */
00309                 struct VISION_IMPEXP TMatchingOptions : public mrpt::utils::CLoadableOptions
00310                 {
00311 
00312                         /** Method for propagating the feature's image coordinate uncertainty into 3D space. Default value: Prop_Linear
00313                           */
00314                         enum TMatchingMethod
00315                         {
00316                                 /** Matching by cross correlation of the image patches
00317                                   */
00318                                 mmCorrelation = 0,
00319                                 /** Matching by Euclidean distance between SIFT descriptors
00320                                   */
00321                                 mmDescriptorSIFT,
00322                                 /** Matching by Euclidean distance between SURF descriptors
00323                                   */
00324                                 mmDescriptorSURF,
00325                                 /** Matching by sum of absolute differences of the image patches
00326                                   */
00327                                 mmSAD
00328                         };
00329 
00330                         // For determining
00331                         bool    useEpipolarRestriction;         //!< Whether or not take into account the epipolar restriction for finding correspondences
00332                         bool    hasFundamentalMatrix;           //!< Whether or not there is a fundamental matrix
00333                         bool    parallelOpticalAxis;            //!< Whether or not the stereo rig has the optical axes parallel
00334                         bool    useXRestriction;                        //!< Whether or not employ the x-coord restriction for finding correspondences (bumblebee camera, for example)
00335                         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)
00336 
00337                         CMatrixDouble33 F;
00338 
00339                         // General
00340                         TMatchingMethod matching_method;        //!< Matching method
00341                         float   epipolar_TH;                            //!< Epipolar constraint (rows of pixels)
00342 
00343                         // SIFT
00344                         float   maxEDD_TH;                                      //!< Maximum Euclidean Distance Between SIFT Descriptors
00345                         float   EDD_RATIO;                                      //!< Boundary Ratio between the two lowest EDD
00346 
00347                         // KLT
00348                         float   minCC_TH;                                       //!< Minimum Value of the Cross Correlation
00349                         float   minDCC_TH;                                      //!< Minimum Difference Between the Maximum Cross Correlation Values
00350                         float   rCC_TH;                                         //!< Maximum Ratio Between the two highest CC values
00351 
00352                         // SURF
00353                         float   maxEDSD_TH;                                     //!< Maximum Euclidean Distance Between SURF Descriptors
00354                         float   EDSD_RATIO;                                     //!< Boundary Ratio between the two lowest SURF EDSD
00355 
00356                         // SAD
00357                         double  maxSAD_TH;                  //!< Minimum Euclidean Distance Between Sum of Absolute Differences
00358                         double  SAD_RATIO;                  //!< Boundary Ratio between the two highest SAD
00359 
00360 //                      // To estimate depth
00361                         bool    estimateDepth;              //!< Whether or not estimate the 3D position of the real features for the matches (only with parallelOpticalAxis by now).
00362                         double  maxDepthThreshold;          //!< The maximum allowed depth for the matching. If its computed depth is larger than this, the match won't be considered.
00363 //            double  fx,cx,cy,baseline;          //!< Intrinsic parameters of the stereo rig
00364 
00365                         /** Constructor
00366                           */
00367                         TMatchingOptions( );
00368 
00369                         /** See utils::CLoadableOptions
00370                           */
00371                         void  loadFromConfigFile(
00372                                 const mrpt::utils::CConfigFileBase      &source,
00373                                 const std::string               &section);
00374 
00375                         /** See utils::CLoadableOptions
00376                           */
00377                         void  dumpToTextStream(CStream  &out) const;
00378 
00379                 }; // end struct TMatchingOptions
00380 
00381         /** Struct containing the output after matching multi-resolution SIFT-like descriptors
00382                 */
00383         struct VISION_IMPEXP TMultiResMatchingOutput
00384         {
00385             int                     nMatches;
00386 
00387             std::vector<int>        firstListCorrespondences;    //!< Contains the indexes within the second list corresponding to the first one.
00388             std::vector<int>        secondListCorrespondences;   //!< Contains the indexes within the first list corresponding to the second one.
00389             std::vector<int>        firstListFoundScales;        //!< Contains the scales of the first list where the correspondence was found.
00390             std::vector<double>     firstListDistance;           //!< Contains the distances between the descriptors.
00391 
00392             TMultiResMatchingOutput() : nMatches(0),
00393                 firstListCorrespondences(), secondListCorrespondences(),
00394                 firstListFoundScales(), firstListDistance() {}
00395 
00396         }; // end struct TMultiResMatchingOutput
00397 
00398         /** Struct containing the options when matching multi-resolution SIFT-like descriptors
00399                 */
00400                 struct VISION_IMPEXP TMultiResDescMatchOptions : public mrpt::utils::CLoadableOptions
00401                 {
00402             bool            useOriFilter;           //!< Whether or not use the filter based on orientation test
00403             double          oriThreshold;           //!< The threshold for the orientation test
00404 
00405             bool            useDepthFilter;         //!< Whether or not use the filter based on the depth test
00406 
00407             double          matchingThreshold;      //!< The absolute threshold in descriptor distance for considering a match
00408             double          matchingRatioThreshold; //!< The ratio between the two lowest distances threshold for considering a match
00409             unsigned int    lowScl1, lowScl2;       //!< The lowest scales in the two features to be taken into account in the matching process
00410             unsigned int    highScl1, highScl2;     //!< The highest scales in the two features to be taken into account in the matching process
00411 
00412             int             searchAreaSize;         //!< Size of the squared area where to search for a match.
00413             int             lastSeenThreshold;      //!< The allowed number of frames since a certain feature was seen for the last time.
00414             int             timesSeenThreshold;     //!< The minimum number of frames for a certain feature to be considered stable.
00415 
00416             int             minFeaturesToFind;      //!< The minimum number of features allowed in the system. If current number is below this value, more features will be found.
00417             int             minFeaturesToBeLost;    //!< The minimum number of features allowed in the system to not be considered to be lost.
00418 
00419             /** Default constructor
00420               */
00421             TMultiResDescMatchOptions() :
00422                 useOriFilter( true ), oriThreshold( 0.2 ),
00423                 useDepthFilter( true ), matchingThreshold( 1e4 ), matchingRatioThreshold( 0.5 ),
00424                 lowScl1(0), lowScl2(0), highScl1(6), highScl2(6), searchAreaSize(20), lastSeenThreshold(10), timesSeenThreshold(5),
00425                 minFeaturesToFind(30), minFeaturesToBeLost(5) {}
00426 
00427             TMultiResDescMatchOptions(
00428                 const bool &_useOriFilter, const double &_oriThreshold, const bool &_useDepthFilter,
00429                 const double &_th, const double &_th2, const unsigned int &_lwscl1, const unsigned int &_lwscl2,
00430                 const unsigned int &_hwscl1, const unsigned int &_hwscl2, const int &_searchAreaSize, const int &_lsth, const int &_tsth,
00431                 const int &_minFeaturesToFind, const int &_minFeaturesToBeLost ) :
00432                 useOriFilter( _useOriFilter ), oriThreshold( _oriThreshold ), useDepthFilter( _useDepthFilter ),
00433                 matchingThreshold ( _th ), matchingRatioThreshold ( _th2 ), lowScl1( _lwscl1 ), lowScl2( _lwscl2 ),
00434                 highScl1( _hwscl1 ), highScl2( _hwscl2 ), searchAreaSize( _searchAreaSize ), lastSeenThreshold( _lsth ), timesSeenThreshold( _tsth ),
00435                 minFeaturesToFind( _minFeaturesToFind ), minFeaturesToBeLost(_minFeaturesToBeLost)  {}
00436 
00437             void  loadFromConfigFile( const mrpt::utils::CConfigFileBase &cfg, const std::string &section );
00438                         void  saveToConfigFile( mrpt::utils::CConfigFileBase &cfg, const std::string &section );
00439             void  dumpToTextStream( mrpt::utils::CStream &out) const;
00440 
00441                 }; // end TMultiResDescMatchOptions
00442 
00443         /** Struct containing the options when computing the multi-resolution SIFT-like descriptors
00444                 */
00445         struct VISION_IMPEXP TMultiResDescOptions : public mrpt::utils::CLoadableOptions
00446         {
00447             unsigned int    basePSize;          //!< The size of the base patch
00448             vector<double>  scales;             //!< The set of scales relatives to the base patch
00449             unsigned int    comLScl, comHScl;   //!< The subset of scales for which to compute the descriptors
00450             double          sg1, sg2, sg3;      //!< The sigmas for the Gaussian kernels
00451             bool            computeDepth;       //!< Whether or not to compute the depth of the feature
00452             bool            blurImage;          //!< Whether or not to blur the image previously to compute the descriptors
00453             double          fx,cx,cy,baseline;  //!< Intrinsic stereo pair parameters for computing the depth of the feature
00454             bool            computeHashCoeffs;  //!< Whether or not compute the coefficients for mantaining a HASH table of descriptors (for relocalization)
00455 
00456             double          cropValue;          //!< The SIFT-like descriptor is cropped at this value during normalization
00457 
00458             /** Default constructor
00459               */
00460             TMultiResDescOptions() :
00461                 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)
00462             {
00463                 scales.resize(7);
00464                 scales[0] = 0.5;
00465                 scales[1] = 0.8;
00466                 scales[2] = 1.0;
00467                 scales[3] = 1.2;
00468                 scales[4] = 1.5;
00469                 scales[5] = 1.8;
00470                 scales[6] = 2.0;
00471                 comLScl = 0;
00472                 comHScl = 6;
00473             }
00474 
00475             TMultiResDescOptions( const unsigned int &_basePSize, const vector<double> &_scales,
00476                 const unsigned int &_comLScl, const unsigned int &_comHScl,
00477                 const double &_sg1, const double &_sg2, const double &_sg3,
00478                 const bool &_computeDepth, const bool _blurImage, const double &_fx, const double &_cx, const double &_cy, const double &_baseline, const bool &_computeHashCoeffs, const double &_cropValue ):
00479                 basePSize( _basePSize ), comLScl( _comLScl ), comHScl( _comHScl ),
00480                 sg1( _sg1 ), sg2( _sg2 ), sg3( _sg3 ),
00481                 computeDepth( _computeDepth ), blurImage( _blurImage ), fx( _fx ), cx( _cx ), cy( _cy ), baseline( _baseline ), computeHashCoeffs( _computeHashCoeffs), cropValue( _cropValue )
00482             {
00483                 scales.resize( _scales.size() );
00484                 for(unsigned int k = 0; k < _scales.size(); ++k)
00485                     scales[k] = _scales[k];
00486             }
00487 
00488             void  loadFromConfigFile( const mrpt::utils::CConfigFileBase &cfg, const std::string &section );
00489                         void  saveToConfigFile( mrpt::utils::CConfigFileBase &cfg, const std::string &section );
00490             void  dumpToTextStream( mrpt::utils::CStream &out) const;
00491 
00492         }; // end TMultiResDescOptions
00493 
00494 
00495         /** @} */ // end of grouping
00496 
00497         }
00498 }
00499 
00500 
00501 #endif



Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011