how to fill a surface to obtain a 3D mask

조회 수: 4 (최근 30일)
Mads
Mads 2018년 1월 10일
댓글: Mads 2018년 1월 11일
I have a script that gives me 3D coordinates of the surface of a 3D object.
I would like to obtain a mask in 3D where everything on and inside the surface is true, and everthing outside the surface is false.
The mask could for example be of size 64-by-64-by-64.
Roughly speaking a 3D version of imfill() that tolerates not all points being connected once they are placed in the mask grid.

답변 (1개)

Image Analyst
Image Analyst 2018년 1월 10일
Is there any problem with just doing it one slice at a time using imfill()?
  댓글 수: 1
Mads
Mads 2018년 1월 11일
When for a given slice the points are connected, there is no problem. But when the curve is not closed imfill() doesn't work. I have tried imdilate() followed by imerode() to "invent" the missing points, but the operations seem to be a bit too harsh on the other parts of the curve. I wonder if there is some interpolation method that can fill out missing portions of the curve to close it...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by