Classes | Typedefs | Functions
sal3d::LensDistortion Namespace Reference

Namespace for the Lens Distortion classes and functions. More...

Classes

class  Model
 A lens distortion model. More...

Typedefs

typedef sal3d_lens_dist_model_type ModelType
 An enum defining the model of the lens correction. Currently only the Tsai and NLPoly3 are supported.

Functions

Model calibrateTsai (const std::vector< sal3d::Frame > &frames, int patternRows, int patternCols, int &nvalid, std::vector< Point2D > &points)
 Calculates a Tsai model to compensate the lens distortion.
Model calibrateTsai (const std::vector< sal3d::Frame > &frames, int patternRows, int patternCols)
 Calculates a Tsai model to compensate the lens distortion.
Model calibrateTsai (const sal3d::Frame &frame, int patternRows, int patternCols)
 Calculates a Tsai model to compensate the lens distortion.
Model calibrateDotsTsai (const std::vector< sal3d::Frame > &frames, int &patternRows, int &patternCols, int &nvalid, std::vector< Point2D > &points)
 Calculates a Tsai model to compensate the lens distortion.
Model calibrateDotsTsai (const std::vector< sal3d::Frame > &frames)
 Calculates a Tsai model to compensate the lens distortion.
Model calibrateDotsTsai (const sal3d::Frame &frame)
 Calculates a Tsai model to compensate the lens distortion.
Model calibrateDotsCubic (const sal3d::Frame &frame)
 Calculates a cubic polinomial model to compensate the lens distortion.
Model calibrateDotsCubic (const sal3d::Frame &frame, int &patternRows, int &patternCols, std::vector< Point2D > &points)
 Calculates a cubic polinomial model to compensate the lens distortion.
Model calibrateCubic (const sal3d::Frame &frame, int patternRows, int patternCols, std::vector< Point2D > &points)
 Calculates a Tsai model to compensate the lens distortion.

Detailed Description

Namespace for the Lens Distortion classes and functions.

The functions in this namespace require linking with lenscalib.lib (import library for lenscalib.dll).

Within this namespace there are the functions and classes to deal with the camera Lens Distortion. For now, only the Tsai model distortion is totally supported.

To make use of the lens calibration features, several steps need to be taken. In the first place, a chessboard or dots pattern is needed in order to perform the lens distortion calibration. Once a Frame or more are acquired of the pattern, they should be passed to the calibration function. A single acquisition is enough, but more can be used to reduce the effect of noise. Please refer to the Lens Calibration Pattern section to find more details about the convenience on using each kind of pattern.

Once the Model is obtained, it can be used in any of the metric calibrations present in sal3d. The result of those calibrations will contain the distortion Model, so any operation performed with it, like converting a RangeMap to a COP will already apply the undistortion transparently for the user.