Hi,
I am trying to plot the individual pixels of an image on a surface plot, I have converted the image from RGB to grayscale – below is the code I have so far, but I can't get it working yet. I get an error saying 'Data dimensions must agree'.
RGB=imread('Corn.png');gray=rgb2gray(RGB);gray_double=double(gray);Min_pixel=min(min(gray_double));increment=1;xpoints=0:increment:492;ypoints=0:increment:508;[x,y]=meshgrid(xpoints,ypoints);figuresurf(x,y,gray_double)
Any help would be very much appreciated.
Best Answer