Exact black region detection in black and white image

4 Ansichten (letzte 30 Tage)
ronny3050
ronny3050 am 11 Apr. 2016
Beantwortet: Image Analyst am 6 Aug. 2016
Hello,
Attached is a black and white image, I. I would like to detect the black regions in the image (for instance, the black piano keys). However, regionprops are not helping me because the regions aren't boxes. I would like to detect the exact boundaries of each key.
I appreciate all the help.
-Deb
Edit: I have looked at several demos and examples online such as the Image Segmentation demos by 'Image Analyst', however, I need the exact boundary, and not an approximate box.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 11 Apr. 2016
The keys are not individual regions. Your only individual black regions the whole upper part, the whole bottom boundary, and a couple of dots that appear to be artifacts.

Weitere Antworten (1)

Image Analyst
Image Analyst am 6 Aug. 2016
Deb:
The top black line can be detected by scanning every column to find the top, then just turn the next 20 pixels or so white. Then the black regions will be separated.
If it's still a problem, write back.

Community Treasure Hunt

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

Start Hunting!

Translated by