2D RGB image plotting on 3D dimension
7 views (last 30 days)
Show older comments
Hi, I just want to know how to plot the 2D RGB image on 3D coordinate(x,y,z).
For example, if i got 5 pieces of 2D RGB image, and plotting the images at z=1:5,
and the size of x,y is not same, likes 150 and 50
I already checked the functions 'surf, scatter3, slice' , but these only support the same size matrix ; 10 by 10 by 10.
Please somebody help me.
Thanks,
0 Comments
Answers (2)
Alfonso Pérez-Escudero
on 5 Oct 2019
Hi! I think the command warp would solve your problem. It allows you to "paint" any image on any surface in 3D, so you can use it to show your image on flat planes at different heights. For example, I used this code:
figure
[X,Y] = meshgrid(1:size(im,2),1:size(im,1));
warp(X,Y,ones(size(X)),im)
hold on
warp(X,Y,5*ones(size(X)),im)
I hope it helps!
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!