You are here: Start » AVL.NET » AVL.FitSegmentToEdges(AvlNet.Image, AvlNet.SegmentFittingMap, AvlNet.EdgeScanParams, AvlNet.Selection, AvlNet.LocalBlindness, float, AvlNet.MEstimator?, AvlNet.Segment2D?, AvlNet.Point2D[], AvlNet.Profile, float[], AvlNet.Profile[], AvlNet.Profile[])
AVL.FitSegmentToEdges(AvlNet.Image, AvlNet.SegmentFittingMap, AvlNet.EdgeScanParams, AvlNet.Selection, AvlNet.LocalBlindness, float, AvlNet.MEstimator?, AvlNet.Segment2D?, AvlNet.Point2D[], AvlNet.Profile, float[], AvlNet.Profile[], AvlNet.Profile[])
Performs a series of 1D edge detections and finds a segment that best matches the detected points.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
public static void FitSegmentToEdges( AvlNet.Image inImage, AvlNet.SegmentFittingMap inFittingMap, AvlNet.EdgeScanParams inEdgeScanParams, AvlNet.Selection inEdgeSelection, AvlNet.LocalBlindness inLocalBlindness, float inMaxIncompleteness, AvlNet.MEstimator? inOutlierSuppression, out AvlNet.Segment2D? outSegment, out AvlNet.Point2D[] outEdgePoints, out AvlNet.Profile outDeviationProfile, out float[] outEdgeMagnitudes, out AvlNet.Profile[] diagBrightnessProfiles, out AvlNet.Profile[] diagResponseProfiles )
Parameters
- inImage
- Type: AvlNet.Image
Image to fit segment to - inFittingMap
- Type: AvlNet.SegmentFittingMap
Input fitting map - inEdgeScanParams
- Type: AvlNet.EdgeScanParams
Parameters controlling the edge extraction process - inEdgeSelection
- Type: AvlNet.Selection
Selection mode of edges - inLocalBlindness
- Type: AvlNet.LocalBlindness
Defines conditions in which weaker edges can be detected in the vicinity of stronger edges, or null. - inMaxIncompleteness
- Type: System.Single
Maximal fraction of edge points not found - inOutlierSuppression
- Type: System.Nullable<AvlNet.MEstimator>
Selects a method for ignoring incorrectly detected points, or null. - outSegment
- Type: System.Nullable<AvlNet.Segment2D>
Fitted segment or nothing if the fitting fails - outEdgePoints
- Type: AvlNet.Point2D
- outDeviationProfile
- Type: AvlNet.Profile
- outEdgeMagnitudes
- Type: System.Single
- diagBrightnessProfiles
- Type: AvlNet.Profile
Extracted image profiles - diagResponseProfiles
- Type: AvlNet.Profile
Profiles of the edge (derivative) operator response
Description
The operation tries to fit a given segment to edges present in the inImage image. Internally, it performs a series of scans with the ScanSingleEdge filter using inFittingMap previously generated from the object being fitted. The found points are then used to determine the actual position of the segment in the image. Only inMaxIncompleteness fraction of these scans may fail. If the fitting according to the given parameters is not possible, outSegment is set to Nil.
Examples
Fitting two segments to the edges of a blister
(inEdgeScanParams.EdgeTransition = DarkToBright, inEdgeScanParams.SmoothingStdDev = 1.0).
Remarks
For more information about local coordinate systems please refer to the following article.
This filter is a part of the Shape Fitting toolset. To read more about this technique, one can refer to the Shape Fitting chapter of our Machine Vision Guide
