Exact black region detection in black and white image

4 visualizaciones (últimos 30 días)
ronny3050
ronny3050 el 11 de Abr. de 2016
Respondida: Image Analyst el 6 de Ag. de 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.

Respuesta aceptada

Walter Roberson
Walter Roberson el 11 de Abr. de 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.

Más respuestas (1)

Image Analyst
Image Analyst el 6 de Ag. de 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