CVB++ 15.1
Loading...
Searching...
No Matches

A filter for undistorting images. More...

#include <cvb/undistortion.hpp>

Public Member Functions

const Size2D< int > & OutSize () const
 Gives the dimensions of the undistorted images.
 
std::unique_ptr< ImageUndistort (const Image &image) const
 Undistort an image.
 
void Undistort (const Image &imageIn, Image &imageOut) const
 Undistort an image.
 

Static Public Member Functions

static std::unique_ptr< UndistImageFilterCreate (const Cvb::String &calibrationData, const Size2D< int > &imageSize, bool crop, UndistInterpolationMode interpolationMode=UndistInterpolationMode::Bilinear)
 Creates an image undistortion filter for a given calibration configuration.
 

Detailed Description

A filter for undistorting images.

This filter enables the correction of lens-distorted images. The corresponding correction table is generated for a calibration configuration and a specified image size, which is then applied to distorted images of the same size. To correct individual pixel positions, see UndistPointFilter.

Member Function Documentation

◆ Create()

static std::unique_ptr< UndistImageFilter > Create ( const Cvb::String & calibrationData,
const Size2D< int > & imageSize,
bool crop,
UndistInterpolationMode interpolationMode = UndistInterpolationMode::Bilinear )
inlinestatic

Creates an image undistortion filter for a given calibration configuration.

Parameters
[in]calibrationDataThe calibration configuration in JSON-format.
[in]imageSizeWidth and height of the images to undistort.
[in]cropWhether the output image contains only valid pixels.
[in]interpolationModeInterpolation mode.
Returns
A pointer to a filter object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ OutSize()

const Size2D< int > & OutSize ( ) const
inline

Gives the dimensions of the undistorted images.

Returns
Width and Height of undistorted images.

◆ Undistort() [1/2]

std::unique_ptr< Image > Undistort ( const Image & image) const
inline

Undistort an image.

Parameters
[in]imageThe distorted image.
Returns
The undistorted image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Undistort() [2/2]

void Undistort ( const Image & imageIn,
Image & imageOut ) const
inline

Undistort an image.

Parameters
[in]imageInThe distorted image.
[out]imageOutBuffer receiving the undistorted image.
Exceptions
Anyexception derived from std::exception including CvbException.