2D RGB image plotting on 3D dimension
Afficher commentaires plus anciens
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,
Réponses (2)
Alfonso Pérez-Escudero
le 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!
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
