You are here: Start » FIL.NET » Function Reference » Image » Image Spatial Transforms Maps » FIL.CreatePerspectiveMap_Path
Creates a perspective transform map from planes defined by paths.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void CreatePerspectiveMap_Path ( FilNet.ImageFormat inImageFormat, FilNet.Path inImagePath, FilNet.InterpolationMethod inInterpolationMethod, FilNet.SpatialMap outSpatialMap, FilNet.Matrix outTransformMatrix )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImageFormat | FilNet.ImageFormat | |||
![]() | inImagePath | FilNet.Path | Plane defined by a closed path made of 4 points. | ||
![]() | inInterpolationMethod | FilNet.InterpolationMethod | Interpolation method used in extraction of image pixel values. | ||
![]() | outSpatialMap | FilNet.SpatialMap | Calculated spatial map. | ||
![]() | 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 path (inImagePath) into the target path (inTargetPath). If the inTargetPath input is set to Auto this path will be made from the corner points of the input image. Both paths must be closed and must be made of 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.
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 inImagePath path and inTargetPath must be made of four points. This filter creates point to point transform so the changing points order in paths may yield an unexpected result.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | inImagePath input must contain a closed path created from 4 points in CreatePerspectiveMap_Path. |
DomainError | inTargetPath input must contain a closed path created from 4 points in CreatePerspectiveMap_Path. |