I am trying to process an image. There is a photograph of the RGB leaves, and I want to extract only the sheet.
The following procedure is
- I read an image from a file
- Convert to Grayscale
- Apply a 5x5 median filter.
- Convert to BW


As you can see, the shadow in the lower right corner is attached to the BW image. Is there a way to select only a sheet.
I = imread(files{404}); hcsc = vision.ColorSpaceConverter; hcsc.Conversion = 'RGB to intensity'; Ig = step(hcsc, I); medFilt= vision.MedianFilter([ff]); Ig = step(medFilt, Ig); at = vision.Autothresholder; Ibw = step(at, Ig);
source share