Grayscale colormap for contrast enhancement
cmap = contrast(X)
cmap = contrast(X,m)
The contrast function enhances the contrast of an image. It creates a new gray colormap, cmap, that has an approximately equal intensity distribution. All three elements in each row are identical.
Load clown to get image X and its associated colormap, map. Display the image produced by X and map.
load clown figure image(X) colormap(map)
Use contrast to return a gray colormap that is the same length as the current colormap, map. Display the image with the new colormap, cmap.
cmap = contrast(X); colormap(cmap)