Home > Photography > Gradient-Mapped False Colour Images
Gradient-Mapped False Colour Images
A colour gradient is a map in which there are smooth transitions between one or more colours. Usually they are one-dimensional, although when used in graphics software there are often options for mapping to one-dimensional gradient into a two-dimensional space (for example, causing the gradient to radiate outwards from a center point).
Using a gradient to colourize a greyscale image (by mapping the lowest values in the image to one end of a gradient and high values to the other) as a special case of indexed images (those that use palettes/colour look-up tables instead of discreet per-pixel RGB, CMYK, or other colourspace coordinates) has a long history in the imaging world. I have been unable to find out where and when their use originated, but early episodes of Space: 1999 feature mock-thermographic imagery rendered in this manner, which gives an upper bound for their invention of 1974.
Thermography is one of the most common places that members of the general public will have seen gradients in use in this manner, especially in action/sci-fi films such as Predator (and its sequels), and Heat. Sadly, I don't have access to a thermal imager yet, but I have faked a thermal image for use as an example by using the hue channel from a colour image I shot of a fluorescent liquid against a non-fluorescent background. In this case, the hue channel was a fairly good match for the strange "flat" look that thermal images have due to every object illuminating every other object, and a lack of shadows.
These are just a few examples of the essentially infinite number of gradients that can be applied to a greyscale image. In this specific case, the gradients are not intended to represent an absolute value, but simply to show the progression from low values to high values.
In addition to providing a more visually interesting result, using a gradient to represent values has a number of benefits. Gradients can be used to delineate between various thresholds, such as positive versus negative values, or specific increments of temperature (negative and zero temperature being represented in shades of blue, temperatures between 1 and 99 degrees appearing as greyscale or green, and temperatures above 100 degrees rendered in shades of red, for example).
Here is an example in which two simple gradients are used to indicate where values (skewness and kurtosis) in an image are positive or negative:
A conceptually-similar result is achieved in these vegetation index satellite images of New York City. However, these gradients are biased, so that instead of zero being in the center, it is 1/4 of the way from the minimum. This is because everything I've read indicates that it is positive values in this type of image that are important, so more fidelity has been allocated to those values.
As with the skewness and kurtosis images, the values are relative only to zero. The minimum is whatever the lowest value in the image happened to be, and the maximum is whatever the highest value happened to be. They do not represent, for example, values between -1.0 and 1.0.
By using a gradient in which the colour "wraps around" back to its starting value, it becomes possible to more intuitively and accurately represent "circular" values such as phase, the angle of linear polarization, or hue. I don't have equipment that can capture phase or polarization values, but here are a pair of examples in which I've converted an RGB colour image into HSV (hue/saturation/value) colourspace values. When viewed as greyscale, the hue images fail to convey an important aspect that show up very clearly in the gradient-mapped version: that values which are close to the "maximum" (360 degrees, or 2 pi radians, depending on how you're counting) are also close to the "minimum" (0 degrees/radians). This appears up as a confusing and visually unpleasant discontinuity in the greyscale images, but a smooth transition in the gradient-mapped versions.
Finally, here is some genuine thermal imagery courtesy of OnEarth - this is a heat map of Big Bend National Park from space.