(877) 949 - 1684
Free Shipping On
Orders Over $100

Calibrating Images in Fiji (ImageJ) with MAPIR Plugin [LEGACY]

The Normalized Difference Vegetation Index (NDVI) is exactly what it stands for: a vegetative index that can be computed from multi-spectral imagery to help assess vegetative health. When a camera captures the amount of reflected visible light and reflected near-infrared (NIR) light you can process those images to come up with a NDVI "value", which ranges from -1 to 1. Plants reflect and absorb visible and NIR energy but they reflect less energy in the visible spectrum than the NIR spectrum. As they become less productive due to stress or senescence the NIR reflectance decreases rapidly.

Vegetation will have a positive NDVI value typically around 0.5, with values lower than 0.5 being less healthy and values larger than 0.5 being more healthy. Healthiness is based on the vegetation's ability to reflect the NIR light which corresponds to vigorous photosynthesis activity. NDVI values close to 0 will typically be bare soil and highly reflective non-vegetation like bodies of water. Man-made materials like concrete, asphalt, plastics, etc will typically have a negative value.

Our Survey2 Red+NIR NDVI camera saves the Visible (Red) Light to the sensor's red channel and the near infrared (NIR) light to the blue channel as a corresponding RGB pixel value. These pixel values range from 0 to 255 in the JPEG images and must be calibrated to a 0 to 1 value after the gamma correction is removed. Ideally though you should use the converted TIFF images from the Survey2 cameras's RAW mode for the best results.

Using the MAPIR Reflectance Calibration Ground Target Package we can calibrate the pixel values of the images captured with the camera to the lab measured reflectance targets. If you do not have the ground target package we provide a calibration file we've created that will calibrate the pixels close to their normalized value, but for the most accurate results we recommend capturing a photo of the ground target prior to each survey. For full instructions on how to use the ground target please see this page.

Examples and the calibration procedure using the provided calibration file is documented below:

The Color Gradient and Associated Lut

Keeping the above mentioned NDVI value ranges in mind, here are the gradients we will be using:

MAPIR_Survey2_ndvi_0-1 (Download: LUT, Full Resolution Key)

MAPIR_Survey2_ndvi_0-1_CB [For Colorblind Viewers] (Download: LUT, Full Resolution Key)

For the Survey1 cameras, here are the associated download links:

MAPIR_Survey1_ndvi_0-1 (Download: LUT, Full Resolution Key)
MAPIR_Survey1_ndvi_0-1_CB (Download: LUT, Full Resolution Key)

We've already explained what the values relate to, but what about the colors? This range of colors is from a lookup table, or more commonly shortened to simply a "lut". When we calibrate the RGB pixel values to the 0 to 1 range, we're essentially changing them from 0 (black) to 1 (white). All the values between 0 and 1 would be a gray-scale gradient from black to white. We then use a lut to convert those gray-scale pixel values to a color that makes it easier to see the contrast between different levels of vegetative health. If the idea of luts is confusing, please consider watching this cute video using cats.

Here is an example:

Original Survey2 NDVI stitched image of a field:

Calibrated NDVI index image with Black (0) to White (1) lut applied:

MAPIR_Survey2_ndvi_0-1 lut applied:

MAPIR_Survey2_ndvi_0-1_CB lut applied:

When you look at the above images, here are a few good things to keep in mind when using our luts:

  • Healthy vegetation shows up as a shade of green, with the darker the shade the healthier it is.
  • As you go lower in NDVI value, and go from the yellow to orange, to red colors (or to purples if using the color-blind lut) the vegetation will be getting less healthy.
  • Pure white to red is right around the border of no vegetation and bare soil, so just assume little to no plants are there.
  • The gray-scale areas will be bodies of water, roads, buildings and other non-vegetation
  • Any dark blue areas will typically be areas of shaded vegetation which is difficult to assess the health (a reason it's ideal to capture images when the sun is highest in the sky if possible to reduce shadows)

Do you see the lut key in the top right corner of each of the colored images? Including the key on every image you post publicly or show a customer is very important(!). Without the lut key a person viewing the image has no idea what the colors mean, though they may be able to infer what they are. Since these images are calibrated it also means that you can use the same lut on each and every survey you do and provide your customer with visual examples of changes that the survey area may experience over time.

Here are some more examples using the MAPIR_Survey1_ndvi_0-1 lut:

Now that we've explained how the final results look, let's go through the procedure of calibration with Fiji:

Calibrating NDVI MAPIR Images in Fiji With Photomonitoring Plugin:

We will be using Fiji to calibrate and apply the lut, so you'll need to stitch the survey images elsewhere, outputting the final image as a JPG, PNG or TIFF. Please find the Fiji (ImageJ) package download links HERE, selecting the version that best matches your computer's OS. It is recommended you do not put the extracted Fiji.app folder into your Program Files directory, but instead somewhere like your Documents folder.

The calibration files are already included in the MAPIR Fiji packages, but here they are for reference:

Survey2 NDVI Camera (JPG) Calibration File

Survey1 NDVI Camera (JPG) Calibration File

Open Fiji by double-clicking the ImageJ exe file in the Fiji.app folder. When the windows pop-up please DO NOT UPGRADE the program and close all of the windows besides the main "(Fiji is Just) ImageJ" one. If Fiji asks you to upgrade in the future please DO NOT unless this page on our site specifically says you can. This is to insure compatibility with the plugin and Fiji.

To begin calibration, go to Plugins>MAPIR>Apply Calibration coefficients to Directory:

Make the changes in the window that pops up according to the following photo and click OK:

Browse to the calibration file in the Fiji.app Calibration folder, click on it and click the "Open" button:

The next window will ask you where the images to calibrate are located so find your photos and select that:

The next window asks where to save the log file to, which should default to within the folder you just selected. Click the "Save" button.

The calibration will then take place and the selected lut will be applied. Windows will pop up briefly during the process and then close when done. The higher the resolution of the photo the longer the process will take. When the calibration is complete an Exception box will pop up which you can ignore and simply close.

Locate the converted photo(s) in the folder you told the plugin to calibrate. Use the above lut key images and the photo editing program of choice to add the key to your image so your viewers understand what the colors in the NDVI image represent.

Any questions please feel free to Contact Us.