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) More... | |
LensUndistortionCalibrator (const utils::Size &imagesSize, const GridDefinition &gridDef) | |
constructor with given parameters More... | |
~LensUndistortionCalibrator () | |
Destructor. More... | |
void | init (const utils::Size &imagesSize, const GridDefinition &gridDef) |
for deferred initialization More... | |
void | init (const utils::Size &imageSize) |
deferred initialization (only when using addPoints with given gridDef) More... | |
bool | isNull () const |
returns whether this instance was already initialized More... | |
void | addPoints (const std::vector< utils::Point32f > &imagePoints) |
adds new points (the order must correspond to the GridDefinition that was provided) More... | |
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) More... | |
void | clear () |
removes all points added before More... | |
void | undoLast () |
removes lastly added point More... | |
Info | getInfo () |
returns current info More... | |
io::ImageUndistortion | computeUndistortion () |
computes an image undistortion structure using all points added before More... | |
Private Attributes | |
Data * | m_data |
internal data More... | |
Additional Inherited Members | |
Protected Member Functions inherited from icl::utils::Uncopyable | |
Uncopyable () | |
Empty base constructor. More... | |
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.
icl::cv::LensUndistortionCalibrator::LensUndistortionCalibrator | ( | ) |
empty default constructor (creates a null instance)
icl::cv::LensUndistortionCalibrator::LensUndistortionCalibrator | ( | const utils::Size & | imagesSize, |
const GridDefinition & | gridDef | ||
) |
constructor with given parameters
icl::cv::LensUndistortionCalibrator::~LensUndistortionCalibrator | ( | ) |
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)
void icl::cv::LensUndistortionCalibrator::clear | ( | ) |
removes all points added before
io::ImageUndistortion icl::cv::LensUndistortionCalibrator::computeUndistortion | ( | ) |
computes an image undistortion structure using all points added before
Info icl::cv::LensUndistortionCalibrator::getInfo | ( | ) |
returns current info
void icl::cv::LensUndistortionCalibrator::init | ( | const utils::Size & | imagesSize, |
const GridDefinition & | gridDef | ||
) |
for deferred initialization
void icl::cv::LensUndistortionCalibrator::init | ( | const utils::Size & | imageSize | ) |
deferred initialization (only when using addPoints with given gridDef)
bool icl::cv::LensUndistortionCalibrator::isNull | ( | ) | const |
returns whether this instance was already initialized
void icl::cv::LensUndistortionCalibrator::undoLast | ( | ) |
removes lastly added point
If the internal list is empty, this function does nothing
|
private |
internal data
internal data pointer