Main MRPT website > C++ reference
MRPT logo
Namespaces | Classes | Typedefs | Enumerations | Functions

mrpt::vision Namespace Reference


Detailed Description

Classes for computer vision, detectors, features, etc.

Namespaces

namespace  pinhole
 

Functions related to pinhole camera models, point projections, etc.


Classes

class  CCamModel
 This class represent a pinhole camera model for Monocular SLAM and implements some associated Jacobians. More...
struct  CFeaturePtr
class  CFeature
 A generic 2D feature from an image, extracted with CFeatureExtraction Each feature may have one or more descriptors (see descriptors), in addition to an image patch. More...
class  CFeatureList
 A list of visual features, to be used as output by detectors, as input/output by trackers, etc. More...
class  CMatchedFeatureList
 A list of features. More...
class  CFeatureExtraction
 The central class from which images can be analyzed in search of different kinds of interest points and descriptors computed for them. More...
struct  TImageCalibData
 Data associated to each image in the calibration process mrpt::vision::checkerBoardCameraCalibration (All the information can be left empty and will be filled up in the calibration method). More...
class  CUndistortMap
 Use this class to undistort images if the same distortion map is used over and over again. More...
class  CVideoFileWriter
 An output stream which takes a sequence of images and writes a video file in any of a given of compatible formats. More...
struct  CGenericFeatureTracker
 A virtual interface for all feature trackers, implementing the part of feature tracking that is common to any specific tracker implementation. More...
struct  CFeatureTracker_KL
 Track a set of features from old_img -> new_img using sparse optimal flow (classic KL method). More...
struct  CFeatureTracker_FAST
 Track a set of features from old_img -> new_img by patch correlation over the closest FAST features, using a KD-tree for looking closest correspondences. More...
struct  CFeatureTracker_PatchMatch
 Track a set of features from old_img -> new_img by patch matching over a fixed window centered at each feature's previous location. More...
struct  TFeatureObservation
 One feature observation entry, used within sequences with TSequenceFeatureObservations. More...
struct  TRelativeFeaturePos
 One relative feature observation entry, used with some relative bundle-adjustment functions. More...
struct  TSequenceFeatureObservations
 A complete sequence of observations of features from different camera frames (poses). More...
struct  TCamCalibBAResults
 Data returned by mrpt::vision::camera_calib_ba. More...
struct  TStereoSystemParams
 Parameters associated to a stereo system. More...
struct  TROI
 A structure for storing a 3D ROI. More...
struct  TImageROI
 A structure for defining a ROI within an image. More...
struct  TMatchingOptions
 A structure containing options for the matching. More...
struct  TMultiResMatchingOutput
 Struct containing the output after matching multi-resolution SIFT-like descriptors. More...
struct  TMultiResDescMatchOptions
 Struct containing the options when matching multi-resolution SIFT-like descriptors. More...
struct  TMultiResDescOptions
 Struct containing the options when computing the multi-resolution SIFT-like descriptors. More...

Typedefs

typedef uint64_t TFeatureID
 Definition of a feature ID.
typedef TFeatureTrackStatus TKLTFeatureStatus
 For backward compatibility.
typedef map< int, map< int,
map< int, deque< pair
< TFeatureID, double > > > > > 
TQuantizationTable
typedef uint64_t TLandmarkID
 Unique IDs for landmarks.
typedef uint64_t TCameraPoseID
 Unique IDs for camera frames (poses)
typedef std::map
< TCameraPoseID, CPose3D
TFramePosesMap
 A list of camera frames (6D poses) indexed by unique IDs.
typedef std::vector< CPose3DTFramePosesVec
 A list of camera frames (6D poses), which assumes indexes are unique, consecutive IDs.
typedef std::map< TLandmarkID,
TPoint3D
TLandmarkLocationsMap
 A list of landmarks (3D points) indexed by unique IDs.
typedef std::vector< TPoint3DTLandmarkLocationsVec
 A list of landmarks (3D points), which assumes indexes are unique, consecutive IDs.
typedef std::map
< mrpt::vision::TFeatureID,
TRelativeFeaturePos
TRelativeFeaturePosMap
 An index of feature IDs and their relative locations.

Enumerations

enum  TFeatureType {
  featNotDefined = -1, featKLT = 0, featHarris, featBCD,
  featSIFT, featSURF, featBeacon, featFAST
}
 

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.

More...
enum  TDescriptorType {
  descAny = 0, descSIFT = 1, descSURF = 2, descSpinImages = 4,
  descPolarImages = 8, descLogPolarImages = 16
}
 

The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescriptors to indicate which descriptors are to be computed for features.

More...
enum  TFeatureTrackStatus {
  status_IDLE = 0, status_TRACKED = 5, status_OOB = 1, status_LOST = 10,
  statusKLT_IDLE = 0, statusKLT_OOB = 1, statusKLT_SMALL_DET = 2, statusKLT_LARGE_RESIDUE = 3,
  statusKLT_MAX_RESIDUE = 4, statusKLT_TRACKED = 5, statusKLT_MAX_ITERATIONS = 6
}
enum  TListIdx { firstList = 0, secondList, bothLists }

Functions

::mrpt::utils::CStreamoperator>> (mrpt::utils::CStream &in, CFeaturePtr &pObj)
void VISION_IMPEXP insertHashCoeffs (const CFeaturePtr &feat, TQuantizationTable &qTable)
TMultiResMatchingOutput
VISION_IMPEXP 
relocalizeMultiDesc (const CImage &image, CFeatureList &baseList, CFeatureList &currentList, TQuantizationTable &qTable, const TMultiResDescOptions &desc_opts, const TMultiResDescMatchOptions &match_opts)
void VISION_IMPEXP updateBaseList (CFeatureList &baseList, const CFeatureList &currentList, const vector< int > &idx)
void VISION_IMPEXP checkScalesAndFindMore (CMatchedFeatureList &baseList, const CFeatureList &currentList, const CImage &currentImage, const TMultiResMatchingOutput &output, const TMultiResDescOptions &computeOpts, const TMultiResDescMatchOptions &matchOpts)
bool VISION_IMPEXP computeGradient (const CImage &image, const unsigned int x, const unsigned int y, double &mag, double &ori)
 Computes the gradient of certain pixel within the image.
bool VISION_IMPEXP computeMainOrientations (const CImage &image, const unsigned int x, const unsigned int y, const unsigned int patchSize, std::vector< double > &orientations, const double &sigma)
 Computes the main orientations (within 80% of the peak value of orientation histogram) of a certain point within an image (for using in SIFT-based algorithms)
void VISION_IMPEXP interpolateHistEntry (vector< double > &hist, const double &cbin, const double &rbin, const double &obin, const double &mag, const int d, const int n)
 Inserts the orientation value of a certain pixel within the keypoint neighbourhood into the histogram of orientations.
void VISION_IMPEXP computeHistogramOfOrientations (const CImage &image, const unsigned int x, const unsigned int y, const unsigned int patchSize, const double &orientation, vector< int32_t > &descriptor, const TMultiResDescOptions &opts, vector< int32_t > &hashCoeffs)
 Computes the SIFT-like descriptor of a certain point within an image at the base scale, i.e.
TMultiResMatchingOutput
VISION_IMPEXP 
matchMultiResolutionFeatures (const CFeatureList &list1, CFeatureList &list2, const CImage &rightImage, const TMultiResDescMatchOptions &matchOpts, const TMultiResDescOptions &computeOpts)
 Matches two CFeatureList containing mulit-resolution descriptors.
int VISION_IMPEXP matchMultiResolutionFeatures (CMatchedFeatureList &mList1, CMatchedFeatureList &mList2, const CImage &leftImage, const CImage &rightImage, const TMultiResDescMatchOptions &matchOpts, const TMultiResDescOptions &computeOpts)
 Matches two CMatchedFeatureList containing mulit-resolution descriptors.
int VISION_IMPEXP computeMoreDescriptors (const CImage &image, const CFeaturePtr &inputFeat, CFeaturePtr &outputFeat, const bool &lowerScales, const TMultiResDescOptions &opts)
 Computes more multi-resolution SIFT-like descriptors for a feature using its position in a new image.
