Home > Photography > Calculated Greyscale Images
Calculated Greyscale Images
article by Ben Lincoln
With the raw data of the image cube as the starting point, it becomes possible to mathematically derive additional greyscale images which illuminate the relationships between them.
Mathematical Relationships
Because our eyes perceive (mostly) the intensity of three spectral bands, it seems natural to begin by treating other spectral bands the same way. But it can also be useful to generate images which instead represent, for example, the difference in intensity between two (or more) bands, or the ratio of one to another.
In this group of images, notice that several of the difference variations make it extremely obvious where there is variation across spectral bands near the centers of the flowers:
Calculating the ratio instead of the difference can produce a similar, but much more pronounced effect:
Whichever of the two is preferable depends greatly on the subject matter and intent of the person processing the imagery.
A technique commonly used in the satellite mapping/remote-sensing community is to calculate the "normalized difference" between two bands[1]. The basic formula is in the form ND(a, b) = (a-b)/(a+b). For example, the normalized difference of 7 and 19 is (7 - 19)/(7 + 19), which is equal to -6/13, or about -0.46. In most instances that I've seen, zero is treated as a threshold, with negative values being discarded. If you are using The Mirror's Surface Breaks, it can generate both positive and negative values. When dealing with greyscale images, it is easiest to create a separate image for negative versus positive, because there is no intuitively visible way to indicate to the viewer where exactly zero lies in a greyscale image. There is a solution to this dilemma, which is discussed in the article Gradient-Mapped False Colour Images.
Here are a few examples of positive and negative normalized differences in OnEarth imagery of Grand Canyon National Park.
You can see that the negative values are generally washed out and not particularly useful, but some of them (such as the IR1/Blue variation) do provide some high-contrast views of the course of the river.
Vegetation Indices
The normalized difference formula is the basis for a whole branch of the satellite imagery field in which the amount/health of local vegetation (or other aspects of the terrain) is calculated from orbit. The original method is called the "normalized difference vegetation index" (NDVI), and is calculated simply by using the near-infrared image as the "a" variable and the red image as the "b" variable in the normalized different formula (so that NDVI = (NIR-Red)/(NIR+Red)). There are quite a few variations on this theme that have been developed over the years. They range from simple modifications (such as using the green image instead of red, yielding the "green normalized difference vegetation index" (GNDVI)), to the complex (for example, the "Global Environmental Monitoring Index" (GEMI) and "Angular Vegetation Index" (AVI)).
A lengthy list of these indices and their formulae is located at the end of this article. Here are a few examples based on OnEarth imagery of Yellowstone National Park:
The same basic concept is also used to help detect other characteristics of the environment, such as distinguishing between water and land, or determining approximately how much sediment is present in a body of water.
This type of calculation can also be performed against multispectral imagery obtained with a camera on Earth, but it is very important to keep in mind that the technique was developed for satellite data, and the results may be wrong or misleading when applied to images captured in another way. For example, satellite imagery typically does not have to take into account shadows being cast on objects, or clouds moving in-between exposures. Satellites capture images of very wide areas, as opposed to individual plants. Some of the indices even depend on factors like the angle between the source of light and the sensor. Did you remember to measure that when you were out taking pictures?
That having been said, like so many other things, sometimes the results are quite striking, and as long as a pretty picture is the end goal (as opposed to obtaining reliable, scientific data), there's no reason not to do it. Here are a few examples from Big Bend National Park:
...and a phalaenopsis orchid:
Vegetation Index Technical Background
The Mirror's Surface Breaks includes configuration files with numerous vegetation index and other satellite imagery-type calculated variations defined. For those who are interested, here is a list of the various functions and where I obtained the formula for each:
Abbreviations:
- MIR = "Mid Infrared" (non-specific as to subsection)
- NIR = "Near Infrared" (non-specific as to subsection)
- TMn = "LandSat Band n" ("TM" stands for "Thematic Mapper"), where "n" is one of:
- 1 = Blue (450nm - 515nm, peak = 482nm)
- 2 = Green (525nm - 605nm, peak = 565nm)
- 3 = Red (630nm - 690nm, peak = 660nm)
- 4 = Near Infrared (750nm - 900nm, peak = 825nm)
- 5 = Mid Infrared (1500nm - 1750nm, peak = 1625nm)
- 6 = Thermal Infrared (10400nm - 12500nm, peak = 11450nm)
- 7 = Mid Infrared (2090nm - 2350nm, peak = 2220nm)
- P = "Panchromatic" (520nm - 900nm, peak = 710nm)
From Landsat Image Processing, James S. Aber, 2009:
- Ratio Vegetation Index (RVI): NIR / Red
- Normalized Difference Vegetation Index (NDVI): (NIR - Red) / (NIR + Red)
- Green Normalized Difference Vegetation Index (GNDVI): (NIR - Green) / (NIR + Green)
- Ratio Drought Index (RDI): MIR / NIR
- Specific Leaf Area Vegetation Index (SLAVI): NIR / (Red + MIR)
- Normalized Burn Ratio (NBR): (NIR - TM7) / (NIR + TM7)
(note: covered in more detail in FIREMON BR Cheat Sheet V4, June 2004)
- TM 1/2 - Rocks and soils (TM12)[2]: Blue / Green
- TM 1/4 - Rocks and soils (TM14)[2]: Blue / NIR
- TM 3/4 - Rocks and soils (TM34)[2]: Red / NIR
- TM 1/2 - Sediment suspended in water, and iron-oxide content in rocks (TM12)[2]: Blue / Green
- TM 2/1 - Sediment suspended in water, and iron-oxide content in rocks (TM21)[2]: Green / Blue
- TM 3/1 - Vegetation and water bodies (TM31)[2]: Red / Blue
- TM 3/2 - Vegetation and water bodies (TM32)[2]: Red / Green
- TM 4/1 - Vegetation and water bodies (TM41)[2]: NIR / Blue
- TM 4/2 - Vegetation and water bodies (TM42)[2]: NIR / Green
From Above-Ground Biomass Estimation of Successional and Mature Forests Using TM Images in the Amazon Basin, Dengsheng Lu, Paul Mausel, Eduardo Brondizio, and Emilio Moran, 2002:
- Atmospherically Resistant Vegetation Index (ARVI): (NIR - (2 * Red) + Blue) / (NIR + (2 * Red) + Blue)
- Atmospheric and Soil Vegetation Index (ASVI): NIR + 0.5 - (0.5 * (Sqrt(((2 * NIR + 1)^2) - 8 * (NIR - (2 * Red) + Blue)))
- Global Environmental Monitoring Index (GEMI): Xi * (1 - (Xi * 0.25)) - ((red - 0.125) / (1 - red))
Where Xi = ((nir^2 - red^2) * 2 + (nir * 1.5) + (red * 0.5) ) / (nir + red + 0.5)
- Modified Soil-Adjusted Vegetation Index (MSAVI): NIR + 0.5 - (0.5 * ((2 * NIR + 1)^2 - 8 * (NIR - (2 * Red)))
- TM 5/3 (TM53): TM5 / Red
- TM 5/7 (TM57): TM5 / TM7
- ND32: (Red - Green) / (Red + Green)
- ND53: (TM5 - Red) / (TM5 + Red)
- ND54: (TM5 - NIR) / (TM5 + NIR)
- ND57: (TM5 - TM7) / (TM5 + TM7)
- KT1[3]: (0.304 * Blue) + (0.279 * Green) + (0.474 * Red) + (0.559 * NIR) + (0.508 * TM5) + (0.186 * TM7)
- KT2[3]: (-0.285 * Blue) - (0.244 * Green) - (0.544 * Red) + (0.704 * NIR) + (0.084 * TM5) - (0.18 * TM7)
- KT3[3]: (0.151 * Blue) + (0.197 * Green) + (0.328 * Red) + (0.341 * NIR) - (0.711 * TM5) - (0.457 * TM7)
From Vegetation Detection for Mobile Robot Navigation, David M. Bradley, Scott M. Thayer, Anthony Stentz, and Peter Rander, 2004:
- Modified Soil-Adjusted Vegetation Index 2 (MSAVI2): (2 * (NIR + 1) - sqrt((2 * NIR + 1)^2 - 8 * (NIR - Red))) / 2
From Bilko Mini-Lesson 8: Vegetation Indices:
- Angular Vegetation Index (AVI): arctan(((mwNIR - mwRed)/mwRed) * (1 / NIR - Red)) + arctan(((mwRed - mwGreen)/mwRed) * (1 / Green - Red)) (where mwNIR, mwRed, and mwGreen are the mid-band wavelengths for the red, green and blue spectral bands).
Note that the definition included in the TMSB configuration files uses values of 825, 660, and 565, respectively, although the function I wrote for DaVinci's Shadow allows the user to specify different values if they wish.
From Band Combinations, James W. Quinn, 2001:
- TM 2/3 - Croplands versus barren lands (TM23): Green / Red
- TM 4/5 - Vegetation and water bodies (TM45): NIR / TM5
- TM 5/4 - Vegetation and water bodies (TM54): TM5 / NIR
- TM 3/5 - Urban and barren/rocky areas versus vegetation and water bodies (TM35): Red / TM5
- TM 7/2 - Forests versus croplands (TM72): TM7 / Green
Nonstandard formulae that I added myself for experimental purposes:
- Visible Maximum NDVI (VisMaxNDVI): (NIR - VMax) / (NIR + VMax), where VMax is the maximum (on a per-pixel basis) of Red, Green, and Blue.
- Visible Minimum NDVI (VisMinNDVI): (NIR - VMin) / (NIR + VMin), where VMin is the minimum (on a per-pixel basis) of Red, Green, and Blue.
- Red/Green Maximum NDVI (RGMaxNDVI): (NIR - RGMax) / (NIR + RGMax), where RGMax is the maximum (on a per-pixel basis) of Red and Green.
- Red/Green Minimum NDVI (RGMinNDVI): (NIR - RGMin) / (NIR + RGMin), where RGMin is the minimum (on a per-pixel basis) of Red and Green.
- Blue NDVI (BNDVI): (NIR - Blue) / (NIR + Blue). This was added to test the validity behind the concept of LDP LLC's "vegetation stress" modified DSLR, which - for reasons unknown - uses blue light instead of red or green.
Related Articles:
A Detailed Introduction
Basic Greyscale Images
Statistical Greyscale Images
Three-Channel False Colour
Gradient-Mapped False Colour Images
Luminance/Colour Images
Decorrelation Stretch Images
False Colour From Filters (and Simulated Filters)