Back to Aurora Vision Library website

# CreateSurfaceScanMap

Precomputes a data object that is required for fast 1D edge detection in 3D.

Applications: Used together with 1D Edge Detection 3D filters, but can be moved before the loop if only the scan parameters do not change.

### Syntax

C++
C#

void avl::CreateSurfaceScanMap
(
const avl::SurfaceFormat& inSurfaceFormat,
const avl::Path& inScanPath,
atl::Optional<const avl::CoordinateSystem2D&> inScanPathAlignment,
atl::Optional<float> inSamplingStep,
int inScanWidth,
avl::InterpolationMethod::Type inSurfaceInterpolation,
avl::ScanMap& outScanMap,
atl::Optional<avl::Path&> outAlignedScanPath = atl::NIL,
atl::Array<avl::Path>& diagSamplingPoints,
float& diagSamplingStep
)


### Parameters

Name Type Range Default Description
inSurfaceFormat const SurfaceFormat& Dimensions, depth image pixel type, coordinate offsets and scales of a surface on which edge detection will be performed
inScanPath const Path& Path along which the scan is performed
inScanPathAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the scan path to the position of the inspected object
inSamplingStep Optional<float> 0.0 - NIL Desired distance between consecutive sampling points on the scan path; if Nil, the bigger of surface X and Y scales is chosen
inScanWidth int 1 - 5 Width of the scan field in pixels of the surface depth image
inSurfaceInterpolation InterpolationMethod::Type Bilinear Interpolation method used for extraction of depth image pixel values
outScanMap ScanMap& Optimized data object required for 1D edge detection in 3D
outAlignedScanPath Optional<Path&> NIL Transformed input path
diagSamplingPoints Array<Path>& Array of paths each one containing the sampling points that contributed to a single value of the extracted profile; in the image coordinate system
diagSamplingStep float& Used distance between consecutive sampling points on the scan path

### Optional Outputs

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

### Description

The operation creates a scan map from a given inScanPath. The scan map can be later used by other 1D Edge Detection 3D filters.

The optional parameter inScanPathAlignment defines a transform to be performed on the inScanPath so that the actual scan path (outAlignedScanPath) is adjusted to the position of the object.

### Remarks

Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.