2D images into 3D plot

3 次查看(过去 30 天)
agung pratama
agung pratama 2020-4-21
Hallo, I am a new user for Matlab and i really need your help. please. I am trying to generate a 2D images into 3D plot, can anyone help me please.
Something like this.

回答(2 个)

Mehmed Saad
Mehmed Saad 2020-4-21
x=imread('cameraman.tif');
figure,imshow(x)
figure,mesh(x)view([180 90])

darova
darova 2020-4-21
Create 3D object (surface maybe) and use rotate
h = surf(peaks);
orig1 = [ 0 0 0 ];
ang1 = 15;
dir1 = [ 1 0 0];
rotate(h,dir1,ang1,orig1);
view(2)
Use handlers to extract transformed data
x = get(h,'xdata');
y = get(h,'ydata');
z = get(h,'zdata');
  3 个评论
darova
darova 2020-4-21
Is the picture a color one?
agung pratama
agung pratama 2020-4-28
编辑:agung pratama 2020-7-22
Yes,the color one

请先登录,再进行评论。

类别

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