MATLAB: Reduce to 64 gray levels in intensity

reduce intensity

how we can reduce to 64 gray levels in intensity of grayscale image.

Best Answer

image_as_rgb = cat(3, YourGrayImage, YourGrayImage, YourGrayImage);
[image_as_ind, image_map] = rgb2ind(image_as_rgb, 64);
reduced_gray_image = ind2rgb(image_as_ind, image_map);