Public Lab Research note


NDVI to Assess Forage Quality, Question.

by AFairbairn | March 12, 2016 20:57 12 Mar 20:57 | #12839 | #12839

Project:

Hello everyone, I am posting this because some may find it interesting and I need some assistance. I am working on a project using a modified DJI Phantom 3 Pro to get NDVI images in order to quantify changes in grazing vegetation quality over time and differences between sites. The imaging portion will be backed up with some other methods, including looking at carbon to nitrogen ratios using stable isotope analysis.

Testing to date:

So far I have only managed a few test flights and images. I am using Image J and the Photo Monitoring plugin to process my images. Here is one of my test images, I am not getting the resolution I need. I may have to change the height at which I am flying or camera settings. This will require more testing.

Color_Index.jpg

The image is a worn grass field used as a car park in the summer months. The grass is showing up a pretty even value and based on how worn it is I am assuming the grey is a good representation of where bare earth is. Now the evenness of the value may just be due to the characteristics of this particular field, but I am also hoping to see differences within the field itself. I may need to fly lower, currently the autopilot software I am using puts a floor on my flight at 40m. Or something in the camera settings may tease out a bit more detail. The lens is a PaeuProductions lens and the image is using the NDVI_VGYRM Lut.

Issues:

What I need to be able to do in order to compare images between sites and over time is a way to extract numerical values for the images. What would be ideal is to get a max NDVI value for an image and a mean. This may already be possible, however I cannot locate a plugin, piece of software etc. that would allow me to do this. If someone here has experience with this any assistance would be greatly appreciated.


16 Comments

It would be good to know something about the camera and filter you are using. Do you have a spectral curve for the filter? How is the camera white balanced? Are you doing any calibration?

I think by increased resolution you are referring to increased ability to distinguish different levels of plant health or vigor. Is that correct? If so, flying lower will not help. Some of the things that will allow more discrimination among levels of plant health include 1) taking more carefully exposed photos, 2) computing NDVI with NIR and VIS channels which are not cross contaminated, 3) stretching the histograms or calibrating the process, and 4) using a lut that assigns different colors within the narrow range of NDVI values you are interested in.

Fiji (ImageJ) has very powerful tools for doing the analyses you describe. When a new floating point NDVI image is created by the Photomonitoring plugin, hover the mouse over it to see the actual NDVI value of any pixel. Means and standard deviation for the entire image or a marqueed portion are reported in Fiji with Analyze/Histogram/Live. You can even make a 3D surface plot of the NDVI values in a field (Analyze/Surface Plot). Lots of fun.

Surface_Plotc.jpg
Stitched map

Without calibrating the process, it might not be possible to compare NDVI in a field over multiple days. Differences in light quality, exposure, sun angle, or auto white balance will influence the uncalibrated NDVI values. Time might not be the most conspicuous variable in a time series.

Chris
The KAPtery

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

Reply to this comment...


Chris,

Thank you for your comments. I realize I should have provided a bit more information. Unfortunately a multispectral imager was not in my budget for this project, I realize that would have been the ideal tool. Some of the decisions on equipment was also outside my control, therefore I have to work with what I have.

The camera is the standard 12mp 4k camera that comes with the DJI Phantom 3 Pro. However the lens has been swapped for a PeauProductions 4.35mm (no distortion) Blue + NIR NDVI lens. Any details beyond that I unfortunately do not have.

The white balance is set by me, to either cloudy or sunny, I forget which I used for the above photo, however when I actually start data collection it will be set across every image.

Calibration is something I wish to do, but am having a difficult time figuring out how to go about it. I have read up on the method described on Public Lab and what I do not understand is how I get the values for the .csv from whatever materials I am using, or the best materials to use for that matter. What I was considering is producing some panels and taking a photo and pulling the values from them and just a priori using that as a calibration method. Having exact values for NDVI for what I am doing is not as important as having consistent values. As said I need to be able to make comparisons between sites and over time.

