I need help with an image processing problem? I am working on an egg counter…I would like to identify the white dots and then display how many white dots are present in the image. This is my code:
S = imread('29.jpg');B = imcrop(S,[70 55 576 432]);S2 = rgb2gray(B);S3 = S2>180;H = fspecial('unsharp');I4 = imfilter(S3,H,'replicate');se = strel('disk',11);erodedBW = imerode(S3,se);imshow(erodedBW)
Here are the original and filtered images:
Best Answer