Professional Documents
Culture Documents
png');
J = rgb2gray(IMG);I = imresize(J, 0.25);BW= imbinarize(I);
BW2 = bwareaopen(BW, 25);
BW3=bwareaopen(BW, 15);
BW4=bwareaopen(BW, 7);
[B,L,N] = bwboundaries(BW2);
imshow(BW2); hold on;
for k=1:length(B),
boundary = B{k};
if(k > N)
plot(boundary(:,2), boundary(:,1), 'g','LineWidth',2);
else