Image Component Library (ICL)
|
Utility class for estimation of compensation parameters of lens-distortion. More...
#include <LensUndistortionCalibrator.h>
Classes | |
struct | GridDefinition |
Utility data class describing the grid structure that is used. More... | |
struct | Info |
Internally used info structure (also returned by LensUndistortionCalibrator::getInfo) More... | |
Public Member Functions | |
LensUndistortionCalibrator () | |
empty default constructor (creates a null instance) | |
LensUndistortionCalibrator (const utils::Size &imagesSize, const GridDefinition &gridDef) | |
constructor with given parameters | |
~LensUndistortionCalibrator () | |
Destructor. | |
void | init (const utils::Size &imagesSize, const GridDefinition &gridDef) |
for deferred initialization | |
bool | isNull () const |
returns whether this instance was already initialized | |
void | addPoints (const std::vector< utils::Point32f > &imagePoints) |
adds new points (the order must correspond to the GridDefinition that was provided) | |
void | addPoints (const std::vector< utils::Point32f > &imagePoints, const std::vector< utils::Point32f > &gridDef) |
adds new points with a given grid definition (the order must correspond to the GridDefinition that was provided) | |
void | clear () |
removes all points added before | |
Info | getInfo () |
returns current info | |
io::ImageUndistortion | computeUndistortion () |
computes an image undistortion structure using all points added before | |
Private Attributes | |
Data * | m_data |
internal data |
Utility class for estimation of compensation parameters of lens-distortion.
Internally, this is a wrapper class around OpenCV's cvCalibrateCamera2. For the calibration, a set of "grids", each consisting of a set of 2D-image to 3D-object coordinates is needed. The 3D object coordinates are assumed to be coplanar and to be normalized to the range [0,1] in the remaining x and y dimensions. Theses normalized x/y coordinates are defined by the LensUndistortionCalibrator::GridDefinition class.
empty default constructor (creates a null instance)
icl::cv::LensUndistortionCalibrator::LensUndistortionCalibrator | ( | const utils::Size & | imagesSize, |
const GridDefinition & | gridDef | ||
) |
constructor with given parameters
Destructor.
void icl::cv::LensUndistortionCalibrator::addPoints | ( | const std::vector< utils::Point32f > & | imagePoints | ) |
adds new points (the order must correspond to the GridDefinition that was provided)
void icl::cv::LensUndistortionCalibrator::addPoints | ( | const std::vector< utils::Point32f > & | imagePoints, |
const std::vector< utils::Point32f > & | gridDef | ||
) |
adds new points with a given grid definition (the order must correspond to the GridDefinition that was provided)
removes all points added before
computes an image undistortion structure using all points added before
returns current info
void icl::cv::LensUndistortionCalibrator::init | ( | const utils::Size & | imagesSize, |
const GridDefinition & | gridDef | ||
) |
for deferred initialization
bool icl::cv::LensUndistortionCalibrator::isNull | ( | ) | const |
returns whether this instance was already initialized
Data* icl::cv::LensUndistortionCalibrator::m_data [private] |
internal data
internal data pointer