Back to Aurora Vision Library website

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


Header: AVL.h
Namespace: avl
Module: Calibration

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

Applications: Inspection of the surface of balls and other spherical objects. The result is used by RemapImage.


void avl::CreateSphereMap
	const avl::ImageFormat& inImageFormat,
	const avl::Rectangle2D& inSphereRectangle,
	const float inSphereRadiusCorrection,
	atl::Optional<int> inNewDimension,
	const int inMargin,
	avl::InterpolationMethod::Type inInterpolationMethod,
	avl::SpatialMap& outSpatialMap,
	atl::Optional<avl::Region&> outOutputRegion = atl::NIL


Name Type Range Default Description
Input value
inImageFormat const ImageFormat& Information about dimensions, depth and pixel type of the image
Input value
inSphereRectangle const Rectangle2D& Bounding rectangle of a sphere
Input value
inSphereRadiusCorrection const float 0.0 - 0.0f How many pixels the sphere radius is larger than the visible circle radius
Input value
inNewDimension Optional<int> 1 - NIL Width and height of an image created by output spatial map application
Input value
inMargin const int 0 - 0 Width of the sphere extreme points zone excluded from spatial map
Input value
inInterpolationMethod InterpolationMethod::Type Bilinear Interpolation method used in extraction of image pixel values
Output value
outSpatialMap SpatialMap& Output spatial map
Output value
outOutputRegion Optional<Region&> NIL Pixels set by the spatial map application

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outOutputRegion.

Read more about Optional Outputs.


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

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.


List of possible exceptions:

Error type Description
DomainError Empty rectangle on input in CreateSphereMap.