How to detect a pattern of dark/bright bands in an image?

3 views (last 30 days)
I'm trying to detect a pattern like this in some images
Pattern (ideal)
The actual image looks something like this
It could be scaled and/or rotated . Is there a way to do that efficiently without resorting to neural nets or some learning algorithm? Can some detection be done based on the value gradient for example (dark-bright-dark-bright-dark)?

Answers (1)

Image Analyst
Image Analyst on 27 Nov 2013
Can you just threshold and locate centroids? What are you really interested in? The centroids, the widths of the bars (as if they were bars), or both?
  7 Comments
Image Analyst
Image Analyst on 1 Aug 2022
@Mert Su to detect centroids first segment the image to get a binary image mask, then use the regionprops function.
props = regionprops(mask, 'Centroid');
xy = vertcat(props.Centroid)
For a full demo see my Image Processing Tutorial in my File Exchange:

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!