Back to FabImage Studio website

You are here: Start » Filter Reference » Computer Vision » Shape Adjustment » AdjustPathArraysToEdges

AdjustPathArraysToEdges


Module: FoundationPro

Translates, rotates and scales multiple contour sets (PathArray), each separately, to the edges of the input image with subpixel precision.

Applications

Fine-tune results of edge-based template matching.
Name Type Range Description
Input value
inImage Image Input image.
Input value
inPaths PathArrayArray Paths to be adjusted. For sparse, synthetic paths the inPointSpacing needs to be specified.
Input value
inPointSpacing Real* 1.0 - If set, sampling points of the input path will be equidistant with specified spacing. Useful for increasing density of synthetic, sparse paths.
Input value
inAlignments CoordinateSystem2DArray* Alignments to be corrected, usually connect to outObjects.Alignment[] of LocateObjects:Multiple filter.
Input value
inAttractionRadius Real 0.1 - Expected initial distance between inPaths and edges of the input image.
Input value
inAdjustmentMetric AdjustmentMetric Metric used for path attraction. The SegmentDistance minimizes distances along path normal vectors, and thus adjustment is more accurate. PointDistance_* minimize euclidean distance, adjustment tends to be more stable.
Input value
inAdjustTranslation Bool Compute the translation part of adjustment transform. Must be true when using AttractPathTangents estimation method.
Input value
inAdjustRotation Bool Compute the rotation part of adjustment transform.
Input value
inAdjustScale Bool Compute the scale part of adjustment transform.
Input value
inIterationCount Integer 0 - 100 Number of iterations of internal adjustment algorithm.
Input value
inBaseGradient Real 0.1 - Threshold for suppression of weak input image gradients. Increase for very noisy images.
Output value
outAdjustedPaths PathArrayArray Adjusted output paths.
Output value
outAlignments CoordinateSystem2DArray Corrected alignments - inAlignments input modified with estimated adjustment parameters.
Diagnostic input
diagAttractionVectors Segment2DArrayArray Attraction vectors from first iteration.

Hints

Hardware Acceleration

This operation is optimized for SSSE3 technology for pixels of type: UINT8.

This operation is optimized for AVX2 technology for pixels of type: UINT8.

This operation is optimized for NEON technology for pixels of type: UINT8.

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 inPaths and inAlignments have different size
DomainError To use SegmentDistance adjustment metric, inAdjustTranslation must be enabled.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

  • AdjustPathArrayToEdges – Translates, rotates and scales the given contour set to the edges of the input image with subpixel precision.