Return a gray colormap that maximizes the contrast in an image. The returned colormap will have n rows. If n is not defined then the size of the current colormap is used instead.
See also: colormap
The following code
image (reshape (1:100, 10, 10)) colormap (contrast (1:100,10))
Produces the following figure
Figure 1 |
---|
![]() |