I=imread('fing2.jpg');imshow(I);b=rgb2gray(I);>;>;c=adapthisteq(b);>;>;imshow(c);MN=size(c);>;>;background=imopen(c,strel('rectangle',MN));>;I2=imsubtract(c,background);I3=imadjust(I2);>;>;imshow(I3);level=graysthresh(b);d=im2bw(I3,level);bw=bwareaopen(d,50);>;imshow(bw);