You are here: Start » Program Examples » Plate Measurement
Plate Measurement
Aim:
The aim of the program is to measure 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 (FIS):
-
In Workspace Explorer, open the workspace Examples, and in the Filmstrip window, select the Plate dataset. Drag the Image channel to the ACQUIRE section.
-
Add the MeasureObjectWidth filter.
-
Connect outImage with the inImage.
-
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 the scanning field.
- Set the scanning field as it is shown in the image below. Please remember that ScanField defines a rectangular field in which a series of scans will be performed.
- Set the inScanCount to 20 to increase the number of scanning segments that are used to detect the horizontal edges of the plate.
- Set the inStripeScanParams.StripePolarity to Bright as the plate is brighter than the background.
- Set the 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. |
Further Readings
- 1D Edge Detection - The article explaining how edge detection filters work.