error in detecting components using bwlabel
조회 수: 2 (최근 30일)
이전 댓글 표시
I used bwlabel for detecting connected components but i got error output i.e 3 objects are detected instead of 8. I am attaching input image. Expecting your suggestion.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/169591/image.jpeg)
댓글 수: 0
채택된 답변
Walter Roberson
2018년 1월 29일
bwlabel assumes that the white pixels are where the data is and that the black pixels are holes. When you have black text on a white background you need to invert the image.
댓글 수: 4
Image Analyst
2018년 1월 30일
Or you could sum the image vertically to find the gaps between the symbols.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!