You are here: Start » Function Reference » Computer Vision » 1D Edge Detection » CreateScanMap
CreateScanMap
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | MetrologyBasic |
Precomputes a data object that is required for fast 1D edge detection.
Applications: Used together with 1D Edge Detection filters (excluding "_Direct"), but can be moved before the loop if only the scan parameters do not change.
Syntax
void fil::CreateScanMap ( const fil::ImageFormat& inImageFormat, const fil::Path& inScanPath, ftl::Optional<const fil::CoordinateSystem2D&> inScanPathAlignment, int inScanWidth, const fil::SamplingParams& inSamplingParams, fil::ScanMap& outScanMap, ftl::Optional<fil::Path&> outAlignedScanPath = ftl::NIL, ftl::Array<fil::Path>& diagSamplingPoints, float& diagSamplingStep )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImageFormat | const ImageFormat& | Dimensions, depth and pixel type of the image 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 | |
![]() |
inScanWidth | int | 1 - ![]() |
5 | Width of the scan field in pixels |
![]() |
inSamplingParams | const SamplingParams& | .interpolation Bilinear | Parameters controlling the sampling process | |
![]() |
outScanMap | ScanMap& | Optimized data object required for 1D edge detection | ||
![]() |
outAlignedScanPath | Optional<Path&> | NIL | Transformed input path | |
![]() |
diagSamplingPoints | Array<Path>& | Array of paths each one containing the sampling points that contributes to a single value of the extracted profile | ||
![]() |
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 ftl::NIL
to these parameters: outAlignedScanPath.
Read more about Optional Outputs.
Description
The operation creates a scan map from a given inScanPath. The scan map can be later used by other 1D Edge Detection 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, typically detected by one of Template Matching filters.
This filter is a part of the 1D Edge Detection toolset. For a comprehensive introduction to this technique please refer to 1D Edge Detection and 1D Edge Detection - Subpixel Precision chapters of our Machine Vision Guide.
Remarks
Read more about Local Coordinate Systems in Machine Vision Guide: Local Coordinate Systems.
See Also
- ScanSingleEdge – Locates the strongest transition between dark and bright pixels along a given path.
- ScanSingleRidge – Locates the strongest dark or bright pixel peak along a given path.
- ScanSingleStripe – Locates the strongest pair of edges across a given path.