You are here: Start » FIL.NET » Function Reference » Computer Vision » Image Analysis » FIL.MeasureObjectWidth
FIL.MeasureObjectWidth
Measures the width of an object using stripe detection.
Namespace: | FilNet |
---|---|
Assembly: | FIL.NET.dll |
Syntax
public static void MeasureObjectWidth ( FilNet.Image inImage, IList<FilNet.ScanMap> inMeasurementMap, FilNet.StripeScanParams inStripeScanParams, FilNet.MeasureObjectMethod inMeasureMethod, FilNet.Selection inStripeSelection, int inOutlierCount, out float? outObjectWidth, out FilNet.Segment2D? outSegment1, out FilNet.Segment2D? outSegment2 )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() | inImage | FilNet.Image | Input image. | ||
![]() | inMeasurementMap | System.Collections.Generic.IList<FilNet.ScanMap> | Input measurement map. | ||
![]() | inStripeScanParams | FilNet.StripeScanParams | Parameters controlling the object stripe extraction process. | ||
![]() | inMeasureMethod | FilNet.MeasureObjectMethod | Method used to measure the object. | ||
![]() | inStripeSelection | FilNet.Selection | fil::Selection::Best | Selection mode of edges of the object. Default value: fil::Selection::Best. | |
![]() | inOutlierCount | int | Determines how many outlying points are rejected before the width is measured. | ||
![]() | outObjectWidth | float? | Width of the object. | ||
![]() | outSegment1 | FilNet.Segment2D? | First edge of the object. | ||
![]() | outSegment2 | FilNet.Segment2D? | Second edge of the object. |
Description
The filter measures the width of an object present in an image. Internally, it performs a series of scans with ScanSingleStripe filter using inMeasurementMap and inStripeScanParams. The so obtained points are then used for computing two parallel segments by means of a slightly modified segment fitting routine. The process is supported by inOutlierSuppression parameter. Finally, having the aforementioned stripe widths and fitted segments' direction, the object width can be computed using a selected inMeasureMethod method. The inOutlierCount stripe widths most differing from the median width are not used in this step. The inMeasurementMap should be created with CreateMeasurementMap function. For the filter to work properly, the scan segments do not have to be necessarily perpendicular to the object edges.
Examples
![]() |
MeasureObjectWidth performed on the sample image. Green segments are diagScanSegments, the other two are the found object edges.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Invalid MeasurementMap in MeasureObjectWidth function. Use CreateMeasurementMap function to create it properly. |
Function Overrides
- MeasureObjectWidth(Image, IList<ScanMap>, StripeScanParams, MeasureObjectMethod, Selection, Nullable<LocalBlindness>, Nullable<MEstimator>, Int32, Nullable<Single>, Nullable<Segment2D>, Nullable<Segment2D>)
- MeasureObjectWidth(Image, IList<ScanMap>, StripeScanParams, MeasureObjectMethod, Selection, Nullable<LocalBlindness>, Nullable<MEstimator>, Int32, Nullable<Single>, Nullable<Segment2D>, Nullable<Segment2D>, NullableRef<List<NullableRef<Stripe1D>>>, NullableRef<SafeList<Profile>>, NullableRef<SafeList<Profile>>)