I have been attempting to fill in a binary image in Matlab so that I am left with the entirety of this oval-like image like this.
However, I have been running into an issue in actually being able to define the red region. I have tried the following:
- Using the
bwconvhull function to fill the shape accurately, but then I do not know how to get rid of the inner shape to isolate just the red region.
- I have also attempted to trace the boundary of the binary region but to no avail. I am not entirely sure what to do after tracing the boundary. I have attempted to trace just the inner boundary, but the
bwtraceboundary function simply follows the entirety of the borders (on the inside and outside of the skull).
Are there any similar functions to bwconvhull where I am able to expand a region from the center outward? My major difficulties have been in isolating either (a) the inner boundary of the skull or (b) the inner "black" region where the brain should be. My coding attempts can be found below:
Issue (a) - Tracing boundaries
boundary = bwtraceboundary(BW,[row,col],'S');
Issue (b) - Isolating only the center
Are there any particular functions that would be worth trying, or would there be another way to isolate the center of the circle so I can only highlight the red region? Any insight would be greatly appreciated!