You are here: Start » AVL.NET » Function Reference » Computer Vision » Camera Calibration » AVL.CreateRectificationMap_WorldUnits

AVL.CreateRectificationMap_WorldUnits

Computes a spatial map for transforming distorted images to rectified images defined in world coordinate plane. Defines the output geometry in world units.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void CreateRectificationMap_WorldUnits
(
	AvlNet.ImageFormat inImageFormat,
	float inLeftBound,
	float inRightBound,
	float inTopBound,
	float inBottomBound,
	float? inWorldScale,
	bool inInvertedWorldY,
	AvlNet.InterpolationMethod inInterpolationMethod,
	AvlNet.RectificationTransform inTransform,
	AvlNet.RectificationMap outRectificationMap
)

Parameters

Name Type Range Default Description
inImageFormatAvlNet.ImageFormatInput image format.
inLeftBoundfloatWorld X coordinate of left side of generated output image.
inRightBoundfloatWorld X coordinate of right side of generated output image.
inTopBoundfloatWorld Y coordinate of top side of generated output image. ...
inBottomBoundfloatWorld Y coordinate of bottom side of generated output image.
inWorldScalefloat?<0.001f, INF>[pix / world unit] Specifies the scale for output image. By default scale is calculated such that there will be no rescaling at the center of output image. Default value: atl::NIL.
inInvertedWorldYboolFalseSet to true if world coordinate system has right-handed orientation, also known as mathematical or standard. This effectively mirrors the rectified image vertically. Default value: False.
inInterpolationMethodAvlNet.InterpolationMethodBilinearDefault value: Bilinear.
inTransformAvlNet.RectificationTransformTransform'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.
outRectificationMapAvlNet.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 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 are specified by:

  1. inLeftBound,inRightBound,inTopBound,inBottomBound - real world coordinate boundaries of the area which output image will cover.
  2. inWorldScale - the scale for output image, defined in pixels per world unit.
For example, if one is interested in area spanning from (0,0) to (10,6) world coordinate, with resolution 100 pixels / world unit, then inputs would be set as follows:
  • inLeftBound = 0
  • inRightBound = 10
  • inTopBound = 0
  • inBottomBound = 6
  • 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 inLeftBound should be less than inRightBound
DomainError inTopBound should be less than inBottomBound

Function Overrides

See also