MRPT logo

mrpt::vision Namespace Reference

Classes for computer vision, detectors, features, etc. More...


Namespaces

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

Classes

struct  TCamera
 Structure to hold the parameters of a pinhole camera model (for use in mono-slam). More...
class  CCamModel
 This class represent the camera model for Monocular SLAM. More...
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 features. 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  TCaptureOptions_dc1394
 Options used when creating an dc1394 capture object All but the frame size, framerate, and color_coding can be changed dynamically by CImageGrabber_dc1394::changeCaptureOptions. More...
class  CImageGrabber_dc1394
 A class for grabing images from a IEEE1394 (Firewire) camera using the libdc1394-2 library. More...
struct  TCaptureCVOptions
 Options used when creating an OpenCV capture object Some options apply to IEEE1394 cameras only. More...
class  CImageGrabber_OpenCV
 A class for grabing images from a "OpenCV"-compatible camera, or from an AVI video file. More...
struct  TCaptureOptions_bumblebee
 Options used when creating a bumblebee camera capture object. More...
class  CStereoGrabber_Bumblebee
 A class for grabing stereo images from a "Bumblebee" camera NOTE:
  • This class is only available when compiling MRPT with "#define MRPT_HAS_BUMBLEBEE 1" in the "config.h".
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  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  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...

Typedefs

typedef uint64_t TFeatureID
 Definition of a feature ID.
typedef uint64_t TLandmarkID
 Landmark ID.
typedef std::map< std::string,
TImageCalibData
TCalibrationImageList
 A list of images, used in checkerBoardCameraCalibration.

Enumerations

enum  TFeatureType {
  featNotDefined = -1, featKLT = 0, featHarris, featBCD,
  featSIFT, featSURF, featBeacon
}
 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  TKLTFeatureStatus {
  statusKLT_IDLE, statusKLT_OOB, statusKLT_SMALL_DET, statusKLT_LARGE_RESIDUE,
  statusKLT_MAX_RESIDUE, statusKLT_TRACKED, statusKLT_MAX_ITERATIONS
}
enum  grabber_dc1394_framerate_t {
  FRAMERATE_1_875 = 32, FRAMERATE_3_75, FRAMERATE_7_5, FRAMERATE_15,
  FRAMERATE_30, FRAMERATE_60, FRAMERATE_120, FRAMERATE_240
}
enum  grabber_dc1394_color_coding_t {
  COLOR_CODING_MONO8 = 352, COLOR_CODING_YUV411, COLOR_CODING_YUV422, COLOR_CODING_YUV444,
  COLOR_CODING_RGB8, COLOR_CODING_MONO16
}
enum  TCameraType {
  CAMERA_CV_AUTODETECT = 0, CAMERA_CV_DC1394, CAMERA_CV_VFL, CAMERA_CV_VFW,
  CAMERA_CV_MIL, CAMERA_CV_DSHOW
}
 These capture types are like their OpenCV equivalents. More...
enum  TColormap { cmGRAYSCALE = 0, cmJET }
 Different colormaps. More...
enum  TInterpolationMethod { imNEAREST = 0, imBILINEAR, imBICUBIC, imAREA }
 Interpolation methods (as defined in OpenCV) Used for OpenCV related operations with images, but also with MRPT native classes. More...

Functions

void MRPTDLLIMPEXP 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 MRPTDLLIMPEXP flip (CImage &img)
 Invert an image using OpenCV function.
