How to isolate the circle from the shaded area?
1 次查看(过去 30 天)
显示 更早的评论
I would like to have only a shaded area from the picture. I want to remove the circle from the binary image. Any idea?
0 个评论
回答(1 个)
Matt J
2015-2-1
How about
A=imread('http://www.mathworks.com/matlabcentral/answers/uploaded_files/24735/D1.png');
A=rgb2gray(A);
outer=~imfill(A,'holes');
outerd=imdilate(outer,ones(5));
newImage = A&~outerd;
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!