Back to FabImage Library website
You are here: Start » Function Reference » Image » Image Spatial Transforms Maps » CreateSphereMap
CreateSphereMap
Header: | FIL.h |
---|---|
Namespace: | fil |
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.
Syntax
C++
C#
void fil::CreateSphereMap ( const fil::ImageFormat& inImageFormat, const fil::Rectangle2D& inSphereRectangle, const float inSphereRadiusCorrection, ftl::Optional<int> inNewDimension, const int inMargin, fil::InterpolationMethod::Type inInterpolationMethod, fil::SpatialMap& outSpatialMap, ftl::Optional<fil::Region&> outOutputRegion = ftl::NIL )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
inImageFormat | const ImageFormat& | Information about dimensions, depth and pixel type of the image | |||
inSphereRectangle | const Rectangle2D& | Bounding rectangle of a sphere | |||
inSphereRadiusCorrection | const float | 0.0 - | 0.0f | How many pixels the sphere radius is larger than the visible circle radius | |
inNewDimension | Optional<int> | 1 - | NIL | Width and height of an image created by output spatial map application | |
inMargin | const int | 0 - | 0 | Width of the sphere 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 |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outOutputRegion.
Read more about Optional Outputs.
Examples
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty rectangle on input in CreateSphereMap. |