CVB.Net 15.1
Loading...
Searching...
No Matches

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

Inherits INativeHandle.

Public Member Functions

void Dispose (bool disposing)
 IDisposable helper function.
 
void Dispose ()
 IDisposable implementation.
 
Image Undistort (Image image)
 Undistort the given image .
 

Static Public Member Functions

static UndistortImageFilter Create (string calibrationData, Size2D imageSize, bool crop, UndistortInterpolationMode interpolationMode=UndistortInterpolationMode.Bilinear)
 Create a new UndistortImageFilter from the given calibrationData .
 

Properties

Size2D OutputSize [get]
 The dimensions of the undistorted output image.
 
IntPtr Handle [get]
 Native handle of the Module.
 
bool IsDisposed [get]
 Gets if the native handle has been disposed.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
 

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

Member Function Documentation

◆ Create()

static UndistortImageFilter Create ( string calibrationData,
Size2D imageSize,
bool crop,
UndistortInterpolationMode interpolationMode = UndistortInterpolationMode::Bilinear )
static

Create a new UndistortImageFilter from the given calibrationData .

Parameters
calibrationDataThe calibration data in json format.
imageSizeSize of the image to undistort.
cropWhether the output image contains only valid pixels.
interpolationModeInterpolation mode to use.
Returns
Newly created UndistortImageFilter.
Exceptions
ArgumentExceptionWhen calibrationData is null or empty.
CvbExceptionWhen an error during creation occurs.

◆ Dispose()

void Dispose ( bool disposing)

IDisposable helper function.

Parameters
disposing

◆ Undistort()

Image Undistort ( Image image)

Undistort the given image .

Parameters
imageImage to undistort.
Returns
Exceptions
ArgumentNullExceptionWhen image is null.
ArgumentExceptionWhen the planes of the given image do not have identical data types.
CvbExceptionWhen an error during undistortion occurs.

Event Documentation

◆ ObjectDisposing

NativeHandleEventDelegate ObjectDisposing

Raised when this object is about to be disposed via the IDisposable.Dispose method.

This event is raised right before this object is disposed. The dispose itself cannot be canceled.