Image Component Library (ICL)
Classes | Public Member Functions | Private Attributes | List of all members
icl::cv::LensUndistortionCalibrator Class Reference

Utility class for estimation of compensation parameters of lens-distortion. More...

#include <LensUndistortionCalibrator.h>

Inheritance diagram for icl::cv::LensUndistortionCalibrator:
icl::utils::Uncopyable

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ LensUndistortionCalibrator() [1/2]

icl::cv::LensUndistortionCalibrator::LensUndistortionCalibrator ( )

empty default constructor (creates a null instance)

◆ LensUndistortionCalibrator() [2/2]

icl::cv::LensUndistortionCalibrator::LensUndistortionCalibrator ( const utils::Size imagesSize,
const GridDefinition gridDef 
)

constructor with given parameters

◆ ~LensUndistortionCalibrator()

icl::cv::LensUndistortionCalibrator::~LensUndistortionCalibrator ( )

Destructor.

Member Function Documentation

◆ addPoints() [1/2]

void icl::cv::LensUndistortionCalibrator::addPoints ( const std::vector< utils::Point32f > &  imagePoints)

adds new points (the order must correspond to the GridDefinition that was provided)

◆ addPoints() [2/2]

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)

◆ clear()

void icl::cv::LensUndistortionCalibrator::clear ( )

removes all points added before

◆ computeUndistortion()

io::ImageUndistortion icl::cv::LensUndistortionCalibrator::computeUndistortion ( )

computes an image undistortion structure using all points added before

◆ getInfo()

Info icl::cv::LensUndistortionCalibrator::getInfo ( )

returns current info

◆ init() [1/2]

void icl::cv::LensUndistortionCalibrator::init ( const utils::Size imagesSize,
const GridDefinition gridDef 
)

for deferred initialization

◆ init() [2/2]

void icl::cv::LensUndistortionCalibrator::init ( const utils::Size imageSize)

deferred initialization (only when using addPoints with given gridDef)

◆ isNull()

bool icl::cv::LensUndistortionCalibrator::isNull ( ) const

returns whether this instance was already initialized

◆ undoLast()

void icl::cv::LensUndistortionCalibrator::undoLast ( )

removes lastly added point

If the internal list is empty, this function does nothing

Member Data Documentation

◆ m_data

Data* icl::cv::LensUndistortionCalibrator::m_data
private

internal data

internal data pointer


The documentation for this class was generated from the following file: