A lot of people have been asking me how we post-process imagery coming from one of our, or any other company's, NGB converted cameras. There's a very easy way to run this processing thanks to Fiji and the Photo Monitoring plugin by Ned Horning. I've just written up a quick getting started guide to this software, pasted here for convenience. If you're coming across this post in the future, see this link for the most up to date version.

Images taken with modified NGB cameras need to be processed in order to display information about vegetation health. This process is very easy using Fiji and Ned Horning's Photomonitoring Plugin. First, grab a copy of these software packages - the easiest way to get a copy with the Photomonitoring Plugin is to download a pre-configured pack from Flight Riot, here (Look for the text "Click Here to Download FIJI/IMAGEJ with PHOTO MONITORING PLUGIN pre-configured" just below the third paragraph).


Install this version of Fiji then load the program and open an NGB image. The sample image used in this tutorial is downloadable by clicking here.

PluginOpen.jpg

Open the NDVI processing tool by clicking Single image NDVI from displayed image from the Photo Monitoring dropdown as shown above. Now the NDVI processing tool will open and display several options for how to process your image. Make the following changes to the default settings:

  1. Uncheck "Stretch the visible band before creating NDVI?"
  2. Uncheck "Stretch the NIR band before creating NDVI?"
  3. Change the output color table box to 'ndviClasses_-1_1.lut' as shown below


Variables.jpg

Now just click 'OK' and after a few seconds two images will load. One is the black and white raw NDVI values image and the other is the same image but with the selected lookup table applied. A lookup table (or LUT) simply takes the NDVI values from the first image and applies a color depending on the magnitude. This allows us to visualize the NDVI values more easily. This is just a way of visualizing the data though and does not change the data in any way, you can select other LUT files and experiment to see which display you prefer most. The default output results in the images below.

NDVI_BWLUT1.jpg

This is perfectly usable as it is, but I know this LUT is designed to display the highest values in green. The highest values in this image are only as high as values corresponding to yellow, which is about 0.5. In order to show more depth in the image, we can re-scale the LUT values from -1.0 to 0.5 so that we get the full range of colors across the full range of NDVI values in this image. To make this change, open the NDVI processing tool again and this time enter 0.5 into the box titled "Maximum NDVI value for scaling color NDVI image". Applying that change gives us the following images (note the black and white raw image hasn't changed at all):

NDVI_BWLUT2.jpg

In this version, we can see more levels of differentiation within the leaves, and even some different levels in the snow, likely caused by vignetting in the camera's lens. When making a mosaic, process the mosaic first before calculating the NDVI values as this gives the software a chance to promote image-center pixels over image-edge pixels (as most postprocessing software does). Aside from that, the NDVI image has lost a good deal of the detail that would have been used to match up overlapping images in the mosaic. Fiji can safely handle mosaics up to several dozen megabytes but above that it is less stable, even if you increase the maximum memory it allows itself.

Views: 993

Tags: Fiji, Monitoring, NDVI, NGB, Photo, Plugin, Post-Processing

Comment by ECODRONES on February 24, 2014 at 1:31pm

Amazing, Jeff.

Congrats and thanks!

Comment by Jim Pullen on February 24, 2014 at 1:47pm

This is really interesting stuff, thanks for posting.

Spent the weekend experimenting with this myself, sort of worked I think.

Comment by Michael Johnston on February 24, 2014 at 3:46pm

Good work Jeff and agree that FlightRiot is a beaut resource.

Comment by Ned Horning on February 24, 2014 at 5:33pm

Great to see a nice easy to follow illustrated guide. If folks are interested in the source code or most recent JAR file for the plugin they can be downloaded here: https://github.com/nedhorning/PhotoMonitoringPlugin. There is also another, less attractive, guide on the Github site. 

Comment by Noli Sicad on February 25, 2014 at 12:15am

Ned, it would be good if you can develop, NDVI python plugin in QGIS as well

Anyway, I know that you are using QGIS as well. There is quick tip how to create in NDVI from CIR mosaicked aerial photos? Anybody know how to this?

I can not open my CIR mosaicked and orthorectified file in ImageJ. The file is more than 1 Gb.

Comment by Noli Sicad on February 25, 2014 at 12:32am

Ned, what do think of this NDVI.py (below) ? Can this use to create NDVI python plugin for QGIS?

http://www.jeremymsmith.us/davidson/NDVI.py

Thanks, Noli

Comment by Noli Sicad on February 25, 2014 at 2:15am

This is the error of ImageJ when I am trying to open my file.

>>>>>>>>>>>>>>>>>>>>>>>>>>>
> <Out of memory>
> <All available memory (530MB) has been>
> <used. Instructions for making more>
> <available can be found in the "Memory" >
> <sections of the installation notes at>
> a href="http://imagej.nih.gov/ij/docs/install/>" target="_blank">http://imagej.nih.gov/ij/docs/install/>;
>>>>>>>>>>>>>>>>>>>>>>>>>>>

Comment by Ned Horning on February 25, 2014 at 7:10am

Hi Noli - Some day I might develop additional photo monitoring related plugins for QGIS but for the DIY NDVI work ImageJ/FIJI is more appropriate since the images are not georeferenced and the many tools developed for ImageJ work well for processing photos.

The NDVI python code you have will work if you have images that are calibrated to reflectance or radiance but for the DIY photos additional processing steps are helpful to improve the results.

To fix the error you are getting you should read the information on the page that the message suggests. You need to specify how much memory you want Java to use when you run ImageJ.

Comment by Henrique Ferreira Lima on February 25, 2014 at 10:54am

Will be of great value to me, thanks.

Comment by János Mészáros on February 27, 2014 at 12:13am

Noli Sicad,

There is a 'Processing' plugin in the QGIS 2.0 or newer versions (former SEXTANTE plugin), it worth to install because it integrates the tools of several other open source GIS software (GRASS, SAGA, Orfeo Toolbox etc. if installed on your notebook or PC) into QGIS framework. You can easily find functions for NDVI or other indices processing e.g. in Orfeo Toolbox.

An other way: in 'Raster' menu there is 'Raster calculator' where you can write your own expressions based on the bands of your imported raster files.

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2014   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service