TPoint3D MRPTDLLIMPEXP pixelTo3D (const vision::TPixelCoordf &xy, const CMatrixFloat &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.
CMatrix MRPTDLLIMPEXP buildIntrinsicParamsMatrix (float focalLengthX, float focalLengthY, float centerX, float centerY)
 Builds the intrinsic parameters matrix A from parameters:.
CMatrix MRPTDLLIMPEXP 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 MRPTDLLIMPEXP deleteRepeatedFeats (CFeatureList &list)
 Explore the feature list and removes features which are in the same coordinates.
void MRPTDLLIMPEXP rowChecking (CFeatureList &leftList, CFeatureList &rightList, float threshold=0.0)
 Computes ONLY the SIFT descriptors of a set of features .
void MRPTDLLIMPEXP checkTrackedFeatures (CFeatureList &leftList, CFeatureList &rightList, vision::TMatchingOptions options)
 Search for correspondences which are not in the same row and deletes them
void MRPTDLLIMPEXP getDispersion (const CFeatureList &list, vector_float &std, vector_float &mean)
 Computes the dispersion of the features in the image.
void MRPTDLLIMPEXP trackFeatures (const CImage &inImg1, const CImage &inImg2, vision::CFeatureList &featureList, const unsigned int &window_width=7, const unsigned int &window_height=7)
 Tracks a set of features in an image.
void MRPTDLLIMPEXP filterBadCorrsByDistance (mrpt::slam::CMetricMap::TMatchingPairList &list, unsigned int numberOfSigmas)
 Filter bad correspondences by distance
void MRPTDLLIMPEXP correctDistortion (CImage &in_img, CImage &out_img, CMatrix A, CMatrix dist_coeffs)
 Returns a new image where distortion has been removed.
void MRPTDLLIMPEXP hsv2rgb (float h, float s, float v, float &r, float &g, float &b)
 Transform HSV color components to RGB, all of them in the range [0,1].
void MRPTDLLIMPEXP rgb2hsv (float r, float g, float b, float &h, float &s, float &v)
 Transform RGB color components to HSV, all of them in the range [0,1].
void MRPTDLLIMPEXP colormap (const TColormap &color_map, const float &color_index, float &r, float &g, float &b)
 Transform a float number in the range [0,1] into RGB components.
void MRPTDLLIMPEXP jet2rgb (const float &color_index, float &r, float &g, float &b)
 Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap.
double MRPTDLLIMPEXP computeMsd (const mrpt::slam::CMetricMap::TMatchingPairList &list, const mrpt::poses::CPose3D &Rt)
 Computes the mean squared distance between a set of 3D correspondences
void MRPTDLLIMPEXP cloudsToMatchedList (const mrpt::slam::CObservationVisualLandmarks &cloud1, const mrpt::slam::CObservationVisualLandmarks &cloud2, mrpt::slam::CMetricMap::TMatchingPairList &outList)
 Transform two clouds of 3D points into a matched list of points
float MRPTDLLIMPEXP computeMainOrientation (const CImage &image, const unsigned int &x, const unsigned int &y)
 Computes the main orientation of a set of points with an image (for using in SIFT-based algorithms).
size_t MRPTDLLIMPEXP matchFeatures (const CFeatureList &list1, const CFeatureList &list2, CMatchedFeatureList &matches, const TMatchingOptions &options=TMatchingOptions())
 Find the matches between two lists of features.
void MRPTDLLIMPEXP projectMatchedFeatures (CMatchedFeatureList &mfList, const vision::TStereoSystemParams &param, mrpt::slam::CLandmarksMap &landmarks)
 Project a list of matched features into the 3D space, using the provided options for the stereo system.
bool MRPTDLLIMPEXP 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, CMatrixDouble &intrinsicParams, std::vector< double > &distortionParams, bool normalize_image=true, double *out_MSE=NULL, bool skipDrawDetectedImgs=false)
 Performs a camera calibration (computation of projection and distortion parameters) from a sequence of captured images of a checkerboard.

Variables

class MRPTDLLIMPEXP CFeatureList
class MRPTDLLIMPEXP CMatchedFeatureList


Detailed Description

Classes for computer vision, detectors, features, etc.


Typedef Documentation

A list of images, used in checkerBoardCameraCalibration.

See also:
checkerBoardCameraCalibration

Definition at line 521 of file vision/utils.h.

typedef uint64_t mrpt::vision::TFeatureID

Definition of a feature ID.

Definition at line 46 of file vision/CFeature.h.

typedef uint64_t mrpt::vision::TLandmarkID

Landmark ID.

Definition at line 61 of file vision/utils.h.


Enumeration Type Documentation

Enumerator:
COLOR_CODING_MONO8 
COLOR_CODING_YUV411 
COLOR_CODING_YUV422 
COLOR_CODING_YUV444 
COLOR_CODING_RGB8 
COLOR_CODING_MONO16 

Definition at line 52 of file CImageGrabber_dc1394.h.

Enumerator:
FRAMERATE_1_875 
FRAMERATE_3_75 
FRAMERATE_7_5 
FRAMERATE_15 
FRAMERATE_30 
FRAMERATE_60 
FRAMERATE_120 
FRAMERATE_240 

Definition at line 41 of file CImageGrabber_dc1394.h.

These capture types are like their OpenCV equivalents.

