3D reconstruction from 2D images

11 views (last 30 days)
Hang Jo Ann
Hang Jo Ann on 22 Feb 2018
Commented: Rik on 28 Jun 2021
I have come across an example of surface2volume function from https://www.mathworks.com/matlabcentral/fileexchange/8772-surface2volume .I had tried the example given and it work! My question is how I gonna to modify the coding so it can be used for my own ultrasound 2D images? Because the example coding is loading the mri mat file.The example coding is as below:
load mri;
D = squeeze(D);
D = padarray(D,[5 5 5],'both');
% Create an isosurface
Ds = smooth3(D);
surface = isosurface(Ds,5);
% Display the surface
figure;
subplot(1,2,1);
hiso = patch('Vertices',surface.vertices,...
'Faces',surface.faces,...
'FaceColor',[1,.75,.65],...
'EdgeColor','none');
view(45,30)
axis tight
daspect([1,1,.4])
lightangle(45,30);
set(gcf,'Renderer','zbuffer'); lighting phong
isonormals(Ds,hiso)
set(hiso,'SpecularColorReflectance',0,'SpecularExponent',50)
% Reconstruct the volume and display it as montage
OV = surface2volume(surface,[],1);
nDims = size(OV);
subplot(1,2,2);
montage(reshape(OV,nDims(1),nDims(2),1,nDims(3)),[0 1]);
Hope you can clear my doubt.I am a newbie to use matlab. If you got any solution to stack 2D images into 3D or can reconstruct 3D from multiple 2D images please feel free to comment here.Thank you very much!
  4 Comments
AYYOUB AZNAG
AYYOUB AZNAG on 28 Jun 2021
Hello ,i'm now on thesis period and i need your help for 3D reconstruction from 2D image , Thank you
Rik
Rik on 28 Jun 2021
@AYYOUB AZNAG Have a read here and here. It will greatly improve your chances of getting an answer.

Sign in to comment.

Answers (0)

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!