Back to Adaptive Vision Library website

You are here: Start » Function Reference » Image Spatial Transforms Maps » CreateCylinderMap

CreateCylinderMap


Creates a spatial map for transformations from a cylinder surface to a flat rectangle.

Syntax

C++
C#
 
void avl::CreateCylinderMap
(
	const avl::ImageFormat& inImageFormat,
	const avl::Rectangle2D& inCylinderRectangle,
	const float inCylinderRadiusCorrection,
	atl::Optional<avl::Point2D> inOpticalAxis,
	atl::Optional<int> inNewWidth,
	atl::Optional<int> inNewHeight,
	const int inMargin,
	avl::InterpolationMethod::Type inInterpolationMethod,
	avl::SpatialMap& outSpatialMap,
	atl::Optional<avl::Region&> outOutputRegion = atl::NIL
)

Parameters

Name Type Range Default Description
inImageFormat const ImageFormat& Information about dimensions, depth and pixel type of the image
inCylinderRectangle const Rectangle2D& Bounding rectangle of the cylinder
inCylinderRadiusCorrection const float 0.0 - 0.0f How many pixels the cylinder radius is larger than the visible circle radius
inOpticalAxis Optional<Point2D> NIL Coordinates of the camera optical axis (Auto = image center)
inNewWidth Optional<int> 1 - NIL Width of an image created by output spatial map application
inNewHeight Optional<int> 1 - NIL Height of an image created by output spatial map application
inMargin const int 0 - 0 Width of the cylinder extreme points zone excluded from spatial map
inInterpolationMethod InterpolationMethod::Type Bilinear Interpolation method used in extraction of image pixel values
outSpatialMap SpatialMap& Output spatial map
outOutputRegion Optional<Region&> NIL Pixels set by the spatial map application

Description

The filter creates a spatial map that allows to transform a cylinder surface to a flat rectangle. The inCylinderRectangle should be the minimal rectangle that contains the given cylinder. Because of the presence of a camera, the cylinder radius is not equal to but greater than the width of the input rectangle. To compensate the difference, inCylinderRadiusCorrection has to be properly set experimentally. Another important parameter is the inOpticalAxis input that represents the coordinates of the camera optical axis, i.e. it shows which pixel is directly under the camera. It is set to the input image center by default.

Examples

Results of applying RemapImage with a spatial map created with the CreateCylinderMap filter.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

Errors

Error type Description
DomainError Empty domain in CreateCylinderMap.