I have converted the image to binary( black and white). Here is the original image and binary image
Here is the code I have written
a=imread('image');
imshow(a);title('original image');
b=imresize(a,[200,250]);
figure,imshow(b);title('resized image');
c=im2bw(b);
figure,imshow(c); title(['Number of white pixels: ' int2str(nnz(c))]);
at=int2str(nnz(c));
disp(at)
I counted the white pixels to find the total area of leaf. But because of the folds in leaf some part of leaf area is covered with black pixels. How do I change the whole leaf area white? How do I take care of leaf folds? I am doing an image processing project in matlab where I will have to grade the leaf. It would be really helpful if someone could give me the code to take care of the folds of leaf in digital image. I'm using MATLAB 2009a.