You are here: Start » FIL.NET » Function Reference » Computer Vision » Shape Adjustment » FIL.AdjustPathArraysToEdges
Translates, rotates and scales multiple contour sets (PathArray), each separately, to the edges of the input image with subpixel precision.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
C++
C#
public static void AdjustPathArraysToEdges ( FilNet.Image inImage, IList<IList<FilNet.Path>> inPaths, float? inPointSpacing, NullableRef<IList<FilNet.CoordinateSystem2D>> inAlignments, float inAttractionRadius, FilNet.AdjustmentMetric inAdjustmentMetric, bool inAdjustTranslation, bool inAdjustRotation, bool inAdjustScale, int inIterationCount, float inBaseGradient, IList<SafeList<FilNet.Path>> outAdjustedPaths, IList<FilNet.CoordinateSystem2D> outAlignments, IList<List<FilNet.Segment2D>> diagAttractionVectors )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inPaths | System.Collections.Generic.IList<System.Collections.Generic.IList<FilNet.Path>> | Paths to be adjusted. For sparse, synthetic paths the inPointSpacing needs to be specified. | ||
![]() | inPointSpacing | float? | <1.0f, INF> | If set, sampling points of the input path will be equidistant with specified spacing. Useful for increasing density of synthetic, sparse paths. Default value: ftl::NIL. | |
![]() | inAlignments | FilNet.NullableRef<System.Collections.Generic.IList<FilNet.CoordinateSystem2D>> | Alignments to be corrected, usually connect to outObjects.Alignment[] of LocateObjects:Multiple filter. Default value: ftl::NIL. | ||
![]() | inAttractionRadius | float | <0.1f, INF> | 2.0f | Expected initial distance between inPaths and edges of the input image. Default value: 2.0f. |
![]() | inAdjustmentMetric | FilNet.AdjustmentMetric | SegmentDistance | 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. Default value: SegmentDistance. | |
![]() | inAdjustTranslation | bool | True | Compute the translation part of adjustment transform. Must be true when using AttractPathTangents estimation method. Default value: True. | |
![]() | inAdjustRotation | bool | True | Compute the rotation part of adjustment transform. Default value: True. | |
![]() | inAdjustScale | bool | False | Compute the scale part of adjustment transform. Default value: False. | |
![]() | inIterationCount | int | <0, 100> | 6 | Number of iterations of internal adjustment algorithm. Default value: 6. |
![]() | inBaseGradient | float | <0.1f, INF> | 1.0f | Threshold for suppression of weak input image gradients. Increase for very noisy images. Default value: 1.0f. |
![]() | outAdjustedPaths | System.Collections.Generic.IList<FilNet.SafeList<FilNet.Path>> | Adjusted output paths. | ||
![]() | outAlignments | System.Collections.Generic.IList<FilNet.CoordinateSystem2D> | Corrected alignments - inAlignments input modified with estimated adjustment parameters. | ||
![]() | diagAttractionVectors | System.Collections.Generic.IList<System.Collections.Generic.List<FilNet.Segment2D>> | Attraction vectors from first iteration. |
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.
Hardware acceleration settings may be manipulated with Settings class.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | inPaths and inAlignments have different size |
DomainError | To use SegmentDistance adjustment metric, inAdjustTranslation must be enabled. |
Function Overrides
- AdjustPathArraysToEdges(Image, IList<IList<Path>>, Single, AdjustmentMetric, Boolean, Boolean, Boolean, Int32, Single, IList<SafeList<Path>>, IList<CoordinateSystem2D>)
- AdjustPathArraysToEdges(Image, IList<IList<Path>>, Nullable<Single>, NullableRef<IList<CoordinateSystem2D>>, Single, AdjustmentMetric, Boolean, Boolean, Boolean, Int32, Single, IList<SafeList<Path>>, IList<CoordinateSystem2D>)