필터 지우기
필터 지우기

is it possible to convert 2d image into 3d binary image form?

조회 수: 2 (최근 30일)
sidra Rafique
sidra Rafique 2019년 10월 14일
댓글: sidra Rafique 2019년 10월 18일
i want to use 3d binary image for printing or sketching purpose. But i am not sure how to create the 3d binary image. please guide me through this.
  댓글 수: 8
Walter Roberson
Walter Roberson 2019년 10월 15일
How is the Z value to be derived? And are you wanting only a surface or a filled volume ?
sidra Rafique
sidra Rafique 2019년 10월 15일
@Walter Roberson yes i have to use voxelization in order to show depth.. yes i want to show everything under curve because in the end i want to create a 3d image. but in binary form so that after performing printing one can easily see that its a 3d image not 2d.

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

채택된 답변

Walter Roberson
Walter Roberson 2019년 10월 15일
h = surf(YourImageArray);
or more likely
h = surf(YourImageArray, 'edgecolor', 'none');
After that you would use https://www.mathworks.com/matlabcentral/fileexchange/4512-surf2stl . If you need x and y coordinates you can use 1:size(YourImageArray,2) for x and 1:size(YourImageArray,1) for y.
  댓글 수: 5
Walter Roberson
Walter Roberson 2019년 10월 17일
The error message is misleading: what it is really complaining about is the YourImageArray being 3D.
h = surf(YourImageArray(:,:,1), 'edgecolor', 'none');
I suspect that the ragged edges you will see have to do with JPEG blurring of straight edges.
sidra Rafique
sidra Rafique 2019년 10월 18일
thankyou so much Mr Walter. it worked now.
i have one more question. but its not binary. As in the end i will be needing 3d binary image.Inorder to make it binary i have tried this.
surf2stl('test.stl',1,1,'binary');
but it is showing 0 facets. i dont know what does that mean and how to get 3d binary image from surf.
waiting for your responce.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by