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.
Solution (AVS)
- Add EnumerateImages filter.
- Add MeasureObjectWidth filter.
- Connect outImage with inImage.
- Click on MeasureObjectWidth filter and make these changes in Properties window (in the lower 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 rectangular field in which a series of scans will be performed.
- Set inScanCount to 20 to display exactly 20 segments joining the horizontal edges on the plate.
- Set inStripeScanParams.SmoothingStdDev to 0.5 to decrease the smoothing level.
- Set inStripeScanParams.MinMagnitude to 3 to make sure to detect correctly the transition between the background and the plate.
- Set inStripeScanParams.StripePolarity to Bright as the plate is brighter than the background.
- Set inStripeScanParams.MinStripeWidth to 500 to avoid false stripe dimensions.
- Set inOutlierSuppression to Huber which is a better statistics method for this case.
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
- 1D Edge Detection - The article explaining how edge detection filters work.