Convert a grayscale or binary intensity image to an indexed image.
The indexed image will consist of n different intensity values. If not given n defaults to 64 for grayscale images or 2 for binary black and white images.
The output img is of class uint8 if n is less than or equal to 256; Otherwise the return class is uint16.
See also: ind2gray, rgb2ind.
Package: octave