You are here: Start » FIL.NET » FIL.CreatePerspectiveMap_Points

FIL.CreatePerspectiveMap_Points

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

Namespace:FilNet
Assembly:FIL.NET.dll

Syntax

C++
C#
 
public static void CreatePerspectiveMap_Points
(
	FilNet.ImageFormat inImageFormat,
	NullableRef<FilNet.Region> inRoi,
	IList<FilNet.Point2D> inImagePoints,
	NullableRef<IList<FilNet.Point2D>> inTargetPoints,
	FilNet.Size? inNewSize,
	FilNet.InterpolationMethod inInterpolationMethod,
	FilNet.SpatialMap outSpatialMap,
	FilNet.Matrix outTransformMatrix
)

Parameters

Name Type Range Default Description
inImageFormatFilNet.ImageFormat
inRoiFilNet.NullableRef<FilNet.Region>Range of pixels to be processed. Default value: ftl::NIL.
inImagePointsSystem.Collections.Generic.IList<FilNet.Point2D>Points define real object plane corners.
inTargetPointsFilNet.NullableRef<System.Collections.Generic.IList<FilNet.Point2D>>Points define target plane corners. If NIL then image corners are used starting from (0,0) (Width, 0) (Width, Height), (0, Height). Default value: ftl::NIL.
inNewSizeFilNet.Size?New image size after remapping. Default value: ftl::NIL.
inInterpolationMethodFilNet.InterpolationMethodInterpolation method used in extraction of image pixel values.
outSpatialMapFilNet.SpatialMapCreated SpatialMap with perspective transform.
outTransformMatrixFilNet.MatrixUsed transform matrix.

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.

Errors

List of possible exceptions:

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

Function Overrides

See also