[imagen1 imagepath1]=uigetfile('D:\MATWORKSHOP\source_images\MULTIFOCUS\*.jpg;*.bmp;*.png;*.tif;*.tiff;*.pgm;*.gif','Please choose the first input image');
f=imread(strcat(imagepath1,imagen1));
[high, width, color] = size(f)
x=1:width;
y=1:high;
mesh(x', y', double(f(:,:,1)));
figure
mesh(x', y', double(f(:,:,2)));
figure
mesh(x', y', double(f(:,:,3)));
grid on
xlabel('x'),ylabel('y'),zlabel('z');
title('showup');
比如生成的一张图