How to fill a hollow donut-shaped object so that it looks like a circle?
11 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a segmentation that looks like a donut (see image attached). I want to fill the "donut hole" so that the segmentation looks like a circle instead of a donut. I feel like there has to be a simple solution but I cannot seem to figure it out. I have tried inverting the image using imcomplement and then using bwconncomp and regionprops to find the pixel indices of the two objects in the image (1 being the centre circle, the other being the background pixels which are now white, as seen in the attached image). However, running bwconncomp on the inverted image, I can get the pixel indices of the white pixels, but there is no distinction between the two objects such that I can set the "background" area to black and keep the centre circle as white. Is there any other solution?
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!