The task is to devise an algorithm which would compute the distance between ridges.
The set of images with variable positions of the object as in the picture below:
Detected ridges in the image with computed distance between them (the width of a gap):
As the position of ridges slightly changes, think of a way to locate the ridges without using the Template Matching technique. You could use some other part of the image to find its alignment. Using the Region Analysis it is possible to determine the location of holes and based on this information to create a local coordinate system.
Load images into your program using EnumerateImages.
Add the ScanExactlyNRidges filter and:
|EnumerateImages||Emulates image acquisition with images stored on disk.|
|GetSortedElements||Returns elements corresponding to 8 smallest/biggest values from the array of values.|
|ThresholdToRegion||Extraction of a region of objects that can be defined by a salient brightness.|
|CreateCoordinateSystemFromSegment||Creates a coordinate system with the origin on a given segment.|
|ScanExactlyNRidges||Very fast detection (or presence verification) of thin structures like scratches or scale marks.|
|RegionMassCenter||Computes a point with coordinates equal to the average coordinates of the region's pixels.|
|SplitRegionIntoBlobs||Segmentation of a region into individual objects when the objects do not touch each other.|
- 1D Edge Detection - The article explaining how edge detection filters work.
- Array - Link to all operations based on arrays in Adaptive Vision Studio.
- Blob Analysis - Article presents detailed information about the Blob Analysis technique.
- Local Coordinate Systems - This article describes basic concept of using the coordinate systems.