MATLAB: Removing noise from the image

Image Processing Toolboxreduce noise from an image

Best Answer

I am getting this result by following code...Hope this helps
I=rgb2hsv(RGBimg);
I1=I(:,:,2); % change to hsv and select the channel with most clear contrast between object and shadow
thresholded = I1 < 0.35;
SE = strel('disk',9);
IM2 = imerode(thresholded,SE);
imshow(IM2);