void VISION_IMPEXP setProperScales (const CFeaturePtr &feat1, const CFeaturePtr &feat2, int &firstScale, int &lastScale)
 Computes the initial and final scales where to look when finding a match between multi-resolution features.
void VISION_IMPEXP computeMultiResolutionDescriptors (const CImage &imageLeft, const CImage &imageRight, CMatchedFeatureList &matchedFeats, const TMultiResDescOptions &opts)
 Computes the multi-resolution SIFT-like descriptor of a set of matched features.
bool VISION_IMPEXP computeMultiResolutionDescriptors (const CImage &image, CFeaturePtr &feat, const TMultiResDescOptions &opts)
 Computes the multi-resolution SIFT-like descriptor of a features.
vector< bool > VISION_IMPEXP computeMultiResolutionDescriptors (const CImage &image, CFeatureList &list, const TMultiResDescOptions &opts)
 Computes the multi-resolution SIFT-like descriptor of a list of features.
void VISION_IMPEXP computeMultiOrientations (const CImage &image, CFeatureList &list, const TMultiResDescOptions &opts)
 Computes the multi-resolution SIFT-like descriptor of a list of features.
void VISION_IMPEXP openCV_cross_correlation (const CImage &img, const CImage &patch_img, size_t &x_max, size_t &y_max, double &max_val, int x_search_ini=-1, int y_search_ini=-1, int x_search_size=-1, int y_search_size=-1)
 Computes the correlation between this image and another one, encapsulating the openCV function cvMatchTemplate This implementation reduced computation time.
void VISION_IMPEXP flip (CImage &img)
 Invert an image using OpenCV function.
TPoint3D VISION_IMPEXP pixelTo3D (const TPixelCoordf &xy, const CMatrixDouble33 &A)
 Extract a UNITARY 3D vector in the direction of a 3D point, given from its (x,y) pixels coordinates, and the camera intrinsic coordinates.
CMatrixDouble33 VISION_IMPEXP buildIntrinsicParamsMatrix (const double focalLengthX, const double focalLengthY, const double centerX, const double centerY)
 Builds the intrinsic parameters matrix A from parameters:
CMatrixDouble33 VISION_IMPEXP defaultIntrinsicParamsMatrix (unsigned int camIndex=0, unsigned int resolutionX=320, unsigned int resolutionY=240)
 Returns the stored, default intrinsic params matrix for a given camera:
void VISION_IMPEXP deleteRepeatedFeats (CFeatureList &list)
 Explore the feature list and removes features which are in the same coordinates.
void VISION_IMPEXP rowChecking (CFeatureList &leftList, CFeatureList &rightList, float threshold=1.0)
 Search for correspondences which are not in the same row and deletes them.
void VISION_IMPEXP getDispersion (const CFeatureList &list, vector_float &std, vector_float &mean)
 Computes the dispersion of the features in the image.
void correctDistortion (const CImage &in_img, CImage &out_img, const CMatrixDouble33 &A, const vector_double &dist_coeffs)
 Returns a new image where distortion has been removed.
double VISION_IMPEXP computeMsd (const TMatchingPairList &list, const poses::CPose3D &Rt)
 Computes the mean squared distance between a set of 3D correspondences ...
void VISION_IMPEXP cloudsToMatchedList (const CObservationVisualLandmarks &cloud1, const CObservationVisualLandmarks &cloud2, TMatchingPairList &outList)
 Transform two clouds of 3D points into a matched list of points ...
float VISION_IMPEXP computeMainOrientation (const CImage &image, unsigned int x, unsigned int y)
 Computes the main orientation of a set of points with an image (for using in SIFT-based algorithms)
void VISION_IMPEXP normalizeImage (const CImage &image, CImage &nimage)
 Normalizes the brigthness and contrast of an image by setting its mean value to zero and its standard deviation to unit.
size_t VISION_IMPEXP matchFeatures (const CFeatureList &list1, const CFeatureList &list2, CMatchedFeatureList &matches, const TMatchingOptions &options=TMatchingOptions(), const TStereoSystemParams &params=TStereoSystemParams())
 Find the matches between two lists of features which must be of the same type.
void VISION_IMPEXP generateMask (const CMatchedFeatureList &mList, CMatrixBool &mask1, CMatrixBool &mask2, int wSize=10)
 Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.
double VISION_IMPEXP computeSAD (const CImage &patch1, const CImage &patch2)
 Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.
void VISION_IMPEXP addFeaturesToImage (const CImage &inImg, const CFeatureList &theList, CImage &outImg)
 Draw rectangles around each of the features on a copy of the input image.
void VISION_IMPEXP projectMatchedFeatures (const CFeatureList &leftList, const CFeatureList &rightList, vector< TPoint3D > &vP3D, const TStereoSystemParams &params=TStereoSystemParams())
 Computes the 3D position of a set of matched features from their coordinates in the images.
void VISION_IMPEXP projectMatchedFeature (const CFeaturePtr &leftFeat, const CFeaturePtr &rightFeat, TPoint3D &p3D, const TStereoSystemParams &params=TStereoSystemParams())
 Computes the 3D position of a particular matched feature.
void VISION_IMPEXP projectMatchedFeatures (CMatchedFeatureList &mfList, const TStereoSystemParams &param, CLandmarksMap &landmarks)
 Project a list of matched features into the 3D space, using the provided parameters of the stereo system.
void VISION_IMPEXP projectMatchedFeatures (CFeatureList &leftList, CFeatureList &rightList, const TStereoSystemParams &param, CLandmarksMap &landmarks)
 Project a pair of feature lists into the 3D space, using the provided options for the stereo system.
void VISION_IMPEXP StereoObs2BRObs (const CObservationStereoImages &inObs, const vector< double > &sg, CObservationBearingRange &outObs)
 Converts a stereo images observation into a bearing and range observation.
void VISION_IMPEXP StereoObs2BRObs (const CMatchedFeatureList &inMatches, const CMatrixDouble33 &intrinsicParams, const double &baseline, const CPose3D &sensorPose, const vector< double > &sg, CObservationBearingRange &outObs)
 Converts a matched feature list into a bearing and range observation (some of the stereo camera system must be provided).
void VISION_IMPEXP StereoObs2BRObs (const CObservationVisualLandmarks &inObs, CObservationBearingRange &outObs)
 Converts a CObservationVisualLandmarks into a bearing and range observation (without any covariances).
void VISION_IMPEXP computeStereoRectificationMaps (const TCamera &cam1, const TCamera &cam2, const poses::CPose3D &rightCameraPose, void *outMap1x, void *outMap1y, void *outMap2x, void *outMap2y)
 Computes a pair of x-and-y maps for stereo rectification from a pair of cameras and the relative pose of the second one wrt the first one.
Bundle-Adjustment Auxiliary methods
void VISION_IMPEXP ba_initial_estimate (const mrpt::vision::TSequenceFeatureObservations &observations, const mrpt::utils::TCamera &camera_params, mrpt::vision::TFramePosesVec &frame_poses, mrpt::vision::TLandmarkLocationsVec &landmark_points)
 Fills the frames & landmark points maps with an initial gross estimate from the sequence observations, so they can be fed to bundle adjustment methods.
void VISION_IMPEXP ba_initial_estimate (const mrpt::vision::TSequenceFeatureObservations &observations, const mrpt::utils::TCamera &camera_params, mrpt::vision::TFramePosesMap &frame_poses, mrpt::vision::TLandmarkLocationsMap &landmark_points)
double VISION_IMPEXP reprojectionResiduals (const mrpt::vision::TSequenceFeatureObservations &observations, const mrpt::utils::TCamera &camera_params, const mrpt::vision::TFramePosesVec &frame_poses, const mrpt::vision::TLandmarkLocationsVec &landmark_points, std::vector< CArray< double, 2 > > &out_residuals, const bool frame_poses_are_inverse, const bool use_robust_kernel=true)
 Compute reprojection error vector (used from within Bundle Adjustment methods, but can be used in general) See mrpt::vision::bundle_adj_full for a description of most parameters.
