Skip to content

Instantly share code, notes, and snippets.

@ecmelkytz
Created January 8, 2014 20:24
Show Gist options
  • Save ecmelkytz/8323954 to your computer and use it in GitHub Desktop.
Save ecmelkytz/8323954 to your computer and use it in GitHub Desktop.
clc;
im=imread('coins.png');
im=im2bw(im);
im=imfill(im,'hole');
subplot(2,2,1);
imshow(im)
label=bwlabel(im);
toplam=max(max(label));
L1=label==1;
oz=regionprops(L1,'Area','Centroid','Boundingbox');
alan=oz(1).Area
merkez=oz(1).Centroid
kaplama=oz(1).BoundingBox
subplot(2,2,2);
imshow(L1)
subplot(2,2,3);
imshow(im-L1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment