COLORMAP_GRADIENT
Syntax | Return Value | Arguments | Keywords | Examples | Version History
The COLORMAP_GRADIENT function maps an image into a specified luminance-based gradient. This function can be used to apply a "false" color to an image, based on image luminance levels.
Syntax
Result = COLORMAP_GRADIENT(Image[, Gradient])
Return Value
Result is a 3-channel byte array of the same width and height as Image.
Arguments
Image
A 2D or 3D array of any basic type containing the input image with range [0-255]. A 2D array is treated as a grayscale image. A 3D array must contain RGB image data and be of the form [3,m,n].
Gradient
An optional scalar integer or [3, 256] byte array. If not provided, Gradient maps the image to a grayscale gradient. If a scalar integer is provided, Gradient maps the image to a color table specified by the scalar integer (For more information, see LOADCT). If a [3, 256] byte array is provided, Gradient maps the image into the RGB color table stored in this array.
Keywords
None
Examples
The following example maps an entire image into a blue gradient:
The resulting images appear as follows:
Version History
