You are here: Start » FIL.NET » Function Reference » Image » Image Spatial Transforms Maps » 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
public static void CreatePerspectiveMap_Points ( FilNet.ImageFormat inImageFormat, IList<FilNet.Point2D> inImagePoints, FilNet.InterpolationMethod inInterpolationMethod, FilNet.SpatialMap outSpatialMap, FilNet.Matrix outTransformMatrix )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImageFormat | FilNet.ImageFormat | |||
![]() | inImagePoints | System.Collections.Generic.IList<FilNet.Point2D> | Points define real object plane corners. | ||
![]() | inInterpolationMethod | FilNet.InterpolationMethod | Interpolation method used in extraction of image pixel values. | ||
![]() | outSpatialMap | FilNet.SpatialMap | Created SpatialMap with perspective transform. | ||
![]() | outTransformMatrix | FilNet.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.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Each of input array must contain four points in CreatePerspectiveMap_Points. |