double VISION_IMPEXP reprojectionResiduals (const mrpt::vision::TSequenceFeatureObservations &observations, const mrpt::utils::TCamera &camera_params, const mrpt::vision::TFramePosesMap &frame_poses, const mrpt::vision::TLandmarkLocationsMap &landmark_points, std::vector< CArray< double, 2 > > &out_residuals, const bool frame_poses_are_inverse, const bool use_robust_kernel=true)
void VISION_IMPEXP add_se3_deltas_to_frames (const mrpt::vision::TFramePosesVec &frame_poses, const mrpt::vector_double &delta, const size_t delta_first_idx, const size_t delta_num_vals, mrpt::vision::TFramePosesVec &new_frame_poses, const size_t num_fix_frames)
 For each pose in the vector frame_poses, adds a "delta" increment to the manifold, with the "delta" given in the se(3) Lie algebra:
void VISION_IMPEXP add_3d_deltas_to_points (const mrpt::vision::TLandmarkLocationsVec &landmark_points, const mrpt::vector_double &delta, const size_t delta_first_idx, const size_t delta_num_vals, mrpt::vision::TLandmarkLocationsVec &new_landmark_points, const size_t num_fix_points)
 For each pose in the vector frame_poses, adds a "delta" increment to the manifold, with the "delta" given in the se(3) Lie algebra:
Chessboard find corner functions
bool VISION_IMPEXP findChessboardCorners (const mrpt::utils::CImage &img, std::vector< TPixelCoordf > &cornerCoords, unsigned int check_size_x, unsigned int check_size_y, bool normalize_image=true, bool useScaramuzzaMethod=false)
 Look for the corners of a chessboard in the image using one of two different methods.
void VISION_IMPEXP findMultipleChessboardsCorners (const mrpt::utils::CImage &img, std::vector< std::vector< TPixelCoordf > > &cornerCoords, unsigned int check_size_x, unsigned int check_size_y)
 Look for the corners of one or more chessboard/checkerboards in the image.

Bundle-Adjustment methods

typedef void(* TBundleAdjustmentFeedbackFunctor )(const size_t cur_iter, const double cur_total_sq_error, const size_t max_iters, const mrpt::vision::TSequenceFeatureObservations &input_observations, const mrpt::vision::TFramePosesVec &current_frame_estimate, const mrpt::vision::TLandmarkLocationsVec &current_landmark_estimate)
 A functor type for BA methods.
double VISION_IMPEXP bundle_adj_full (const mrpt::vision::TSequenceFeatureObservations &observations, const mrpt::utils::TCamera &camera_params, mrpt::vision::TFramePosesVec &frame_poses, mrpt::vision::TLandmarkLocationsVec &landmark_points, const mrpt::utils::TParametersDouble &extra_params=mrpt::utils::TParametersDouble(), const mrpt::vision::TBundleAdjustmentFeedbackFunctor user_feedback=NULL)
 Sparse Levenberg-Marquart solution to bundle adjustment - optimizes all the camera frames & the landmark locations.

Chessboard calibration

typedef std::map< std::string,
TImageCalibData
TCalibrationImageList
 A list of images, used in checkerBoardCameraCalibration.
bool VISION_IMPEXP checkerBoardCameraCalibration (TCalibrationImageList &images, unsigned int check_size_x, unsigned int check_size_y, double check_squares_length_X_meters, double check_squares_length_Y_meters, mrpt::utils::TCamera &out_camera_params, bool normalize_image=true, double *out_MSE=NULL, bool skipDrawDetectedImgs=false, bool useScaramuzzaAlternativeDetector=false)
 Performs a camera calibration (computation of projection and distortion parameters) from a sequence of captured images of a checkerboard.
bool VISION_IMPEXP checkerBoardCameraCalibration (TCalibrationImageList &images, unsigned int check_size_x, unsigned int check_size_y, double check_squares_length_X_meters, double check_squares_length_Y_meters, CMatrixDouble33 &intrinsicParams, std::vector< double > &distortionParams, bool normalize_image=true, double *out_MSE=NULL, bool skipDrawDetectedImgs=false, bool useScaramuzzaAlternativeDetector=false)
 Performs a camera calibration (computation of projection and distortion parameters) from a sequence of captured images of a checkerboard.

All related to feature tracking

typedef std::auto_ptr
< CGenericFeatureTracker
CGenericFeatureTrackerAutoPtr
 MRPT_DECLARE_DEPRECATED_FUNCTION ("Deprecated: See CGenericFeatureTracker", void VISION_IMPEXP trackFeatures(const CImage &old_img, const CImage &new_img, vision::CFeatureList &featureList, const unsigned int window_width=15, const unsigned int window_height=15))
 (Deprecated) Track a set of features from img1 -> img2 using sparse optimal flow (classic KL method)
 MRPT_DECLARE_DEPRECATED_FUNCTION ("Deprecated: See CGenericFeatureTracker", void VISION_IMPEXP trackFeatures(const CImage &inImg1, const CImage &inImg2, const CFeatureList &inFeatureList, CFeatureList &outFeatureList, const unsigned int window_width, const unsigned int window_height))
 (Deprecated) Track a set of features from img1 -> img2 using sparse optimal flow (classic KL method)
void VISION_IMPEXP checkTrackedFeatures (CFeatureList &leftList, CFeatureList &rightList, vision::TMatchingOptions options)
 Search for correspondences which are not in the same row and deletes them ...
void VISION_IMPEXP trackFeatures2 (const CImage &inImg1, const CImage &inImg2, CFeatureList &featureList, const unsigned int window_width=15, const unsigned int window_height=15)
 Tracks a set of features in an image.
void VISION_IMPEXP filterBadCorrsByDistance (mrpt::utils::TMatchingPairList &list, unsigned int numberOfSigmas)
 Filter bad correspondences by distance ...

Typedef Documentation

Definition at line 202 of file tracking.h.

typedef void(* mrpt::vision::TBundleAdjustmentFeedbackFunctor)(const size_t cur_iter, const double cur_total_sq_error, const size_t max_iters, const mrpt::vision::TSequenceFeatureObservations &input_observations, const mrpt::vision::TFramePosesVec &current_frame_estimate, const mrpt::vision::TLandmarkLocationsVec &current_landmark_estimate)

A functor type for BA methods.

See also:
bundle_adj_full

Definition at line 49 of file bundle_adjustment.h.

A list of images, used in checkerBoardCameraCalibration.

See also:
checkerBoardCameraCalibration

Definition at line 63 of file chessboard_camera_calib.h.

typedef uint64_t mrpt::vision::TCameraPoseID

Unique IDs for camera frames (poses)

Definition at line 49 of file vision/include/mrpt/vision/types.h.

typedef uint64_t mrpt::vision::TFeatureID

Definition of a feature ID.

Definition at line 48 of file CFeature.h.

A list of camera frames (6D poses) indexed by unique IDs.

Definition at line 51 of file vision/include/mrpt/vision/types.h.

typedef std::vector<CPose3D> mrpt::vision::TFramePosesVec

A list of camera frames (6D poses), which assumes indexes are unique, consecutive IDs.

Definition at line 52 of file vision/include/mrpt/vision/types.h.

For backward compatibility.

Definition at line 109 of file CFeature.h.

typedef uint64_t mrpt::vision::TLandmarkID

Unique IDs for landmarks.

Definition at line 48 of file vision/include/mrpt/vision/types.h.

A list of landmarks (3D points) indexed by unique IDs.

Definition at line 54 of file vision/include/mrpt/vision/types.h.

A list of landmarks (3D points), which assumes indexes are unique, consecutive IDs.

Definition at line 55 of file vision/include/mrpt/vision/types.h.

typedef map<int,map<int,map<int,deque<pair<TFeatureID, double> > > > > mrpt::vision::TQuantizationTable

Definition at line 58 of file multiDesc_utils.h.

An index of feature IDs and their relative locations.

Definition at line 80 of file vision/include/mrpt/vision/types.h.


Enumeration Type Documentation

The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescriptors to indicate which descriptors are to be computed for features.

Enumerator:
descAny 

Used in some methods to mean "any of the present descriptors".

descSIFT 

SIFT descriptors.

descSURF 

