Grayscale image, specified as a numeric array of any dimension.
The
gray2ind function expects images of data type
double and single to have values in the range [0, 1].
If I has values outside the range [0, 1], then you can rescale values to
the expected range by using the rescale
function.
Data Types: single | double | int16 | uint8 | uint16
Binary image, specified as a logical array of any dimension.
Data Types: logical
Number of colormap colors, specified as a positive integer between 1 and 65536.
If the input image is grayscale, then the default value of
c is 64.
If the input image is binary, then the default value of
c is 2.
Indexed image, returned as a numeric array of the same dimensionality as
the input grayscale or binary image. If the colormap length is less than or
equal to 256, then the class of the output image is uint8
; otherwise it is uint16.
Data Types: uint8 | uint16
Colormap associated with indexed image X, returned as
a c-by-3 numeric matrix with values in the range [0, 1]. Each row is a
three-element RGB triplet that specifies the red, green, and blue components of a single color
of the colormap. The colormap is equivalent to gray(c).
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.