Enumerator:
CAMERA_CV_AUTODETECT 
CAMERA_CV_DC1394 
CAMERA_CV_VFL 
CAMERA_CV_VFW 
CAMERA_CV_MIL 
CAMERA_CV_DSHOW  Valid only with OpenCV >= 1.1.0.

Definition at line 42 of file CImageGrabber_OpenCV.h.

Different colormaps.

See also:
mrpt::vision::colormap
Enumerator:
cmGRAYSCALE 
cmJET 

Definition at line 423 of file vision/utils.h.

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 63 of file vision/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).

Definition at line 50 of file vision/CFeature.h.

Interpolation methods (as defined in OpenCV) Used for OpenCV related operations with images, but also with MRPT native classes.

See also:
mrpt::utils::CMappedImage
Enumerator:
imNEAREST  No interpolation.
imBILINEAR  Bilinear interpolation.
imBICUBIC  Bilinear interpolation.
imAREA  Resampling using pixel-area relation.

Definition at line 451 of file vision/utils.h.

Enumerator:
statusKLT_IDLE  Inactive.
statusKLT_OOB  Out Of Bounds.
statusKLT_SMALL_DET  Determinant of the matrix too small.
statusKLT_LARGE_RESIDUE  Error too big.
statusKLT_MAX_RESIDUE 
statusKLT_TRACKED  Feature correctly tracked.
statusKLT_MAX_ITERATIONS  Iteration maximum reached.

Definition at line 73 of file vision/CFeature.h.


Function Documentation

CMatrix MRPTDLLIMPEXP mrpt::vision::buildIntrinsicParamsMatrix ( float  focalLengthX,
float  focalLengthY,
float  centerX,
float  centerY 
)

Builds the intrinsic parameters matrix A from parameters:.

Parameters:
focalLengthX The focal length, in X (horizontal) pixels
focalLengthY The focal length, in Y (vertical) pixels
centerX The image center, horizontal, in pixels
centerY 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

bool MRPTDLLIMPEXP 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,
CMatrixDouble &  intrinsicParams,
std::vector< double > &  distortionParams,
bool  normalize_image = true,
double *  out_MSE = NULL,
bool  skipDrawDetectedImgs = 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://babel.isa.uma.es/mrpt/index.php/Camera_Parameters
distortionParams [OUT] The 1x4 vector of distortion parameters: k1 k2 p1 p2. See http://babel.isa.uma.es/mrpt/index.php/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
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 MRPTDLLIMPEXP mrpt::vision::checkTrackedFeatures ( CFeatureList &  leftList,
CFeatureList &  rightList,
vision::TMatchingOptions  options 
)

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

..

void MRPTDLLIMPEXP mrpt::vision::cloudsToMatchedList ( const mrpt::slam::CObservationVisualLandmarks cloud1,
const mrpt::slam::CObservationVisualLandmarks cloud2,
mrpt::slam::CMetricMap::TMatchingPairList outList 
)

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

..

void MRPTDLLIMPEXP mrpt::vision::colormap ( const TColormap &  color_map,
const float &  color_index,
float &  r,
float &  g,
float &  b 
)

Transform a float number in the range [0,1] into RGB components.

Different colormaps are available.

float MRPTDLLIMPEXP mrpt::vision::computeMainOrientation ( const CImage &  image,
const unsigned int &  x,
const unsigned int &  y 
)

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

Parameters:
image (Input). The input image.
x (Input). A vector containing the 'x' coordinates of the image points.
y (Input). A vector containing the 'y' coordinates of the image points.
orientation (Output). A vector containing the main orientation of the image points.

double MRPTDLLIMPEXP mrpt::vision::computeMsd ( const mrpt::slam::CMetricMap::TMatchingPairList list,
const mrpt::poses::CPose3D Rt 
)

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

..

void MRPTDLLIMPEXP mrpt::vision::correctDistortion ( CImage &  in_img,
CImage &  out_img,
CMatrix  A,
CMatrix  dist_coeffs 
)

Returns a new image where distortion has been removed.

Parameters:
A The 3x3 intrinsic parameters matrix
dist_coeffs The 1x4 vector of distortion coefficients

CMatrix MRPTDLLIMPEXP 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 Posible values are listed next.
resolutionX The number of pixel columns
resolutionY 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 MRPTDLLIMPEXP mrpt::vision::deleteRepeatedFeats ( CFeatureList &  list  ) 

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

Parameters:
list (Input). The list of features.

