You are here: Start » Filter Reference » Image » Image Spatial Transforms Maps » CreateUndistortionMap_Deprecated
Module: | Calibration |
---|
Computes a spatial transform map for undistorting images from a calibrated camera.
Applications
Name | Type | Range | Description | |
---|---|---|---|---|
![]() |
inCameraMatrix | Matrix | ||
![]() |
inDistortion | LensDistortion | ||
![]() |
inMapWidth | Integer* | 1 - ![]() |
Width of output map, default: same as example image. |
![]() |
inMapHeight | Integer* | 1 - ![]() |
Height of output map, default: same as example image. |
![]() |
inMapShift | Vector2D | Translation from the principal point on the image plane. | |
![]() |
inMapRotation | Real | Rotation of the principal point on the image plane. | |
![]() |
inCameraRotationY | Real | Rotation of view around Y axis (a.k.a. Pan, Azimuth or Yaw) | |
![]() |
inCameraRotationX | Real | Rotation of view around X axis (a.k.a. Tilt, Elevation or Pitch) | |
![]() |
inCameraRotationZ | Real | Rotation of view around Z axis (a.k.a. Roll, Horizon) | |
![]() |
inImageFormat | ImageFormat | Information about dimensions, depth and pixel type of the image | |
![]() |
inInterpolationMethod | InterpolationMethod | ||
![]() |
outSpatialMap | SpatialMap | ||
![]() |
outOutputRegion | Region |
Description
After determining the intrinsic camera matrix, and intrinsic distortion coefficients using CalibrateCamera_Deprecated, this filter can be used to undo distortion of the images (undistortion).
The undistortion is performed through a general spatial transformation, using RemapImage. The result is a SpatialMap, i.e. a description of this transformation.
Examples
![]() |
A calibration pattern: original - before undistortion.
![]() |
![]() |
A calibration pattern: remapped using RemapImage.
The SpatialMap used was generated with CreateUndistortionMap_Deprecated,
for inInterpolationMethod = NearestNeighbour and Bilinear.
Remarks
The interpolation method chosen affects the speed of image remapping. Nearest neighbour is the fastest method, but bilinear interpolation provides higher quality.
The inImageFormat input describes dimensions and pixel format of the images that will be remapped with a RemapImage filter. Also an example image may be connected to this input and the format information will be extracted from it.
The outOutputRegion describes the region of valid pixels. If it does not cover the output area, it should be passed to RemapImage, to suppress the invalid pixels. To increase coverage, provide different values for inMapHeight and inMapWidth - to limit the output area to a valid region.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Camera matrix must be 3x3 in CreateUndistortionMap. |
DomainError | Empty camera matrix on input in CreateUndistortionMap. |
DomainError | Format of an empty image on input in CreateUndistortionMap. |
Complexity Level
This filter is available on Basic Complexity Level.
See Also
- CalibrateCamera_Deprecated – Finds the camera intrinsic and extrinsic parameters from the input arrays of image and real-world coordinates. Uses pinhole camera model (perspective camera).
- RemapImage – Applies a precomputed image transform, defined by a spatial map object.