利用MATLAB软件实现三维重建
D=squeeze(D);
[x y z D]=reducevolume(D,[1 1 1]);%使用reducevolume数据预处理
D=smooth3(D);
X=get(handles.slider1,'value');
Y=get(handles.slider2,'value');
Z=get(handles.slider3,'value');%切分位置的参数传递
[x,y,z,D]=subvolume(D,[X,512,Y,512,0,Z]);%设定部分重建位置,实现切分
fv=isosurface(x,y,z,D,'noshare');
p=patch(fv,'FaceColor',[1,.75,.65],'EdgeColor','none');
isonormals (x,y,z,D,p);
fvc=isocaps(x,y,z,D,'noshare');
p1=patch(fvc,'FaceColor','yellow','EdgeColor','black')
colormap(gray);
if get(handles.radiobutton1,'value')%三个视角参数设定
az=-37.5;el=30;
elseif get(handles.radiobutton2,'value')
az=60;el=30;
elseif get(handles.radiobutton4,'value')
az=-37.5;el=60;
end
view(az,el);%视角参数传递
lighting gouraud;结果显示设置
axis equal;
daspect([1,1,.3]);
axis on;
grid on;
实验中,对不同视角和不同切分位置的重建如图3-2和图3-3所示:


(a) (b)
图3-2 不同视角的重建


(a) (b)
图3-3 不同切分位置的部分重建
热门文档