use image in single to decrease the size matlab code example
Example: matlab reduce resolution of image
outputImage = imresize(inputImage, [numOutputRows, numOutputColumns]);
outputImage = imresize(inputImage, [numOutputRows, numOutputColumns]);