Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Image Analysis » MeasureObjectWidth

MeasureObjectWidth


Measures the width of an object using stripe detection.

Name Type Range Description
inImage Image Input image
inScanField SegmentScanField Field in which measurement scans are performed
inScanFieldAlignment CoordinateSystem2D* Adjusts the scan field to the position of the inspected object
inScanCount Integer 2 - Number of scans to be performed
inScanWidth Integer 1 - Width of each single scan
inImageInterpolation InterpolationMethod Interpolation method used in extraction of image pixel values
inStripeScanParams StripeScanParams Parameters controlling the object stripe extraction process
inMeasureMethod MeasureObjectMethod Method used to measure the object
inStripeSelection Selection Selection mode of edges of the object
inLocalBlindness LocalBlindness* Defines conditions in which weaker edges can be detected in the vicinity of stronger edges
inOutlierSuppression MEstimator* Selects a method for ignoring incorrectly detected points
inOutlierCount Integer 0 - Determines how many points are not count when object width is measured
outObjectWidth Real? Width of the object
outSegment1 Segment2D? First edge of the object
outSegment2 Segment2D? Second edge of the object
outAlignedScanField SegmentScanField Field in which the scans are performed
diagScanSegments Segment2DArray Segments along which the scans are performed
diagPoints1 Point2DArray Detected edge points on the first side
diagPoints2 Point2DArray Detected edge points on the second side

Description

The filter measures the width of an object present in an image. Internally, it performs a series of scans with ScanSingleStripe filter along inScanCount parallel scan segments constructed from inScanField. 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. For the filter to work properly, the scan segments do not have to be necessarily perpendicular to the object edges.

Hints

  • Connect the inImage input with an appropriate image source. Make sure that this image is available (the program was previously run).
  • If the object location is variable, connect an appropriate local coordinate system to inScanFieldAlignment.
  • Define inScanField by marking a directed rectangle within which the measurement will be done.
  • Define inStripeScanParams.StripePolarity to detect a particular edge type, and only that type.
  • If the noise level is high, try increasing inScanWidth and/or inStripeScanParams.SmoothingStdDev.
  • If some points (diagPoints1, diagPoints2) are not found found, try decreasing inStripeScanParams.MinMagnitude.
  • If the object is more narrow than 6 pixels, change inStripeScanParams.ProfileInterpolation to Quadratic3.
  • Experiment with inOutlierSuppression and inOutlierCount to deal with some amount of incorrectly detected points.
  • Increase inScanCount to improve accuracy.
  • Experiment with various values for inMeasureMethod to obtain best possible precision.

Examples

Description of usage of this filter can be found in examples and tutorial: L-pipe measurements, Plate Measurement, Plate Measurement (Advanced), Measure Objects .

MeasureObjectWidth performed on the sample image. Green segments are diagScanSegments, the other two are found object edges.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • FitSegmentToEdges – Performs a series of 1D edge detections and finds a segment that best matches the detected points.