2D images into 3D plot
Show older comments
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.

Answers (2)
Mehmed Saad
on 21 Apr 2020
x=imread('cameraman.tif');
figure,imshow(x)

figure,mesh(x)view([180 90])

darova
on 21 Apr 2020
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 Comments
agung pratama
on 21 Apr 2020
darova
on 21 Apr 2020
Is the picture a color one?
agung pratama
on 28 Apr 2020
Edited: agung pratama
on 22 Jul 2020
Categories
Find more on Lighting, Transparency, and Shading 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!