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!