void MRPTDLLIMPEXP mrpt::vision::filterBadCorrsByDistance ( mrpt::slam::CMetricMap::TMatchingPairList list,
unsigned int  numberOfSigmas 
)

Filter bad correspondences by distance

..

void MRPTDLLIMPEXP mrpt::vision::flip ( CImage &  img  ) 

Invert an image using OpenCV function.

void MRPTDLLIMPEXP mrpt::vision::getDispersion ( const CFeatureList &  list,
vector_float &  std,
vector_float &  mean 
)

Computes the dispersion of the features in the image.

Parameters:
list (IN) Inpute 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 MRPTDLLIMPEXP mrpt::vision::hsv2rgb ( float  h,
float  s,
float  v,
float &  r,
float &  g,
float &  b 
)

Transform HSV color components to RGB, all of them in the range [0,1].

See also:
rgb2hsv

void MRPTDLLIMPEXP mrpt::vision::jet2rgb ( const float &  color_index,
float &  r,
float &  g,
float &  b 
)

Computes the RGB color components (range [0,1]) for the corresponding color index in the range [0,1] using the MATLAB 'jet' colormap.

See also:
colormap

size_t MRPTDLLIMPEXP mrpt::vision::matchFeatures ( const CFeatureList &  list1,
const CFeatureList &  list2,
CMatchedFeatureList &  matches,
const TMatchingOptions &  options = TMatchingOptions() 
)

Find the matches between two lists of features.

They must be of the same type. Return value: the number of matched pairs of features

Parameters:
list1 (Input). One list.
list2 (Input). Other list.
matches (Output). A vector of pairs of correspondences.
options (Optional Input). A struct containing matching options

void MRPTDLLIMPEXP 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:
patch_img The "patch" image, which must be equal, or smaller than "this" image. This function supports gray-scale (1 channel only) images.
x_search_ini The "x" coordinate of the search window.
y_search_ini The "y" coordinate of the search window.
x_search_size The width of the search window.
y_search_size The height of the search window.
x_max The x coordinate where found the maximun cross correlation value.
y_max The y coordinate where found the maximun cross correlation value
max_val The maximun value of cross correlation which we can find Note: By default, the search area is the whole (this) image.
See also:
cross_correlation

TPoint3D MRPTDLLIMPEXP mrpt::vision::pixelTo3D ( const vision::TPixelCoordf &  xy,
const CMatrixFloat &  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:
x Pixels coordinates, from the top-left corner of the image.
y Pixels coordinates, from the top-left corner of the image.
A The 3x3 intrinsic parameters matrix for the camera.
See also:
buildIntrinsicParamsMatrix, defaultIntrinsicParamsMatrix

void MRPTDLLIMPEXP mrpt::vision::projectMatchedFeatures ( CMatchedFeatureList &  mfList,
const vision::TStereoSystemParams &  param,
mrpt::slam::CLandmarksMap landmarks 
)

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

Parameters:
matches (Input). The list of matched features.
options (Input). The options of the stereo system.
landmarks (Output). A map containing the projected landmarks.

void MRPTDLLIMPEXP mrpt::vision::rgb2hsv ( float  r,
float  g,
float  b,
float &  h,
float &  s,
float &  v 
)

Transform RGB color components to HSV, all of them in the range [0,1].

See also:
hsv2rgb

void MRPTDLLIMPEXP mrpt::vision::rowChecking ( CFeatureList &  leftList,
CFeatureList &  rightList,
float  threshold = 0.0 
)

Computes ONLY the SIFT descriptors of a set of features .

.. ... / void computeSiftDescriptors( const CImage &in_img, CKanadeLucasTomasi::TKLTFeatureList &in_features, TSIFTFeatureList &out_features); / ** Computes a set of features with the SIFT algorithm... ... / void computeSiftFeatures( const CImage &in_img, TSIFTFeatureList &out_features, int wantedNumberOfFeatures = 150 );

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

void MRPTDLLIMPEXP mrpt::vision::trackFeatures ( const CImage &  inImg1,
const CImage &  inImg2,
vision::CFeatureList &  featureList,
const unsigned int &  window_width = 7,
const unsigned int &  window_height = 7 
)

Tracks a set of features in an image.


Variable Documentation

class MRPTDLLIMPEXP mrpt::vision::CFeatureList

Definition at line 41 of file vision/CFeature.h.

class MRPTDLLIMPEXP mrpt::vision::CMatchedFeatureList

Definition at line 42 of file vision/CFeature.h.




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:27:43 EDT 2009