SURF descriptors.

descSpinImages 

Intensity-domain spin image descriptors.

descPolarImages 

Polar image descriptor.

descLogPolarImages 

Log-Polar image descriptor.

Definition at line 70 of file CFeature.h.

Enumerator:
status_IDLE 

Inactive (right after detection, and before being tried to track)

status_TRACKED 

Feature correctly tracked.

status_OOB 

Feature felt Out Of Bounds.

status_LOST 

Unable to track this feature.

statusKLT_IDLE 

Inactive.

statusKLT_OOB 

Out Of Bounds (Value identical to status_OOB)

statusKLT_SMALL_DET 

Determinant of the matrix too small.

statusKLT_LARGE_RESIDUE 

Error too big.

statusKLT_MAX_RESIDUE 
statusKLT_TRACKED 

Feature correctly tracked (Value identical to status_TRACKED)

statusKLT_MAX_ITERATIONS 

Iteration maximum reached.

Definition at line 80 of file CFeature.h.

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.

Enumerator:
featNotDefined 

Non-defined feature (also used for Occupancy features)

featKLT 

Kanade-Lucas-Tomasi feature [SHI'94].

featHarris 

Harris border and corner detector [HARRIS].

featBCD 

Binary corder detector.

featSIFT 

Scale Invariant Feature Transform [LOWE'04].

featSURF 

Speeded Up Robust Feature [BAY'06].

featBeacon 

A especial case: this is not an image feature, but a 2D/3D beacon (used for range-only SLAM from mrpt::slam::CLandmark)

featFAST 

FAST feature detector ("Faster and better: A machine learning approach to corner detection", E. Rosten, R. Porter and T. Drummond, PAMI, 2009).

Definition at line 56 of file CFeature.h.

Enumerator:
firstList 
secondList 
bothLists 

Definition at line 102 of file CFeature.h.


Function Documentation

void VISION_IMPEXP mrpt::vision::add_3d_deltas_to_points ( const mrpt::vision::TLandmarkLocationsVec landmark_points,
const mrpt::vector_double delta,
const size_t  delta_first_idx,
const size_t  delta_num_vals,
mrpt::vision::TLandmarkLocationsVec new_landmark_points,
const size_t  num_fix_points 
)

For each pose in the vector frame_poses, adds a "delta" increment to the manifold, with the "delta" given in the se(3) Lie algebra:

new_landmark_points[i] = landmark_points[i] + delta[(first_idx+3*i):(first_idx+3*i+2)] , for every pose in landmark_points

Parameters:
delta_num_valsUsed just for sanity check, must be equal to "landmark_points.size() * 3"
void VISION_IMPEXP mrpt::vision::add_se3_deltas_to_frames ( const mrpt::vision::TFramePosesVec frame_poses,
const mrpt::vector_double delta,
const size_t  delta_first_idx,
const size_t  delta_num_vals,
mrpt::vision::TFramePosesVec new_frame_poses,
const size_t  num_fix_frames 
)

For each pose in the vector frame_poses, adds a "delta" increment to the manifold, with the "delta" given in the se(3) Lie algebra:

new_frame_poses[i] = frame_poses[i] [+] delta[(first_idx+6*i):(first_idx+6*i+5)] , for every pose in frame_poses

With the left-multiplication convention of the manifold exp(delta) operator, that is:

p <-- p [+] delta ==> p <-- exp(delta) * p

Parameters:
delta_num_valsUsed just for sanity check, must be equal to "frame_poses.size() * 6"
void VISION_IMPEXP mrpt::vision::addFeaturesToImage ( const CImage &  inImg,
const CFeatureList &  theList,
CImage &  outImg 
)

Draw rectangles around each of the features on a copy of the input image.

Parameters:
inImg[IN] The input image where to draw the features.
theList[IN] The list of features.
outImg[OUT] The copy of the input image with the marked features.
void VISION_IMPEXP mrpt::vision::ba_initial_estimate ( const mrpt::vision::TSequenceFeatureObservations observations,
const mrpt::utils::TCamera camera_params,
mrpt::vision::TFramePosesMap frame_poses,
mrpt::vision::TLandmarkLocationsMap landmark_points 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void VISION_IMPEXP mrpt::vision::ba_initial_estimate ( const mrpt::vision::TSequenceFeatureObservations observations,
const mrpt::utils::TCamera camera_params,
mrpt::vision::TFramePosesVec frame_poses,
mrpt::vision::TLandmarkLocationsVec landmark_points 
)

Fills the frames & landmark points maps with an initial gross estimate from the sequence observations, so they can be fed to bundle adjustment methods.

See also:
bundle_adj_full
CMatrixDouble33 VISION_IMPEXP mrpt::vision::buildIntrinsicParamsMatrix ( const double  focalLengthX,
const double  focalLengthY,
const double  centerX,
const double  centerY 
)

Builds the intrinsic parameters matrix A from parameters:

Parameters:
focalLengthX[IN] The focal length, in X (horizontal) pixels
focalLengthY[IN] The focal length, in Y (vertical) pixels
centerX[IN] The image center, horizontal, in pixels
centerY[IN] The image center, vertical, in pixels


This method returns the matrix:

f_x0cX
0f_ycY
001

See also the tutorial discussing the camera model parameters.

See also:
defaultIntrinsicParamsMatrix, pixelTo3D
double VISION_IMPEXP mrpt::vision::bundle_adj_full ( const mrpt::vision::TSequenceFeatureObservations observations,
const mrpt::utils::TCamera camera_params,
mrpt::vision::TFramePosesVec frame_poses,
mrpt::vision::TLandmarkLocationsVec landmark_points,
const mrpt::utils::TParametersDouble extra_params = mrpt::utils::TParametersDouble(),
const mrpt::vision::TBundleAdjustmentFeedbackFunctor  user_feedback = NULL 
)

Sparse Levenberg-Marquart solution to bundle adjustment - optimizes all the camera frames & the landmark locations.

At input a gross estimation of the frame poses & the landmark points must be supplied. If you don't have such a starting point, use mrpt::vision::ba_initial_estimate() to compute it.

At output the best found solution will be returned in the variables. Optionally, a functor can be passed for having feedback on the progress at each iteration (you can use it to refresh a GUI, display a progress bar, etc...).

This implementation is almost entirely an adapted version from RobotVision (at OpenSLAM.org) (C) by Hauke Strasdat (Imperial College London), licensed under GNU LGPL. See the related paper: H. Strasdat, J.M.M. Montiel, A.J. Davison: "Scale Drift-Aware Large Scale Monocular SLAM", RSS2010, http://www.roboticsproceedings.org/rss06/p10.html

List of optional parameters in "extra_params":

  • "verbose" : Verbose output (default=0)
  • "max_iterations": Maximum number of iterations to run (default=50)
  • "robust_kernel": If !=0, use a robust kernel against outliers (default=1)
  • "mu": Initial mu for LevMarq (default=-1 -> autoguess)
  • "num_fix_frames": Number of first frame poses to don't optimize (keep unmodified as they come in) (default=1: the first pose is the reference and is not modified)
  • "num_fix_points": Idem, for the landmarks positions (default=0: optimize all)
  • "profiler": If !=0, displays profiling information to the console at return.
Note:
In this function, all coordinates are absolute. Camera frames are such that +Z points forward from the focal point (see the figure in mrpt::slam::CObservationImage).
The first frame pose will be not updated since at least one frame must remain fixed.
Parameters:
observations[IN] All the feature observations (WITHOUT distortion), indexed by feature ID as lists of <frame_ID, (x,y)>. See TSequenceFeatureObservations.
camera_params[IN] The camera parameters, mainly used for the intrinsic 3x3 matrix. Distortion params are ignored since it's assumed that observations are already undistorted pixels.
frame_poses[IN/OUT] Input: Gross estimation of each frame poses. Output: The found optimal solution.
landmark_points[IN/OUT] Input: Gross estimation of each landmark point. Output: The found optimal solution.
extra_params[IN] Optional extra parameters. Read above.
user_feedback[IN] If provided, this functor will be called at each iteration to provide a feedback to the user.
Returns:
The final overall squared error.
bool VISION_IMPEXP mrpt::vision::checkerBoardCameraCalibration ( TCalibrationImageList &  images,
unsigned int  check_size_x,
unsigned int  check_size_y,
double  check_squares_length_X_meters,
double  check_squares_length_Y_meters,
mrpt::utils::TCamera out_camera_params,
bool  normalize_image = true,
double *  out_MSE = NULL,
bool  skipDrawDetectedImgs = false,
bool  useScaramuzzaAlternativeDetector = false 
)

Performs a camera calibration (computation of projection and distortion parameters) from a sequence of captured images of a checkerboard.

Parameters:
input_images[IN/OUT] At input, this list must have one entry for each image to process. At output the original, detected checkboard and rectified images can be found here. See TImageCalibData.
check_size_x[IN] The number of squares in the checkerboard in the X direction.
check_size_y[IN] The number of squares in the checkerboard in the Y direction.
check_squares_length_X_meters[IN] The size of each square in the checkerboard, in meters, in the X axis.
check_squares_length_Y_meters[IN] This will typically be equal to check_squares_length_X_meters.
intrinsicParams[OUT] The 3x3 intrinsic parameters matrix. See http://www.mrpt.org/Camera_Parameters
distortionParams[OUT] The 1x4 vector of distortion parameters: k1 k2 p1 p2. See http://www.mrpt.org/Camera_Parameters
normalize_image[IN] Select OpenCV flag
out_MSE[OUT] If set to !=NULL, the mean square error of the reprojection will be stored here (in pixel units).
skipDrawDetectedImgs[IN] Whether to skip the generation of the undistorted and detected images in each TImageCalibData
useScaramuzzaAlternativeDetector[IN] Whether to use an alternative detector. See CImage::findChessboardCorners for more deatails and references.
See also:
The camera-calib-gui application is a user-friendly GUI to this class.
Returns:
false on any error (more info will be dumped to cout), or true on success.
See also:
CImage::findChessboardCorners
bool VISION_IMPEXP mrpt::vision::checkerBoardCameraCalibration ( TCalibrationImageList &  images,
unsigned int  check_size_x,
unsigned int  check_size_y,
double  check_squares_length_X_meters,
double  check_squares_length_Y_meters,
CMatrixDouble33 &  intrinsicParams,
std::vector< double > &  distortionParams,
bool  normalize_image = true,
double *  out_MSE = NULL,
bool  skipDrawDetectedImgs = false,
bool  useScaramuzzaAlternativeDetector = false 
)

Performs a camera calibration (computation of projection and distortion parameters) from a sequence of captured images of a checkerboard.

Parameters:
input_images[IN/OUT] At input, this list must have one entry for each image to process. At output the original, detected checkboard and rectified images can be found here. See TImageCalibData.
check_size_x[IN] The number of squares in the checkerboard in the X direction.
check_size_y[IN] The number of squares in the checkerboard in the Y direction.
check_squares_length_X_meters[IN] The size of each square in the checkerboard, in meters, in the X axis.
check_squares_length_Y_meters[IN] This will typically be equal to check_squares_length_X_meters.
intrinsicParams[OUT] The 3x3 intrinsic parameters matrix. See http://www.mrpt.org/Camera_Parameters
distortionParams[OUT] The 1x4 vector of distortion parameters: k1 k2 p1 p2. See http://www.mrpt.org/Camera_Parameters
normalize_image[IN] Select OpenCV flag
out_MSE[OUT] If set to !=NULL, the mean square error of the reprojection will be stored here (in pixel units).
skipDrawDetectedImgs[IN] Whether to skip the generation of the undistorted and detected images in each TImageCalibData
useScaramuzzaAlternativeDetector[IN] Whether to use an alternative detector. See CImage::findChessboardCorners for more deatails and references.
See also:
The camera-calib-gui application is a user-friendly GUI to this class.
Returns:
false on any error (more info will be dumped to cout), or true on success.
See also:
CImage::findChessboardCorners
void VISION_IMPEXP mrpt::vision::checkScalesAndFindMore ( CMatchedFeatureList &  baseList,
const CFeatureList &  currentList,
const CImage &  currentImage,
const TMultiResMatchingOutput &  output,
const TMultiResDescOptions &  computeOpts,
const TMultiResDescMatchOptions &  matchOpts 
)
void VISION_IMPEXP mrpt::vision::checkTrackedFeatures ( CFeatureList &  leftList,
CFeatureList &  rightList,
vision::TMatchingOptions  options 
)

Search for correspondences which are not in the same row and deletes them ...

void VISION_IMPEXP mrpt::vision::cloudsToMatchedList ( const CObservationVisualLandmarks &  cloud1,
const CObservationVisualLandmarks &  cloud2,
TMatchingPairList &  outList 
)

Transform two clouds of 3D points into a matched list of points ...

bool VISION_IMPEXP mrpt::vision::computeGradient ( const CImage &  image,
const unsigned int  x,
const unsigned int  y,
double &  mag,
double &  ori 
)

Computes the gradient of certain pixel within the image.

Parameters:
image[IN] The input image.
x[IN] The 'x' coordinate of the image point.
y[IN] The 'y' coordinate of the image point.
mag[OUT] The magnitude of the gradient.
ori[OUT] The orientation of the gradient.
Returns:
True if the gradient could be computed and False if the pixel is located outside the image or at its border (where the gradient cannot be computed)
void VISION_IMPEXP mrpt::vision::computeHistogramOfOrientations ( const CImage &  image,
const unsigned int  x,
const unsigned int  y,
const unsigned int  patchSize,
const double &  orientation,
vector< int32_t > &  descriptor,
const TMultiResDescOptions &  opts,
vector< int32_t > &  hashCoeffs 
)

Computes the SIFT-like descriptor of a certain point within an image at the base scale, i.e.

its rotated orientation histogram.

Parameters:
image[IN] The input image.
x[IN] The 'x' coordinate of the image point.
y[IN] The 'y' coordinate of the image point.
patchSize[IN] The size of the patch to be considered for computing the orientation histogram.
orientation[IN] The orientation considered for this point (used to rotate the patch).
orientation[OUT] The computed SIFT-like descriptor.
opts[IN] The options for computing the SIFT-like descriptor.
hashCoeffs[OUT] A vector containing the computed coefficients for the HASH table used in relocalization.
See also:
TMultiResDescOptions
float VISION_IMPEXP mrpt::vision::computeMainOrientation ( const CImage &  image,
unsigned int  x,
unsigned int  y 
)

Computes the main orientation of a set of points with an image (for using in SIFT-based algorithms)

Parameters:
image[IN] The input image.
x[IN] A vector containing the 'x' coordinates of the image points.
y[IN] A vector containing the 'y' coordinates of the image points.
Returns:
The main orientation of the image point.
bool VISION_IMPEXP mrpt::vision::computeMainOrientations ( const CImage &  image,
const unsigned int  x,
const unsigned int  y,
const unsigned int  patchSize,
std::vector< double > &  orientations,
const double &  sigma 
)

Computes the main orientations (within 80% of the peak value of orientation histogram) of a certain point within an image (for using in SIFT-based algorithms)

Parameters:
image[IN] The input image.
x[IN] The 'x' coordinate of the image point.
y[IN] The 'y' coordinate of the image point.
patchSize[IN] The size of the patch to be considered for computing the orientation histogram.
orientations[OUT] A vector containing the main orientations of the image point.
sigma[IN] The sigma value of the Gaussian kernel used to smooth the orientation histogram (typically 7.5 px).
int VISION_IMPEXP mrpt::vision::computeMoreDescriptors ( const CImage &  image,
const CFeaturePtr &  inputFeat,
CFeaturePtr &  outputFeat,
const bool &  lowerScales,
const TMultiResDescOptions &  opts 
)

Computes more multi-resolution SIFT-like descriptors for a feature using its position in a new image.

This is called when we have found a match between a feature and itself in a new frame but it has been found in a boundary scale. We now expand the range of scales, orientations and descriptors for that feature.

Parameters:
image[IN] The new frame.
inputFeat[IN] The feature in the new frame.
outputFeat[OUT] The base feature (detected in the base frame).
lowerScales[IN] If we should find descriptors for lower scales or for higher ones.
opts[IN] The options for computing the new descriptors.
double VISION_IMPEXP mrpt::vision::computeMsd ( const TMatchingPairList &  list,
const poses::CPose3D &  Rt 
)

Computes the mean squared distance between a set of 3D correspondences ...

void VISION_IMPEXP mrpt::vision::computeMultiOrientations ( const CImage &  image,
CFeatureList &  list,
const TMultiResDescOptions &  opts 
)

Computes the multi-resolution SIFT-like descriptor of a list of features.

Parameters:
image[IN] The input image.
list[IN/OUT] The list of features. They will be updated with the multi-scales, multi-orientations and multi-descriptors information.
opts[IN] The options structure for the descriptor computation process.
See also:
TMultiResDescOptions
void VISION_IMPEXP mrpt::vision::computeMultiResolutionDescriptors ( const CImage &  imageLeft,
const CImage &  imageRight,
CMatchedFeatureList &  matchedFeats,
const TMultiResDescOptions &  opts 
)

Computes the multi-resolution SIFT-like descriptor of a set of matched features.

Parameters:
imageLeft[IN] The input left image.
imageRight[IN] The input right image.
matchedFeats[IN/OUT] The list of matched features. They will be updated with the multi-scales, multi-orientations, multi-descriptors and depth information.
opts[IN] The options structure for the descriptor computation process.
See also:
TMultiResDescOptions
bool VISION_IMPEXP mrpt::vision::computeMultiResolutionDescriptors ( const CImage &  image,
CFeaturePtr &  feat,
const TMultiResDescOptions &  opts 
)

Computes the multi-resolution SIFT-like descriptor of a features.

Parameters:
image[IN] The input left image.
feat[IN/OUT] The feature. It will be updated with the multi-scales, multi-orientations, multi-descriptors
opts[IN] The options structure for the descriptor computation process.
See also:
TMultiResDescOptions
vector<bool> VISION_IMPEXP mrpt::vision::computeMultiResolutionDescriptors ( const CImage &  image,
CFeatureList &  list,
const TMultiResDescOptions &  opts 
)

Computes the multi-resolution SIFT-like descriptor of a list of features.

Parameters:
image[IN] The input image.
list[IN/OUT] The list of features. They will be updated with the multi-scales, multi-orientations and multi-descriptors information.
opts[IN] The options structure for the descriptor computation process.
See also:
TMultiResDescOptions
double VISION_IMPEXP mrpt::vision::computeSAD ( const CImage &  patch1,
const CImage &  patch2 
)

Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.

Both patches must have the same size.

Parameters:
patch1[IN] One patch.
patch2[IN] The other patch.
Returns:
The value of computed SAD normalized to [0,1]
void VISION_IMPEXP mrpt::vision::computeStereoRectificationMaps ( const TCamera &  cam1,
const TCamera &  cam2,
const poses::CPose3D &  rightCameraPose,
void *  outMap1x,
void *  outMap1y,
void *  outMap2x,
void *  outMap2y 
)

Computes a pair of x-and-y maps for stereo rectification from a pair of cameras and the relative pose of the second one wrt the first one.

Parameters:
cam1,cam2[IN] The pair of involved cameras
rightCameraPose[IN] The change in pose of the second camera wrt the first one
outMap1x,outMap1y[OUT] The x-and-y maps corresponding to cam1 (should be converted to *cvMat)
outMap2x,outMap2y[OUT] The x-and-y maps corresponding to cam2 (should be converted to *cvMat)
void mrpt::vision::correctDistortion ( const CImage &  in_img,
CImage &  out_img,
const CMatrixDouble33 &  A,
const vector_double &  dist_coeffs 
) [inline]

Returns a new image where distortion has been removed.

Parameters:
AThe 3x3 intrinsic parameters matrix
dist_coeffsThe 1x4 (or 1x5) vector of distortion coefficients

Definition at line 206 of file vision/include/mrpt/vision/utils.h.

References mrpt::utils::CImage::rectifyImage().

CMatrixDouble33 VISION_IMPEXP mrpt::vision::defaultIntrinsicParamsMatrix ( unsigned int  camIndex = 0,
unsigned int  resolutionX = 320,
unsigned int  resolutionY = 240 
)

Returns the stored, default intrinsic params matrix for a given camera:

Parameters:
camIndex[IN] Posible values are listed next.
resolutionX[IN] The number of pixel columns
resolutionY[IN] The number of pixel rows

The matrix is generated for the indicated camera resolution configuration. The following table summarizes the current supported cameras and the values as ratios of the corresponding horz. or vert. resolution:

camIndex
Manufacturer
Camera model
fx
fy
cx
cy

0
Point Grey Research
Bumblebee
0.79345
1.05793
0.55662
0.52692

1
Sony
???
0.95666094
1.3983423f
0.54626328f
0.4939191f
See also:
buildIntrinsicParamsMatrix, pixelTo3D
void VISION_IMPEXP mrpt::vision::deleteRepeatedFeats ( CFeatureList &  list )

Explore the feature list and removes features which are in the same coordinates.

Parameters:
list[IN] The list of features.
void VISION_IMPEXP mrpt::vision::filterBadCorrsByDistance ( mrpt::utils::TMatchingPairList list,
unsigned int  numberOfSigmas 
)

Filter bad correspondences by distance ...

bool VISION_IMPEXP mrpt::vision::findChessboardCorners ( const mrpt::utils::CImage img,
std::vector< TPixelCoordf > &  cornerCoords,
unsigned int  check_size_x,
unsigned int  check_size_y,
bool  normalize_image = true,
bool  useScaramuzzaMethod = false 
)

Look for the corners of a chessboard in the image using one of two different methods.

The search algorithm will be OpenCV's function cvFindChessboardCorners or its improved version published by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm and the papers:

  • 1. Scaramuzza, D., Martinelli, A. and Siegwart, R. (2006), A Toolbox for Easily Calibrating Omnidirectional Cameras, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2006), Beijing, China, October 2006.
  • 2. Scaramuzza, D., Martinelli, A. and Siegwart, R., (2006). "A Flexible Technique for Accurate Omnidirectional Camera Calibration and Structure from Motion", Proceedings of IEEE International Conference of Vision Systems (ICVS'06), New York, January 5-7, 2006.
  • 3. Rufli, M., Scaramuzza, D., and Siegwart, R. (2008), Automatic Detection of Checkerboards on Blurred and Distorted Images, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2008), Nice, France, September 2008.

After detecting the corners with either method, it's called "cvFindCornerSubPix" to achieve subpixel accuracy.

Parameters:
cornerCoords[OUT] The pixel coordinates of all the corners.
check_size_x[IN] The number of squares, in the X direction
check_size_y[IN] The number of squares, in the Y direction
normalize_image[IN] Whether to normalize the image before detection
useScaramuzzaMethod[IN] Whether to use the alternative, more robust method by M. Rufli, D. Scaramuzza, and R. Siegwart.
Returns:
true on success
See also:
findMultipleChessboardsCorners, mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
void VISION_IMPEXP mrpt::vision::findMultipleChessboardsCorners ( const mrpt::utils::CImage img,
std::vector< std::vector< TPixelCoordf > > &  cornerCoords,
unsigned int  check_size_x,
unsigned int  check_size_y 
)

Look for the corners of one or more chessboard/checkerboards in the image.

This method uses an improved version of OpenCV's cvFindChessboardCorners published by M. Rufli, D. Scaramuzza, and R. Siegwart. See: http://robotics.ethz.ch/~scaramuzza/Davide_Scaramuzza_files/Research/OcamCalib_Tutorial.htm and the papers:

  • 1. Scaramuzza, D., Martinelli, A. and Siegwart, R. (2006), A Toolbox for Easily Calibrating Omnidirectional Cameras, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2006), Beijing, China, October 2006.
  • 2. Scaramuzza, D., Martinelli, A. and Siegwart, R., (2006). "A Flexible Technique for Accurate Omnidirectional Camera Calibration and Structure from Motion", Proceedings of IEEE International Conference of Vision Systems (ICVS'06), New York, January 5-7, 2006.
  • 3. Rufli, M., Scaramuzza, D., and Siegwart, R. (2008), Automatic Detection of Checkerboards on Blurred and Distorted Images, Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2008), Nice, France, September 2008.

That method has been extended in this MRPT implementation to automatically detect a number of different checkerboards in the same image.

Parameters:
cornerCoords[OUT] A vector of N vectors of pixel coordinates, for each of the N chessboards detected.
check_size_x[IN] The number of squares, in the X direction
check_size_y[IN] The number of squares, in the Y direction
See also:
mrpt::vision::checkerBoardCameraCalibration, drawChessboardCorners
void VISION_IMPEXP mrpt::vision::flip ( CImage &  img )

Invert an image using OpenCV function.

void VISION_IMPEXP mrpt::vision::generateMask ( const CMatchedFeatureList &  mList,
CMatrixBool &  mask1,
CMatrixBool &  mask2,
int  wSize = 10 
)

Calculates the Sum of Absolutes Differences (range [0,1]) between two patches.

Both patches must have the same size.

Parameters:
mList[IN] The list of matched features.
mask1[OUT] The output mask for left features.
mask2[OUT] The output mask for right features.
wSize[IN] The value of the masking window for each features.
Exceptions:
ifmList.size() = 0
void VISION_IMPEXP mrpt::vision::getDispersion ( const CFeatureList &  list,
vector_float &  std,
vector_float &  mean 
)

Computes the dispersion of the features in the image.

Parameters:
list[IN] Input list of features
std[OUT] 2 element vector containing the standard deviations in the 'x' and 'y' coordinates.
mean[OUT] 2 element vector containing the mean in the 'x' and 'y' coordinates.
void VISION_IMPEXP mrpt::vision::insertHashCoeffs ( const CFeaturePtr &  feat,
TQuantizationTable &  qTable 
)
void VISION_IMPEXP mrpt::vision::interpolateHistEntry ( vector< double > &  hist,
const double &  cbin,
const double &  rbin,
const double &  obin,
const double &  mag,
const int  d,
const int  n 
)

Inserts the orientation value of a certain pixel within the keypoint neighbourhood into the histogram of orientations.

This value can affect to more than one entry within the histogram.

Parameters:
hist[IN/OUT] The histogram of orientations.
cbin[IN] The entry rotated column bin.
rbin[IN] The entry rotated row bin.
obin[IN] The entry rotated orientation bin.
mag[IN] The gradient magnitude value in the pixel.
d[IN] The number of row (and column) bins used in the histogram (typically 4).
n[IN] The number of orienation bins used in the histogram (typically 8).
size_t VISION_IMPEXP mrpt::vision::matchFeatures ( const CFeatureList &  list1,
const CFeatureList &  list2,
CMatchedFeatureList &  matches,
const TMatchingOptions &  options = TMatchingOptions(),
const TStereoSystemParams &  params = TStereoSystemParams() 
)

Find the matches between two lists of features which must be of the same type.

Parameters:
list1[IN] One list.
list2[IN] Other list.
matches[OUT] A vector of pairs of correspondences.
options[IN] A struct containing matching options
Returns:
Returns the number of matched pairs of features.
int VISION_IMPEXP mrpt::vision::matchMultiResolutionFeatures ( CMatchedFeatureList &  mList1,
CMatchedFeatureList &  mList2,
const CImage &  leftImage,
const CImage &  rightImage,
const TMultiResDescMatchOptions &  matchOpts,
const TMultiResDescOptions &  computeOpts 
)

Matches two CMatchedFeatureList containing mulit-resolution descriptors.

This is performed for both the "left" and "right" lists The first matched list is taken as a base, i.e. its features must contain multi-resolution descriptors at a set of different scales. The second list doesn't need to contain such information because it will be computed if necessary according to the the fulfillment of some restriction regarding the matching process. This function will try to find the best matches within list2 corresponding to the features

Parameters:
mList1[IN] The base list.
mList2[IN] The other list of features.
leftImage[IN] The image from where the list2 was extracted. It's used to compute the descriptor of these features if necessary.
rightImage[IN] The image from where the list2 was extracted. It's used to compute the descriptor of these features if necessary.
matchOpts[IN] The options structure for the matching process.
computeOpts[IN] The options structure for the descriptor computation process.
Returns:
The number of matches found
See also:
TMultiResDescMatchOptions
TMultiResMatchingOutput VISION_IMPEXP mrpt::vision::matchMultiResolutionFeatures ( const CFeatureList &  list1,
CFeatureList &  list2,
const CImage &  rightImage,
const TMultiResDescMatchOptions &  matchOpts,
const TMultiResDescOptions &  computeOpts 
)

Matches two CFeatureList containing mulit-resolution descriptors.

The first list is taken as a base, i.e. its features must contain multi-resolution descriptors at a set of different scales. The second list doesn't need to contain such information because it will be computed if necessary according to the the fulfillment of some restriction regarding the matching process. This function will try to find the best matches within list2 corresponding to the features within base list list1.

Parameters:
list1[IN] The base list of features.
list2[IN/OUT] The other list of features.
rightImage[IN] The image from where the list2 was extracted. It's used to compute the descriptor of these features if necessary.
output[OUT] The output structure with the matching information.
matchOpts[IN] The options structure for the matching process.
computeOpts[IN] The options structure for the descriptor computation process.
Returns:
A structure containing the results of the matching.
See also:
TMultiResDescMatchOptions, TMultiResDescOptions, TMultiResMatchingOutput
mrpt::vision::MRPT_DECLARE_DEPRECATED_FUNCTION ( "Deprecated: See CGenericFeatureTracker"  ,
void VISION_IMPEXP   trackFeaturesconst CImage &old_img, const CImage &new_img, vision::CFeatureList &featureList, const unsigned int window_width=15, const unsigned int window_height=15 
)

(Deprecated) Track a set of features from img1 -> img2 using sparse optimal flow (classic KL method)

See also:
OpenCV's method cvCalcOpticalFlowPyrLK
mrpt::vision::MRPT_DECLARE_DEPRECATED_FUNCTION ( "Deprecated: See CGenericFeatureTracker"  ,
void VISION_IMPEXP   trackFeaturesconst CImage &inImg1, const CImage &inImg2, const CFeatureList &inFeatureList, CFeatureList &outFeatureList, const unsigned int window_width, const unsigned int window_height 
)

(Deprecated) Track a set of features from img1 -> img2 using sparse optimal flow (classic KL method)

See also:
OpenCV's method cvCalcOpticalFlowPyrLK
void VISION_IMPEXP mrpt::vision::normalizeImage ( const CImage &  image,
CImage &  nimage 
)

Normalizes the brigthness and contrast of an image by setting its mean value to zero and its standard deviation to unit.

Parameters:
image[IN] The input image.
nimage[OUTPUT] The new normalized image.
void VISION_IMPEXP mrpt::vision::openCV_cross_correlation ( const CImage &  img,
const CImage &  patch_img,
size_t &  x_max,
size_t &  y_max,
double &  max_val,
int  x_search_ini = -1,
int  y_search_ini = -1,
int  x_search_size = -1,
int  y_search_size = -1 
)

Computes the correlation between this image and another one, encapsulating the openCV function cvMatchTemplate This implementation reduced computation time.

Parameters:
img[IN] The imput image. This function supports gray-scale (1 channel only) images.
patch_img[IN] The "patch" image, which must be equal, or smaller than "this" image. This function supports gray-scale (1 channel only) images.
x_max[OUT] The x coordinate where it was found the maximun cross correlation value.
y_max[OUT] The y coordinate where it was found the maximun cross correlation value.
max_val[OUT] The maximun value of cross correlation which we can find
x_search_ini[IN] The "x" coordinate of the search window.
y_search_ini[IN] The "y" coordinate of the search window.
x_search_size[IN] The width of the search window.
y_search_size[IN] The height of the search window. Note: By default, the search area is the whole (this) image.
See also:
cross_correlation
::mrpt::utils::CStream& mrpt::vision::operator>> ( mrpt::utils::CStream in,
CFeaturePtr &  pObj 
)
TPoint3D VISION_IMPEXP mrpt::vision::pixelTo3D ( const TPixelCoordf &  xy,
const CMatrixDouble33 &  A 
)

Extract a UNITARY 3D vector in the direction of a 3D point, given from its (x,y) pixels coordinates, and the camera intrinsic coordinates.

Parameters:
xy[IN] Pixels coordinates, from the top-left corner of the image.
A[IN] The 3x3 intrinsic parameters matrix for the camera.
Returns:
The TPoint3D containing the output unitary vector.
See also:
buildIntrinsicParamsMatrix, defaultIntrinsicParamsMatrix, TPixelCoordf
void VISION_IMPEXP mrpt::vision::projectMatchedFeature ( const CFeaturePtr &  leftFeat,
const CFeaturePtr &  rightFeat,
TPoint3D &  p3D,
const TStereoSystemParams &  params = TStereoSystemParams() 
)

Computes the 3D position of a particular matched feature.

Parameters:
leftList[IN] The left feature.
rightList[IN] The right feature.
vP3D[OUT] The 3D position of the projected point.
params[IN] The intrinsic and extrinsic parameters of the stereo pair.
void VISION_IMPEXP mrpt::vision::projectMatchedFeatures ( const CFeatureList &  leftList,
const CFeatureList &  rightList,
vector< TPoint3D > &  vP3D,
const TStereoSystemParams &  params = TStereoSystemParams() 
)

Computes the 3D position of a set of matched features from their coordinates in the images.

The list have to be matched in order, e.g. leftList[0]<->rightList[0]

Parameters:
leftList[IN] The left list of features.
rightList[IN] The right list of features.
vP3D[OUT] A vector of TPoint3D containing the 3D positions of the projected points.
params[IN] The intrinsic and extrinsic parameters of the stereo pair.
void VISION_IMPEXP mrpt::vision::projectMatchedFeatures ( CMatchedFeatureList &  mfList,
const TStereoSystemParams &  param,
CLandmarksMap &  landmarks 
)

Project a list of matched features into the 3D space, using the provided parameters of the stereo system.

Parameters:
mfList[IN/OUT] The list of matched features. Features which yields a 3D point outside the area defined in TStereoSystemParams are removed from the lists.
param[IN] The parameters of the stereo system.
landmarks[OUT] A map containing the projected landmarks.
See also:
TStereoSystemParams, CLandmarksMap
void VISION_IMPEXP mrpt::vision::projectMatchedFeatures ( CFeatureList &  leftList,
CFeatureList &  rightList,
const TStereoSystemParams &  param,
CLandmarksMap &  landmarks 
)

Project a pair of feature lists into the 3D space, using the provided options for the stereo system.

The matches must be in order, i.e. leftList[0] corresponds to rightList[0] and so on. Features which yields a 3D point outside the area defined in TStereoSystemParams are removed from the lists.

Parameters:
leftList[IN/OUT] The left list of matched features.
rightList[IN/OUT] The right list of matched features.
param[IN] The options of the stereo system.
landmarks(OUT] A map containing the projected landmarks.
See also:
TStereoSystemParams, CLandmarksMap
TMultiResMatchingOutput VISION_IMPEXP mrpt::vision::relocalizeMultiDesc ( const CImage &  image,
CFeatureList &  baseList,
CFeatureList &  currentList,
TQuantizationTable &  qTable,
const TMultiResDescOptions &  desc_opts,
const TMultiResDescMatchOptions &  match_opts 
)
double VISION_IMPEXP mrpt::vision::reprojectionResiduals ( const mrpt::vision::TSequenceFeatureObservations observations,
const mrpt::utils::TCamera camera_params,
const mrpt::vision::TFramePosesVec frame_poses,
const mrpt::vision::TLandmarkLocationsVec landmark_points,
std::vector< CArray< double, 2 > > &  out_residuals,
const bool  frame_poses_are_inverse,
const bool  use_robust_kernel = true 
)

Compute reprojection error vector (used from within Bundle Adjustment methods, but can be used in general) See mrpt::vision::bundle_adj_full for a description of most parameters.

Parameters:
frame_poses_are_inverseIf set to true, global camera poses are $ \ominus F $ instead of $ F $, for each F in frame_poses.
Returns:
Overall squared reprojection error.
double VISION_IMPEXP mrpt::vision::reprojectionResiduals ( const mrpt::vision::TSequenceFeatureObservations observations,
const mrpt::utils::TCamera camera_params,
const mrpt::vision::TFramePosesMap frame_poses,
const mrpt::vision::TLandmarkLocationsMap landmark_points,
std::vector< CArray< double, 2 > > &  out_residuals,
const bool  frame_poses_are_inverse,
const bool  use_robust_kernel = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void VISION_IMPEXP mrpt::vision::rowChecking ( CFeatureList &  leftList,
CFeatureList &  rightList,
float  threshold = 1.0 
)

Search for correspondences which are not in the same row and deletes them.

Parameters:
leftList[IN/OUT] The left list of matched features.
rightList[IN/OUT] The right list of matched features.
threshold[IN] The tolerance value for the row checking: valid matched are within this threshold.
void VISION_IMPEXP mrpt::vision::setProperScales ( const CFeaturePtr &  feat1,
const CFeaturePtr &  feat2,
int &  firstScale,
int &  lastScale 
)

Computes the initial and final scales where to look when finding a match between multi-resolution features.

Both features must have their "depth" member properly computed.

Parameters:
feat1[IN] The base feature which MUST contain a set of different scales.
feat2[IN] The other feature which must be computed at base scale (1.0).
firstScale[OUT] The initial scale (within [0 feat1->multiScale.size()-1]) where to look.
firstScale[OUT] The final scale (within [0 feat1->multiScale.size()-1]) where to look.
void VISION_IMPEXP mrpt::vision::StereoObs2BRObs ( const CObservationStereoImages &  inObs,
const vector< double > &  sg,
CObservationBearingRange &  outObs 
)

Converts a stereo images observation into a bearing and range observation.

Converts a CObservationVisualLandmarks into a bearing and range observation (without any covariances).

Parameters:
inObs[IN] The input stereo images observation.
sg[IN] The sigma of the row, col, and disparity variables involved in the feature detection.
outObs[OUT] The output bearing and range observation (including covariances).

Fields of view are not computed.

Parameters:
inObs[IN] The input observation.
sg[IN] The sigma of the row, col, and disparity variables involved in the feature detection.
outObs[OUT] The output bearing and range observation.
void VISION_IMPEXP mrpt::vision::StereoObs2BRObs ( const CObservationVisualLandmarks &  inObs,
CObservationBearingRange &  outObs 
)

Converts a CObservationVisualLandmarks into a bearing and range observation (without any covariances).

Fields of view are not computed.

Parameters:
inObs[IN] The input observation.
outObs[OUT] The output bearing and range observation.
void VISION_IMPEXP mrpt::vision::StereoObs2BRObs ( const CMatchedFeatureList &  inMatches,
const CMatrixDouble33 &  intrinsicParams,
const double &  baseline,
const CPose3D &  sensorPose,
const vector< double > &  sg,
CObservationBearingRange &  outObs 
)

Converts a matched feature list into a bearing and range observation (some of the stereo camera system must be provided).

Parameters:
inMatches[IN] The input list of matched features.
intrinsicParams[IN] The intrisic params of the reference (left) camera of the stereo system.
baseline[IN] The distance among the X axis of the right camera wrt the reference (left) camera.
sg[IN] The sigma of the row, col, and disparity variables involved in the feature detection.
outObs[OUT] The output bearing and range observation (including covariances).
void VISION_IMPEXP mrpt::vision::trackFeatures2 ( const CImage &  inImg1,
const CImage &  inImg2,
CFeatureList &  featureList,
const unsigned int  window_width = 15,
const unsigned int  window_height = 15 
)

Tracks a set of features in an image.

Deprecated: See CGenericFeatureTracker

void VISION_IMPEXP mrpt::vision::updateBaseList ( CFeatureList &  baseList,
const CFeatureList &  currentList,
const vector< int > &  idx 
)



Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:46:17 UTC 2011