Represents an undistortion transformation for images.
Provides geometric correction to remove lens distortion using intrinsic calibration parameters. The parameters can be obtained using CameraCalibration.process().
This class also supports undistorting images with binning factors that differ from those used during calibration, as long as the image metadata includes valid binning information. The binning factor of the image to be undistorted must be greater than or equal to that of the calibration images.
- Note
- If the metadata of the images to be undistorted differs from the metadata used during calibration (e.g. due to different binning), internal parameters may need to be reinitialized. In such cases, the first call to
process() may take longer. To avoid this, create the object with create_from_intrinsics_and_metadata with matching metadata.
Limitations
- In-place undistortion is not supported.
- Maximum supported image size is 32767 × 32767 pixels.
- Since
- ids_peak_icv 1.1
Applies undistortion to the specified image.
This function undistorts the image and returns an UndistortedImage that includes updated intrinsic parameters.
The returned image has the same size and pixel format as the input image.
The image region is also undistorted.
- Note
- In the rare case that the Metadata ROI (MetadataKey.ROI) is set such that the principal point of the calibration parameters lies outside the ROI, invalid data may appear at the image border. The image region is therefore restricted to points within the valid area.
- Parameters
-
| image | The image to be undistorted. |
Supported pixel formats
-
Mono8
-
Mono10
-
Mono12
-
Mono16
-
RGB8
-
RGBa8
-
BGR8
-
BGRa8
-
Coord3D_C32f
-
Coord3D_ABC32f
|
See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.
- Returns
- An undistorted image with updated intrinsic parameters.
- Exceptions
-
| NotPossibleException | The image binning factor is too small for the undistortion configuration. |
| MismatchException | The image size or metadata does not match the undistortion configuration. |
- Since
- ids_peak_icv 1.1