Start » Filter Reference » Image » Image Spatial Transforms Maps » CreateCylinderMap

CreateCylinderMap


Module: Calibration

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

Applications

Inspection of the surface of bottles and other cylindrical objects. The result is used by RemapImage.
Name Type Range Description
Input value
inImageFormat ImageFormat Information about dimensions, depth and pixel type of the image
Input value
inCylinderRectangle Rectangle2D Bounding rectangle of the cylinder
Input value
inCylinderRadiusCorrection Real 0.0 - How many pixels the cylinder radius is larger than the visible circle radius
Input value
inOpticalAxis Point2D* Coordinates of the camera optical axis (Auto = image center)
Input value
inNewWidth Integer* 1 - Width of an image created by output spatial map application
Input value
inNewHeight Integer* 1 - Height of an image created by output spatial map application
Input value
inMargin Integer 0 - Width of the cylinder extreme points zone excluded from spatial map
Input value
inInterpolationMethod InterpolationMethod Interpolation method used in extraction of image pixel values
Input value
inCylinderMappingMode CylinderMappingMode Determines which pixels of the mapped cylinder have to be within the given rectangle.
Output value
outSpatialMap SpatialMap Output spatial map
Output value
outOutputRegion Region 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

Description of usage of this filter can be found in examples and tutorial: Bottle Flattening.

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

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Cylinder stripe within rectangle thinner then a single pixel in CreateCylinderMap.
DomainError Empty domain in CreateCylinderMap.
DomainError Mapped image width too large in CreateCylinderMap.
DomainError Margin too large in CreateCylinderMap.

Complexity Level

This filter is available on Basic Complexity Level.