Exact black region detection in black and white image
4 次查看(过去 30 天)
显示 更早的评论

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.
0 个评论
采纳的回答
Walter Roberson
2016-4-11
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.
0 个评论
更多回答(1 个)
Image Analyst
2016-8-6
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.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!