I have an image in the form of a matrix:
A zoomed-in portion of the upper right part is:
I would like to remove the disconnected black region, i.e. set that particular region's pixel values equal to that of the white region around it. I tried finidng the number of connected components using
CC = bwconncomp(filled_win);
but I am getting only 1 connected component.
CC.Connectivity = 8, CC.ImageSize = [416, 349]CC.NumObjects = 1, CC.PixelIdxList = 1 X 1 cell
I have attached the relevant .mat file for reference. Can someone please help me with this?
Best Answer