All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Nimble::LensCorrection Class Reference

Camera distortion correction. More...

#include <Nimble/LensCorrection.hpp>

Public Member Functions

Nimble::Vector2f correct (Vector2 loc) const
 Performs barrel distortion correction on the given vector.
 
const Vector4params () const
 Access the correction parameters The fourth element of the vector is the multiplier that normalizes the calibration, based on the three lens correction parameters. More...
 
void setCameraResolution (int w, int h)
 Sets the camera resolution that will be used for camera correction.
 
void setIdentity ()
 Set the correction mapping to identity.
 
void setParam (int i, float v)
 Sets a single floating value.
 
void setParams (float a, float b, float c)
 Sets all the lens correction parameters.
 
void setParams (const float *abc)
 Sets all the lens correction parameters.
 

Detailed Description

Camera distortion correction.

Correct camera lens distortion. Uses simple and fast polynomial correction to transform coordinates in the distorted input image to more ideal coordinates.

The correction is based on camera resolution and a third-order polynomial mapping:

http://www.panotools.info/mediawiki/index.php?title=Lens_correction_model

Author
Tommi Ilmonen

Member Function Documentation

const Vector4& Nimble::LensCorrection::params ( ) const
inline

Access the correction parameters The fourth element of the vector is the multiplier that normalizes the calibration, based on the three lens correction parameters.

Returns
Correction parameters