You are here: Start » FIL.NET » FIL.CreateRectificationMap
Computes a spatial map for transforming distorted images to rectified images defined in world coordinates.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void CreateRectificationMap ( FilNet.ImageFormat inImageFormat, FilNet.CreateSpatialMapUnit inCenterPointType, FilNet.CreateSpatialMapUnit inOutputSizeType, FilNet.InterpolationMethod inInterpolationMethod, FilNet.RectificationTransform inTransform, FilNet.RectificationMap outRectificationMap )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImageFormat | FilNet.ImageFormat | Input image format. | ||
![]() | inCenterPointType | FilNet.CreateSpatialMapUnit | Pixels | Specifies units of measurement of inCenterPoint. Default value: Pixels. | |
![]() | inOutputSizeType | FilNet.CreateSpatialMapUnit | Pixels | Specifies units of measurement of inOutputWidth and inOutputHeight. Default value: Pixels. | |
![]() | inInterpolationMethod | FilNet.InterpolationMethod | Bilinear | Default value: Bilinear. | |
![]() | inTransform | FilNet.RectificationTransform | Transform's camera model is needed for undistortion of image, when not supplied the generated map will assume undistorted image on input. Transform's homography is needed for transforming to given world plane, when not supplied the generated map will only remove distortion of image. | ||
![]() | outRectificationMap | FilNet.RectificationMap |
Description
Creates a RectificationMap, which is used by RectifyImage filter for image rectification onto a defined world plane. Point locations on rectified images are related to the world plane (defined by inTransform) only by translation and scaling.
The filter may be used to generate a map which only removes a lens distortion in the image – to achieve this behaviour attach a camera model directly to inTransform (i.e. do not provide a homography matrix).
The inTransform may not contain a camera model – in such case the the generated map will assume undistorted image on input.
The output image dimensions, resolution and cropping is specified by:
- inCenterPoint - the point which will be the center of output image. Can be selected on the input image or it can be defined in world units - see inCenterPointType
- inOutputWidth,inOutputHeight - the size of output image, can be defined in output pixels or in world units - see inOutputSizeType
- inWorldScale - the scale for output image, defined in pixels per world unit.
- inCenterPoint = (5,3)
- inCenterPointType = WorldUnits
- inOutputWidth = 10
- inOutputHeight = 6
- inOutputSizeType = WorldUnits
- inWorldScale = 100
Auxiliary data contained inside the RectificationMap describes the relation of rectified image to the world plane.
Examples
![]() |
![]() |
|||
Left: original image, as captured by a camera, with mild lens distortion present. Right: rectified image with annotated length measurement. |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Homography matrix must be a 3x3 matrix |