How to fill an empty volume in a 3D matrix?
조회 수: 5 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (2개)
Sean de Wolski
2012년 8월 10일
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.
댓글 수: 0
Sumit Tandon
2012년 8월 10일
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!