Posts

Showing posts with the label Coin Count

Count Coin Values in Image using MATLAB

Image
As the first step, I am going to read the image.              img = imread('F:/Academic Video/MC/PracticalAssignment_I/Coins.jpg'); As the second step, I am going to crop the image.             img1 = img(700:2500,400:1950,:); As the third step, I am going to convert the image into black and white             bw = im2bw(img1); As the fourth step, I am going to convert the background color into black and object color into white.             bw = ~bw; As the fifth step, I am going to enhance the objects.             se = strel('disk',50);             img2 = imdilate(bw,se);             img2 = imerode(img2,se);             se = strel('disk',60);             ...