Public Lab Research note


Photo Monitoring Plugin For NDVI using ImageJ

by mlamadrid , nedhorning | December 08, 2015 21:10 08 Dec 21:10 | #12489 | #12489

New calibration capabilities have been added to the ImageJ/FIJI photo monitoring plugin suite hosted on GitHub: [https://github.com/nedhorning/PhotoMonitoringPlugin (https://github.com/nedhorning/PhotoMonitoringPlugin). The calibration plugins can be used to improve the process of creating NDVI images from photographs acquired using single or dual-camera setups by converting image pixel values to reflectance values before calculating NDVI. This provides a more objective approach to calculating NDVI than adjusting parameters based on a visual assessment of the NDVI image and can result in more robust comparisons of NDVI over time. The plugin works best with RAW format images although there is a feature enabling processing of JPEG format images as well.

The calibration is a two-step process. The first plugin calculates calibration coefficients using at least two different calibration targets with known reflectance qualities that are imaged in a photograph. When the calibration coefficients are calculated a graph showing the relationship between input pixel values vs corrected pixels is output to the screen so you can assess quality of calibration. The graphs are only meaningful if more than 2 calibration targets are used. The second plugin applies the calibration coefficients calculated in the first step to a directory of images that were acquired under the same conditions as the image used to calculate the calibration coefficients and calculates NDVI images.

Another feature that was added to the calibration and other plugins in the suite is to add EXIF metadata to output images. This was done so people who have photos with GPS coordinates embedded in the EXIF data are able to keep those coordinates in the output images.

More information about the plugins can be found in the user guide that is available from the Github repository and by reading PLOTS research notes related to the photo monitoring plugin or calibration.

Image by Chris Fastie was created with Ned Horning’s new histogram stretching option and new color table for NDVI images.


4 Comments

Hi! Very exciting note! Thanks for sharing. Just wondering, could you expand a little more on "When the calibration coefficients are calculated a graph showing the relationship between input pixel values vs corrected pixels is output to the screen so you can assess quality of calibration. The graphs are only meaningful if more than 2 calibration targets are used" - or provide some links to where we can learn more about this?

Also, might you have specific links to "More information about the plugins can be found in the user guide that is available from the Github repository and by reading PLOTS research notes related to the photo monitoring plugin or calibration" that you could add?

Much appreciated!

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Hi Cindy - I'll start with the easy question first. The user guide can be downloaded from the plugin's GitHub repository: https://github.com/nedhorning/PhotoMonitoringPlugin. You can either click the "Download ZIP" button to download the whole repository or click the "downloads" directory then download just the "PhotoMonitoringPluginGuide.pdf" file.

The graphs that are produced from the calibration plugin plot the calibrated pixel values for reflectance targets in the photo vs. the actual reflectance of those targets and it calculates an R squared value for the fit. If you use only two points the R squared value will be 1 since the two points define a "perfect" line. If more than two points are used then the line through the points will be the "best fit" (from linear regression) and the R squared value will almost certainly be less than 1. By assessing how close the (more than two) points are to the straight line that goes through them you get a sense for how well the calibration is working. This is especially important when using JPEG images since those have a gamma correction applied which I try to remove in the plugin. I tried to discuss the gamma correction in this research note: https://publiclab.org/notes/nedhorning/05-01-2014/improved-diy-nir-camera-calibration. If a RAW format image is being calibrated there is no need for a gamma correction since the RAW pixels values are very nearly linearly correlated to radiance. That concept is discussed in this research note: https://publiclab.org/notes/nedhorning/06-23-2014/calibrating-raw-images-a-step-toward-jpeg-calibration.

If this isn't clear or if I didn't answer your question please let me know and I'll try again.

Reply to this comment...


Ned,

So the displayed graphs with two points are not meaningless (I found them to be helpful), but the R² values are not useful because they are always equal to 1.00.

With three or more data points, have you found any indication that the relationship is curvilinear? Would a curvilinear regression improve some calibrations? Would it help with the gamma problem?

Is this a question? Click here to post it to the Questions page.

Reply to this comment...


Chris - The relationships are curvilinear but my preference is to try and figure out how to "correct" the JPEG pixel values to create a linear relationship. I'm still not certain how effective that approach will be. I have tried fitting more than two points using polynomials (mostly 1st degree) and had some success but that approach would do best with four or more points.

Reply to this comment...


Login to comment.