You are here: Start » AVL.NET » Function Reference » Image » Image Spatial Transforms Maps » AVL.CreatePerspectiveMap_Points

AVL.CreatePerspectiveMap_Points

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

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CreatePerspectiveMap_Points
(
	AvlNet.ImageFormat inImageFormat,
	IList<AvlNet.Point2D> inImagePoints,
	AvlNet.InterpolationMethod inInterpolationMethod,
	AvlNet.SpatialMap outSpatialMap,
	AvlNet.Matrix outTransformMatrix
)

Parameters

Name Type Range Default Description
inImageFormatAvlNet.ImageFormat
inImagePointsSystem.Collections.Generic.IList<AvlNet.Point2D>Points define real object plane corners.
inInterpolationMethodAvlNet.InterpolationMethodInterpolation method used in extraction of image pixel values.
outSpatialMapAvlNet.SpatialMapCreated SpatialMap with perspective transform.
outTransformMatrixAvlNet.MatrixUsed transform matrix.

Examples

Image before and after the perspective transform created by CreatePerspectiveMap_Path.

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

List of possible exceptions:

Error type Description
DomainError Each of input array must contain four points in CreatePerspectiveMap_Points.

Function Overrides

See also