remove the white object using filter2

how to remove the white object of grayscale image using filter2

 Accepted Answer

Define "remove." Do you want to extract the bounding box into its own image? If so, see my BlobsDemo http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 Or do you want to set all pixels values of 255 to 0 or nan?

2 Comments

i have image with RGB (1 1 1), RGB (0 0 0), RGB(0.478 0.478 0.478).how to eliminate RGB (1 1 1) from the image, so i only have image with RGB( 0 0 0) RGB(0.478 0.478 0.478)
Which color should the 1,1,1 pixels get set to? 0,0,0, or .478,.478,.478?
rgbImage(rgbImage==1) = 0; % Or 0.478 whichever you want.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!