
Problem with display an image along surface plot
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi everybody!
I have a problem with display an image along surface plot. Use this example https://www.mathworks.com/help/matlab/ref/surface.html
This is my original image

But, when use this script;
[X,map,alpha] = imread('original_imag.png');
%figure()
%imshow(X)
[x,y] = meshgrid(-1:0.1:1); % Generate x and y data
z = zeros(size(x, 1)); %
figure();
surface(x,y,z,double(X) + 1,...
'FaceColor','texturemap',...
'EdgeColor','none',...
'CDataMapping','direct');
The output is this wrong image;

Obviously, I have a problem with the palette of colors of the original image, but I can't be solved. Any solution?
Thanks in advance,
Nicolás
2 Commenti
Jorge Mario Guerra González
il 23 Gen 2017
Modificato: Image Analyst
il 24 Gen 2017
What is the outcome you expecting from the script?
Something like, with your image as texture?

Risposte (1)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!