Back to Aurora Vision Studio website

You are here: Start » Filter Reference » Image » Image Spatial Transforms Maps » CreatePerspectiveMap_Points

CreatePerspectiveMap_Points


Module: Calibration

Creates a perspective transform map from four points denoting a rectangle in the world coordinates.

Applications

Data preprocessing for fast perspective correction. The result is used by RemapImage.
Name Type Description
Input value inImageFormat ImageFormat
Input value inRoi Region* Range of pixels to be processed
Input value inImagePoints Point2DArray Points define real object plane corners.
Input value inTargetPoints Point2DArray* Points define target plane corners. If NIL then image corners are used starting from (0,0) (Width, 0) (Width, Height), (0, Height)
Input value inNewSize Size* New image size after remapping
Input value inInterpolationMethod InterpolationMethod Interpolation method used in extraction of image pixel values
Output value outSpatialMap SpatialMap Created SpatialMap with perspective transform
Output value outTransformMatrix Matrix Used transform matrix

Description

This operation computes a SpatialMap which can be later used for removing a perspective distortion from an image.

The operation maps the input image points (inImagePoints) onto locations described by the target points (inTargetPoints). If the inTargetPoints input is set to Auto this array will be made from the corner points of the input image. Both array must contains four points.

The input inNewSize allows rescaling of the output image.

The inImageFormat format is necessary for preparation of a spatial map.

The outTransformMatrix output allows verifying the found transformation.

Remarks

This filter is a good choice for local perspective distortion removal - such as "unwrapping" boxes, as is depicted by the example above. Applications concerned with observing real-world flat surfaces (such as observing conveyor belts) should use methods that are more accurate. Please refer to: Machine Vision Guide - Camera Calibration and World Coordinates

Notice that both inImagePoints array and inTargetPoints must be made of four points. This filter creates point to point transform so changing the points' order in the array may yield an unexpected result.

The best way to understand the relation between inImagePoints and inTargetPoints is to present the first of them on the input image and the second on the background of the remapped image.

The image before remapping on the left (with inImagePoints) and the image after on the right (with inTargetPoints) created by CreatePerspectiveMap_Path.

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 Each of input array must contain four points in CreatePerspectiveMap_Points.

Complexity Level

This filter is available on Basic Complexity Level.

Filter Group

This filter is member of CreatePerspectiveMap filter group.

See Also

  • RemapImage – Applies a precomputed image transform, defined by a spatial map object.