I saw the floating point image I just was not sure what to do with it. I am very new to all of this, and especially FIji. It look like it should do what I need, I will have to play around with the tools some more. Thank you for pointing that out to me.

If you, or anyone else could, point me in the right direction when it comes to calibrating the process better it would be greatly appreciated. As said white balance will be set, I will have to look at the software, but I know I can set ISO, should be able to set shutter speed as well, aperture is fixed.

Thank you again for your response and suggestions. -Andrew

Reply to this comment...


PeauProductions has this filter here:

ndvi_blue_NIR.jpg

This must be a dichroic filter. The narrow bands could produce good results. We don't know how much cross contamination there will be because we don't know the sensitivity of the blue channel to NIR light, but it could be substantial. The red channel is probably not very sensitive to blue light in that narrow band, so the red channel should have a pretty pure NIR signal. The PeauProductions site seems to suggest that there is no "spectral cross-talk" between the bands, but that is false and depends completely on the camera (Bayer filters) being used.

Unfortunately the visible light it captures is blue, so it will do a poor job producing NDVI that distinguishes healthy from stressed (or dead) foliage. That should be added to my list above of things that will allow more discrimination among levels of plant health -- 5) use a red filter, not blue.

Do you know what shutter speed and ISO you were able to use with this filter? Not much light passes through this filter, so ISO might have to be high to allow a fast shutter speed. High ISO will produce noise in the photos, but that might not matter much for NDVI images.

I'm a little confused about something. NDVI for healthy foliage should be around 0.5, and that requires the NIR:VIS ratio to be about 3:1.

tuples1.JPG

Your filter passes equal amounts of NIR and blue light, and sunlight has a ratio of NIR:blue at those wavelengths of about 1:2.

solar-spectrum-from-www-mao-kiev-ua--sol_ukr--terskol--bmv_m.jpg

In order for NDVI values to compute to reasonable values, the red channel (which is capturing NIR) has to record values three times higher than the blue channel (which captures blue light). We don't know what the sensitivity of those channels is to the two bands of light they are capturing. Assuming they are equally sensitive, the light captured by the red channel (NIR) would have to be six times brighter than the light captured by the blue channel (blue). I guess healthy foliage reflects an order of magnitude more NIR than it does blue, so that works. A complicating factor is that the blue channel will be contaminated with NIR light and will be brighter than it should be. But it must work out to be close enough to produce NDVI that looks right.

This might be why some blue filters can provide direct computation to NDVI without custom white balance. When a red filter is used, the blue channel captures NIR and that channel is not as sensitive to NIR as the red channel is to red. Maybe I am less confused now.

I think you are right about a DIY approach to calibration. You might not need to know the exact proportion of incoming NIR and blue reflected from your targets. If you are close, and use the same targets and values in all your photos (or missions), you should be able to correct for the day to day (or hour to hour) variation in light quality and sun angle.

Your camera captures a rather pure NIR (800 nm) image in the red channel. You can use that to measure the relative NIR brightness of various target materials. A normal camera could be used to measure the relative blue brightness of the targets. It would help a lot to have some materials with known spectral reflectances, so check this out: http://biodiversityinformatics.amnh.org/interactives/spectralcurves.php.

Chris

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

Reply to this comment...


Ned listed some resources of spectral reflectance data of common things in this note: https://publiclab.org/notes/nedhorning/11-01-2013/why-a-red-filter-should-work-well-for-ndvi

Reply to this comment...


Chris, Thank you again for all the great information. I would assume the filter you found on PeauProductions website is the one in the lens I purchased from them. That would only make sense. When I shot the composite image above, camera settings were ISO 100, 1/320 shutter speed, 0 exposure comp, normal colour saturation and white balance set to cloudy.

As I understand from the information you provided, the camera should be pretty good at providing NDVI images. What I still need to find is materials for calibration. Tar paper, and pine are not necessarily ideal materials. I found this: http://www.mosaicmill.com/products/hardware/ndvi_tools.html while looking around and it appears to be just a white, middle grey and black panel. However they do not provide any real information. I am wondering if I could do something similar. It would be nice to find a material that reflected quite high in the 450nm range and one quite high in the 800nm range. As I understand it that would provide me with the best form of calibration. Although essentially anything would do, so long as I know the ndvi value of the material or not?

