Example: Display an NAIP Four Band Image as Color Infrared (CIR)

This topic illustrates how to create Color Infrared CIR images using NAIP four band imagery.  In this example, we take a four band NAIP image that shows part of Redding, California, and we create a CIR display by re-assigning data channels to color outputs.  

 

The National Agriculture Imagery Program (NAIP) run by the US Department of Agriculture (USDA) acquires aerial imagery with a resolution of approximately one meter during the agricultural growing seasons in the continental United States. Although historically acquired as RGB imagery in visible spectra, beginning in 2007, various states began acquiring NAIP imagery as four band imagery, with Red, Green Blue and near-Infrared bands.   Starting in 2018 NAIP imagery was acquired with a resolution of 60 cm.  

 

Nomenclature:  Band and Channel are used as synonyms.  The USDA tends to uses band, while modern technical applications tend to use channel, but both are perfectly good words that in this context mean the same thing.  Manifold uses channel.   USDA numbers channels counting 1, 2, 3, 4.  Manifold uses the more technical approach (so the numbers stay the same when using SQL, writing scripts, using functions, etc.) of counting channels as 0, 1, 2, 3.   This documentation uses 0, 1, 2, 3.

 

Four band NAIP imagery uses the following channel order:

 

 

NAIP imagery is thus the classic RGB channel ordering (plus an extra channel) used in most natural color images, which usually are referred to as "RGB" images.   

 

A popular use of four band NAIP imagery is to create false color images that use the near-Infrared channel 3 for Red and which does not use the blue band.   Various combinations are possible, but the traditional combination used for what are called Color Infrared or CIR images uses these assignments:

 

 

The above arrangement uses Infrared wavelengths to drive the Red output, Red wavelengths to drive the Green output, and Green wavelengths to drive the Blue output.  The channel that records Blue wavelengths is not used.     

Re-Assign Channels

Changing channel assignments to those traditionally used for CIR is a matter of just a few clicks in the Style panel for images.   We download a four band NAIP from the US Government's free earthexplorer.usgs.gov web site.   The image we choose shows the Eastern parts of Redding, California, and is an approximately 450 MB file in .tif format.  It is 9410 x 12140 pixels in size, a tiny image for Manifold.

 

eg_cir_from_naip01_01.png

 

We import the image into Manifold and double-click it in the Project pane to open it, as seen above.  We launch the Style panel in the Contents pane.

 

eg_cir_from_naip01_05.png

 

Our task now is to assign channels using the traditional CIR arrangement:

 

 

 

We do that by double-clicking into each channel cell in turn and choosing the channel we want to assign to that color output.

 

eg_cir_from_naip01_06.png

 

We begin by double-clicking into the channel cell for the R output and choosing Channel 3.  

 

eg_cir_from_naip01_07.png

 

Next, we double-click into the channel cell for the G output and choose Channel 2.  

 

eg_cir_from_naip01_08.png

 

Finally, we double-click into the channel cell for the B output and choose Channel 1.  

 

eg_cir_from_naip01_09.png

 

That is the traditional CIR channel assignment we want.  We press Update Style to apply the changes.

 

eg_cir_from_naip01_10.png

 

Immediately, the image takes on the classic appearance of CIR images.  We can zoom in to get a more detailed look at areas with foliage.

 

eg_cir_from_naip01_11.png

 

Zoomed into a region to the left, middle of the bigger image, showing land just above the Sacramento River, we see a more classic, reddish, otherworldly CIR image.   The dark pixels at the bottom of the image are from the Sacramento River, the water of which radiates weakly in near-Infrared wavelengths in this scene.

 

eg_cir_from_naip01_12.png

 

For comparison, we can restore the natural color, RGB arrangement of channels with a single click on the dropdown menu for the Assign Channels button.

Notes

Why the traditional CIR arrangement?   It results in an image that matches the reddish, false color look of photographic images obtained using Kodak color Infrared film. Kodak's CIR film was developed during WWII to record near Infrared, red, and green channels instead of the usual red, green and blue channels.  During the war, Kodak's film was used to distinguish camouflage from real plant cover, since in near Infrared camouflage has a different appearance than real foliage.

 

In modern times, digital sensors acquire red, green, blue, and near-Infrared bands to record a four band image.  When the bands are combined in a GIS package to use red, green and blue bands the result is a natural color RGB aerial photo.  When bands are combined to use near-Infrared, red and green, the result is a CIR image.   CIR imagery is used to monitor the health of crops or forests and to distinguish plant species. Near-Infrared also penetrates atmospheric haze better than visible light bands, so CIR images can be sharper than natural color RGB images.

 

Changing channel assignments vs changing channel order - Different image formats utilize different arrangements of channels within the actual image data.  Some have the red channel first, while other arrangements have the blue channel first.  No matter what channel ordering is used within the data, Manifold's Style panel allows us to specify how those channels should be assigned to red, green and blue display outputs.

 

Using the Style panel to say how data channels should be used does not  change the order of data channels within the actual image.   It simply reassigns how the data should be interpreted for display purposes.   If we want to change the actual order of data in the image, we should use the technique illustrated in the Example: Rearrange Channels using an Expression  topic.   In the examples below, we will use the Style panel to change the interpretation of data within the image, without actually changing the data itself.

 

See Also

Images

 

Images and Channels

 

Palette Images

 

Style

 

Style: Images

 

Style: Channels and Outputs Tutorial

 

Style: Autocontrast

 

Style: Palettes

 

Example: How Images use Tiles from Tables - An example showing how an image is made up from data stored in a table in tiles.

 

Example: Create Two Images From One Table - More than one image can show data from the same table, including from the same tile field.

 

Example: An Image using Computed Fields in a Table - How an image can be created from tiles where the data for the tiles is taken from a field that is computed on the fly.

 

Example: Change the Contrast of an Image - In this example we use the Style panel to change the contrast of an image.

 

Example: Using the Assign Channels Button - The Assign Channels button in the Style panel for images allows us to assign channels to the standard three Red, Green, and Blue display outputs using frequently-desired arrangements.   The button provides a short cut way to assign all channels at once instead of doing each channel individually.

 

Example: Assign Channels - How to use the Style panel for images to assign channels to display outputs such as R, G, B or A.  This topic shows examples of channel combinations and the visual results.

 

Example: Set Image Transparency using Alpha - The A row in the Style panel allows us to specify what transparency we want to apply to the image, either by applying the same value for A for all pixels or by using one of the other channels to also control the A value.

 

Example: Autocontrast and Hill Shading Images using Style - This example shows how the Edit - Style panel can hill shade an image using the values of pixels as heights and generating shadows as if the Sun were located at the specified azimuth and altitude.   This capability is used most frequently with raster images to give an impression of three dimensionality in cases where the values of pixels represent terrain elevations.

 

Example: Style Applied to an Image Server Image - Because the Style panel simply changes the way an image is displayed and not the data, it can operate on read-only data served by various web servers such as WMS REST servers.    In this example we look at every detail of creating a data source using an image server and then manipulating the appearance of the display with Style.  We will connect to a WMS server that provides LiDAR data in various forms, including as terrain elevation.

 

SQL Example: Create NDVI Displays - How to create a query that creates an NDVI display from a four-band NAIP image, with tips and tricks on how to copy and paste existing information to get the result we want.

 

Example: Rearrange Channels using an Expression - We use a simple expression in the Transform panel to rearrange the order of channels within the data.