function crop = imagecrop(img) % Gets rid of the white border around a Matlab created surface image. s = size(image); for x = 1:s(1) for y = 1:s(2) if (img(x,y,1) ~= 255 & img(x,y,2) ~= 255 | img(x,y,3) ~= 255)