Aluminium has a pretty high reflectance of all wavelengths, I wonder if I could use it somehow? Making a panel out of aluminum foil would be quite easy and inexpensive. I may have to test this. I will continue to look further, and unless you can think of a reason I am oblivious to that foil is a silly idea, I will try and take some test shots.

Regards, -Andrew

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

Reply to this comment...


Jut did a really crude test, the image displays as it should, green in the cracks, green algae or whatever it is on the fence. The small panel in front of the planter box is the foil panel. It pretty much shows up black on the floating point image. When you mouse over it I get values from -0.0 to almost -0.2. I am not sure what this is telling me to be honest of if I can do anything meaningful with it. Foil.jpg I did notice that my lens had come loose and therefore the focus was off. I refocused it for this image, but I will need to get it just right and set it in place with some glue or something to prevent that from happening in the future. It could be a reason for the not so great images during my previous testing.

-Andrew

Reply to this comment...


ISO 100, 1/320 shutter speed

That is much better than I thought would be possible. I don't know how those skinny little bands provide enough light for that.

the camera should be pretty good at providing NDVI images.

If you accept the problems with using blue for visible light and the cross contamination.

MosaicMill doesn't tell us much, but commercial targets like that should have a flat reflectance curve. So a 50% target reflects 50% of all wavelengths (VIS and NIR). That makes it easy to know how much of the wavelengths that your particular camera captures are being reflected. DIY targets don't need that convenience. All you need for the Peau filter is a few targets with a known reflectance at 450 nm and/or 800 nm.

Theoretically, it would be good to have targets near 0% and 100% reflectance to establish the relationship between reflectance and what the camera captures. In reality, if the target reflects 100% of blue light, the target in your photo is going to be overexposed in the blue channel and you won't be able to calibrate at all. If it is not overexposed in the blue channel, the 0% target will be underexposed. So targets between 25% and 75% might be better. The calibration will not be as robust, but there will be a better chance of getting usable calibration photos on each mission.

Aluminum foil might be tricky material because it is shiny (in addition to reflecting too much). If sun glints off it in the photo, you will not collect useful information. Good commercial targets have matte surfaces and the reflectance percent does not change within a wide range of incident angles. DIY targets maybe won't be so easy to use, but aluminum foil might be asking for trouble.

The NDVI of the target does not have much meaning (at least to me). If you have a material that the internet says has a reflectance in the blue (450 nm) of 30% and in the NIR (800 nm) of 70%, then use those numbers in the csv file that the calibration routine reads. The more targets the better, especially to test the process. When you are convinced it is working, two points for each band (VIS, NIR) will give you an equation. Ideally that would be two targets, if you know the reflectance at both bands for both targets and they are all between about 25% and 75%. But using several targets is not much harder than using two and provides a better chance of having a full range of reflectance for each band.

If the reflectance numbers you use are wrong, then the NDVI values you compute will not be what a satellite would report. But if they are close, your results will be meaningful and you will still be able to compare between different fields or different days. Your NDVI values will never be comparable with legacy NDVI because you are using blue light mixed with NIR to represent visible light (instead of using pure red light).

Chris

Reply to this comment...


Chris,

You are probably correct about the foil being a poor material because of how shiny it is, had not really considered that. I came across this: http://www.azooptics.com/Article.aspx?ArticleID=415 as chalkboard paint should be easy to get, but what I do not understand from the first graph in that like is the scale goes to 250% reflectance. There is a poor explanation as to why this is. Is this a normal thing for reflectance measurements? If I can go by that information there do you think chalkboard paint would be good? Ca. 25% reflectance across the spectrum.

Thank you, Andrew

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

Reply to this comment...


