You are here: Start » AVL.NET » AVL.AdjustPathArrayToEdges Method
AVL.AdjustPathArrayToEdges Method
Translates, rotates and scales the given contour set to the edges of the input image with subpixel precision.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void AdjustPathArrayToEdges( AvlNet.Image inImage, AvlNet.Path[] inPaths, float inAttractionRadius, AvlNet.AdjustmentMetric inAdjustmentMetric, bool inAdjustTranslation, bool inAdjustRotation, bool inAdjustScale, int inIterationCount, float inBaseGradient, out AvlNet.Path[] outAdjustedPaths, out AvlNet.CoordinateSystem2D outAlignment, out AvlNet.Segment2D[] diagAttractionVectors )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() | inImage | AvlNet.Image | Input image. | ||
![]() | inPaths | AvlNet.Path | Paths to be adjusted. For sparse, synthetic paths the inPointSpacing needs to be specified. | ||
![]() | inAttractionRadius | float | <0.1f, INF> | 2.0f | Expected initial distance between inPaths and edges of the input image. Default value: 2.0f. |
![]() | inAdjustmentMetric | AvlNet.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 | AvlNet.Path | Output paths, adjusted. | ||
![]() | outAlignment | AvlNet.CoordinateSystem2D | Corrected alignment - the inAlignment input modified with estimated adjustment parameters. | ||
![]() | diagAttractionVectors | AvlNet.Segment2D | Attraction vectors from first iteration. |
Examples
Improving results of template matching. Blue – input paths, orange – attraction vectors, green – corrected paths.
Errors
| Error type | Description |
|---|---|
| DomainError | ComputeTranslation must be enabled for SegmentDistance adjustment metric |
See also
- AdjustPathArrayToEdges(AvlNet.Image, AvlNet.Path[], float, AvlNet.AdjustmentMetric, bool, bool, bool, int, float, AvlNet.Path[], AvlNet.CoordinateSystem2D)
- AdjustPathArrayToEdges(AvlNet.Image, AvlNet.Path[], float?, AvlNet.CoordinateSystem2D?, float, AvlNet.AdjustmentMetric, bool, bool, bool, int, float, AvlNet.Path[], AvlNet.CoordinateSystem2D)
- AdjustPathArrayToEdges(AvlNet.Image, AvlNet.Path[], float?, AvlNet.CoordinateSystem2D?, float, AvlNet.AdjustmentMetric, bool, bool, bool, int, float, AvlNet.Path[], AvlNet.CoordinateSystem2D, AvlNet.Segment2D[])
- Class Reference
- AVL Class



