Problem with display an image along surface plot

조회 수: 1 (최근 30일)
Nicolás
Nicolás 2017년 1월 23일
편집: Image Analyst 2017년 1월 24일
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
Jorge Mario Guerra González
Jorge Mario Guerra González 2017년 1월 23일
편집: Image Analyst 2017년 1월 24일
What is the outcome you expecting from the script?
Something like, with your image as texture?
Nicolás
Nicolás 2017년 1월 23일
Yes, exactly

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2017년 1월 23일

카테고리

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