coins = imread ('F:\Transfer\PROJECT\M.Tech\morphology\coiiins.jpg'); coins1=rgb2gray(coins); level = graythresh (coins1); coins2 = im2bw (coins1, level); se=strel('disk',7); coins3=imerode(coins2,se); B = bwboundaries(coins3); imshow(coins3) text(10,10,strcat('\color{green}Objects Found:',num2str(length(B)))) hold on