CVBpy 15.1
Loading...
Searching...
No Matches
UndistImageFilter Class Reference

A filter for undistorting images. More...

Public Member Functions

cvb.UndistImageFilter create (str calibration_data, cvb.Size2D image_size, bool crop, Optional[int] interpolation_mode)
 Creates an image undistortion filter for a given calibration configuration.
 
cvb.Image undistort (self, cvb.Image image)
 Undistort a distorted image.
 

Properties

 out_size = property
 cvb.Size2D: Gets size of undistorted images.
 

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()

cvb.UndistImageFilter create ( str calibration_data,
cvb.Size2D image_size,
bool crop,
Optional[int] interpolation_mode )

Creates an image undistortion filter for a given calibration configuration.

This filter calculates undistorted 2D images from distorted 2D images for the calibration configuration given at filter creation.

Parameters

calibration_data : str Calibration configuration in JSON format.

image_size : cvb.Size2D The size of the images to undistort.

crop : bool Flag, whether the output image contains only valid pixels.

interpolation_mode : Optional[int] Interpolation mode used for the undistorted image (see cvb.UndistInterpolationMode).

Returns

cvb.UndistImageFilter The generated filter.

◆ undistort()

cvb.Image undistort ( self,
cvb.Image image )

Undistort a distorted image.

Returns an undistorted image.

Parameters

image : cvb.Image The distorted image.

Returns

cvb.Image The undistorted image.