How can I remove the border line from the image ?
1 次查看(过去 30 天)
显示 更早的评论
I have an image with some character. After the canny edge detection i get the digits with some border line. so I want to remove all the border line and only extract the digits. How can i do that ?
Here is the output of canny Image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166925/image.jpeg)
0 个评论
回答(1 个)
Image Analyst
2017-8-28
编辑:Image Analyst
2017-8-28
Label the image with bwlabel. Then use regionprops to get the Euler number of each blob. "Hollow" blobs will have an Euler number of 0 or less, while "stick-like" blobs will have an Euler number of 1. Use propfilt() to extract only those with an Euler number of 1.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!