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

5 visualizaciones (últimos 30 días)
Frankie123
Frankie123 el 10 de Ag. de 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

Respuestas (2)

Sean de Wolski
Sean de Wolski el 10 de Ag. de 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 el 10 de Ag. de 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.

Categorías

Más información sobre Images en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by