How to fill an empty volume in a 3D matrix?

2 visualizzazioni (ultimi 30 giorni)
Frankie123
Frankie123 il 10 Ago 2012
Hi everyone!
I have a huge 3D binary matrix representing a single empty volume. To process it, I need to fill the volume with ones to make it a solid volume, but I haven't been able to do that. The floodfill algorithm I've made doesn't work on it and the array seems to be too big for others I've found online. I also have the same image in wavefront format so as a list of vertices and faces.
Can anyone help me? either by suggesting a way to fill the volume or software I could use to convert the wavefront file into a filled volume.?
Thanks,
Frank

Risposte (2)

Sean de Wolski
Sean de Wolski il 10 Ago 2012
What do you mean you want to fill it with ones?
BW = false(10,10,10);
BW(3:6,3:6,3:6) = true;
It is an empty volume with a 4x4x4 cube in the middle. I assume you want something more practical than this though.

Sumit Tandon
Sumit Tandon il 10 Ago 2012
I haven't tried it, but assuming the empty shell to be fully connected, ie there are no "holes" in it, you could use the IMFILL command from Image Processing Toolbox to fill up the volume.

Categorie

Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by