That's a really relevant article. They scale the graphs relative to a standard, so 100% is actually 20% reflectance. That means 25% reflectance of chalkboard paint (at 90°) is really 5%, or at 45° is about 3%. That's what you would expect for matte black paint. So that might be a hard surface to get exposed well in a photograph. They don't name the brand of paint, so any old chalkboard paint could be different. However, a search in NASA's Aster Spectral Library suggests that most flat black paints have a similar flat response through the visible and NIR.

speclib_1458042747_2016_03_15_plt.png

Some gray paint might have a flat response, but every gray paint might not. Your targets don't have to have a flat response, you just have to know what the response is at the wavelengths of interest. If somebody with a spectrometer bought some flat gray exterior paint at Home Depot (or any ubiquitous brand) and characterized the response, then everybody could make their own targets. I guess a few shades of gray would be needed.

Reply to this comment...


Any place that sells paint has paint color chips, but these are too small to be useful as targets. But fancy paint stores have huge color samples. I got some 12" x 12" color chips when I was buying house paint at a California Paint store. Someone with a spectrometer (disguised as the owner of a gray house) could go to a California Paint store (is that a national brand?) and get a few gray samples to characterize. Then everybody could go to their local store (disguised as owners of gray houses) and get the same huge paint chips. Calibration targets galore.

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

Reply to this comment...


Good points. I am checking if my University has a spectrometer, I do not think my department does, however our geology people may have one. Waiting on an answer to that. If they do and I can get access to it, I will grab a load of samples from the local hardware store and check them out. However I am in the UK, so the brands may vary, they do carry Valspar here, is that not also available in the U.S.? They also have some Rustoleum paints, so maybe I should check them if this is an option?

-Andrew

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

Reply to this comment...


Yes I have seen Valspar in the US for many years, and Rustoleum is a big brand here. Maybe there is some international brand of art supplies that makes paper products. Although art supplies are maybe not as weatherproof as a board spray painted with Rustoleum.

Reply to this comment...


@AFairbairn - I spent quite some time searching for reliable and cheap target material for calibrations. I spoke with someone who scanned Rustoleum flat black and said it looked usable. I will try to get more details. I found a material called Komatex that is a PVC material with a matte finish. I finally had my turn to have it spectral scan at the university after an almost 3 month wait but the operator never showed up. I was drawn to this material because it is used by a white balance card manufacturer who states it is neutral throughout the spectrum. Its also cheap and easy to clean. I would recommend contacting Charlie Langlois at Labsphere- clanglois@labsphere.com They can make affordable($300 range)targets that are smaller 2X2" pieces that work great with same quality and accuracy as the targets that cost thousands. They still cost more than we like to see but is a good investment for some people.They have 94, 80, 50, 18, 10 , and 5 percent Permaflect targets. I have used the 94, 80, 50, and 5 percent targets so far and am very happy.

Labsphere targets

Closeup_RGB.jpg

Komatex

Komatex_colors.jpg

Reply to this comment...


Hi guys... Any success with the Phantom???

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

Reply to this comment...


Good evening @AFairbairn , I read with great interest your post because even I and my group are having the same difficulties to develop good NDVI images, especially comparable for different fields or different days. We therefore ran into problems finding the target for the radiometric calibration of the cameras (we purchased from PaeuProduction 2 Mapir cameras: RED and NIR). To be fair, thanks to the advice, the post, and the tutorial of @NedHorning and @CFastie we were able to use the PhotoMonitoring plugin with good success. I read in the @Claytonb comments of KOMATEX panels: @Claytonb You tell me more about this material and if you managed to use it as a target radiometric ?? @AFairbairn You managed to build a radiometric target economic and reliable ??

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

Reply to this comment...


@Gianni_Gadaleta - I never did get the chance to have the Komatex scanned so I haven't used it for target material. Becky Done with SABIC Polymershapes (rebecca.done@sabic.com) is a great contact for Komatex if you want to have some samples sent to you to test. I think it is very much worth pursuing. I have not pursued it further because I was able to get some affordable targets from Labsphere(http://labsphere.com/labsphere-products-solutions/materials-coatings-2/coatings-materials/permaflect-1/)

Reply to this comment...


Login to comment.