You are here: Start » Program Examples » Plate Measurement

Plate Measurement

Aim

The aim of the program is to measure the the length of a metal plate.

Input

An image of a metal plate.

Output

Calculated distance between horizontal edges.

Hints

The solution of this problem is immediate if a proper filter for measuring object width is used.

Labeling connections is explained in this article.

Solution (AVS)

  1. Add the EnumerateImages filter to load consecutive images of some disk directory.
  2. Add the MeasureObjectWidth filter.
  3. Connect outImage with inImage.
  4. Click on the MeasureObjectWidth filter and make the following changes in Properties window (in the bottom left corner):
    • Click the "..." button at the inScanField input to open the GUI for specifying scanning field.
    • Set the scanning field as it is shown in the below image. Please remember that ScanField defines a rectangular field in which a series of scans will be performed.
    • Set inScanCount to 20 to increase the number of scanning segments that are used to detect the horizontal edges of the plate.
    • Set inStripeScanParams.StripePolarity to Bright as the plate is brighter than the background.
    • Set inStripeScanParams.MinStripeWidth to 500 to reject noise which is narrower than the object.

Macrofilter Main

Used Filters

Icon Name Description
MeasureObjectWidth Measures the width of an object using stripe detection.
EnumerateImages Emulates image acquisition with images stored on disk.

Further Readings