# Red vs. blue filters for NDVI

by nedhorning |

While working on calibration techniques to improve the quality of DIY NDVI images I noticed that after calibrating the blue and near-infrared (NIR) bands from InfraBlue photos there was not as much difference between green grass and non-photosynthetic material like leaves, dead grass, wood and cardboard as I would have expected. To understand why this was happening I looked at the reflectance spectra for different materials and noticed that when using blue wavelengths instead of red the contrast in NDVI between photosynthetic and non-photosynthetic material is greatly reduced. In remote sensing contrast is very important to improve photo interpretation and classification. This discovery was a little perplexing since some of the InfraBlue images I had seen in the past year seemed to produce half-decent NDVI images. It also got me thinking that perhaps blue filters were not ideal for making NDVI images.

To better understand the differences between NDVI images produced using blue and red filters I purchased a 3” x 3” sheet of Wratten 25A from eBay and cut a small rectangle which was inserted in a Canon A2200. I decided to compare images acquired using this red filter with images acquired using Chris Fastie's Canon A810 with a blue Rosco 2008 filter. The initial results using photos acquired with Chris Fastie's help are posted below.

Transmission curve for Wratten 25A filter (copied from: http://astronomy.activeboard.com/forum.spark?aBID=58381&p=3&topicID=49503185)

To start with, here is a table showing the difference in NDVI values one would expect when using a blue and red filter. The NDVI values in the table were calculated using reflectance data from different online spectral libraries - more about that in a forthcoming research note. For the “Blue” NDVI I used 450 nm (blue) and 840 nm (NIR) wavevlengths and for the “Red” NDVI I used 660 nm (red) and 840 nm (NIR). The typical formula for NDVI is: NDVI = (NIR – Red) / (NIR + Red). For “Blue” NDVI calculations I substituted blue reflectance for red.

Material Blue NDVI (840/450) Red NDVI (840/660)
pine board 0.59 0.08
Cardboard 0.65 0.24
Tar paper 0.12 0.05
Green grass 0.85 0.82

Table of NDVI values using the blue (450 nm) and the red (660 nm) wavelengths

As you can see the NDVI value for green grass is very similar regardless if blue or red reflectance was used. On the other hand, there are significant differences for the other materials. When I create NDVI images by first calibrating individual bands to reflectance and then calculating NDVI the results support the observation that contrast between photosynthetic and non-photosynthetic material is reduced with the blue filter.

All of the blue filter images below were recorded with a Canon A810 with a blue Rosco 2008 filter mounted over the lens using a custom white balance set using blue origami paper in the shade. All of the red filter images were recorded with a Canon A2200 with a red Wratten 25A filter mounted inside the camera over the sensor – in place of the hot mirror. The custom white balance for the “red” camera was a concrete block in the sun. The lookup table displays NDVI values less than or equal to 0 as black and NDVI values of 1 as white. The patch of grass on the upper right corner of the tar paper was cut two days before the photos were taken. Apparently that freshly cut grass has high NDVI values.

Photo from the red filter camera

Photo from the blue filter camera

Calibrating individual bands to reflectance before calculating NDVI for the red filter photo

Calibrating individual bands to reflectance before calculating NDVI for the blue filter photo

My interpretation is that NDVI from the red filter camera is significantly better at differentiating photosynthetic from non-photosynthetic material. There is greater contrast in the NDVI image created with the red filter photo. You will note that in the red filter NDVI image many of the pixels have higher NDVI values than one would expect (saturated at 1). I expect that is due to the way I selected sample pixels for the regression. I selected pixels from a large rectangular patch of grass at the top-center of the photo and correlated the average pixel value from that patch with the green grass reference NDVI value. I am fairly certain that the average NDVI value for the patch of grass I selected was significantly lower than the “ideal” reference grass.

Normally I would have been tempted to stop there and conclude that the blue filter is a poor choice for monitoring vegetation health but over the last year or so I had seen some pretty convincing NDVI images created using InfraBlue cameras so I explored a little further. The next two images are NDVI create using the Fiji photo-monitoring plugin. The one used the bands without stretching and the other applied the default stretch using a saturation value of 2.

NDVI created by using the Fiji plugin with no stretch for the blue Rosco 2008 filter

NDVI created by using the Fiji plugin with a stretch (saturation = 2) for the blue Rosco 2008 filter

These uncalibrated images look better. Why is that? This question still needs some work but my initial guess is that even though the blue band is not as sensitive to changes in vegetation vigor/health as the red band the white balance setting Chris uses when he's shooting with a blue filter helps amplify those differences. Calibrating the images to reflectance before calculating NDVI reduces the impact of the white balance "enhancement" thereby lowering NDVI contrast for the reasons noted above.

Based on these results I think red filters need some serious consideration as a replacement for blue filters for the production of NDVI images. In addition to the advantage of increased contrast between photosynthetic and non-photosynthetic material red wavelengths are less effected by haze which can be important for kite or balloon photography. The red filter is also more similar to the red band that is used to calculate NDVI from satellite and multi-spectral aerial photos which should make comparisons easier and more reliable. This needs more testing but these initial results are encouraging.

In the next few days I'll try to post a research note to more clearly explain why red wavelengths are better suited than blue for recording differences in photosynthetic activity.

Wow, this is an exciting development. I had wondered about using red instead of blue, but your results are compelling. I also wonder if this would enable us to use cheaper cameras which had not been working for infrablue conversions...

Interesting work. Thanks Ned.

One drawback of using the red filter is that the red part of the bayer filter passes more NIR than the blue or green parts. I'm looking into ways to reduce that effect but the problem seems a bit more complex than I first expected. Just another challenge, not a show stopper.

Dear Ned et al.,

I am pretty new to all this and on my way to convert my camera for NDVI mapping. After reading this post I am little confused: blue or red? Even though the NDVI values you present are highly correlated (r = 0.75) and thus should produce similar maps if calibrated/streched there is some non-linearity between the NDVI values of the blue and red filters (the pine board is either between dead grass and card board or between tar paper and dead grass). Hence, I am wondering if a dual-camera NIR setup with a blue filter for one camera and red filter for the other as well as some fancy LUTs and/or equations would result in even better NDVI estimates?

Regards, Thorsten

Hi Thorsten, Sorry for the confusion. Some of the non-linearity between the response of the red and blue filter should be explained in the post I did on Friday: http://publiclab.org/notes/nedhorning/11-01-2013/why-a-red-filter-should-work-well-for-ndvi

With the red filter there is a bigger difference between green grass and dead grass when compared with a blue filter. If it's still not clear just ask again I'll see if I can do a better job explaining the difference.

If your application can accommodate a dual camera system that will almost certainly produce better results but it comes with the drawback of being a little more cumbersome and you need to deal with parallax. With a dual-camera setup you will have 4 data points on a spectral curve (R,G,B,NIR) instead of two and you also eliminate the problem of NIR light leaking into the visible bands. And, you also get a normal color photo which can be useful.

Ned, thanks! Confusion is good in most cases! :-)

I think I'll give it a try and report.

For such a setup do you propose the filters you used (blue Rosco 2008 and red Wratten 25A) or a specif combination of other blue and red filters?

If you use a dual-camera setup I suggest using an unmodified camera and a NIR-pass (visible cutoff) filter for the other camera. Some people use unexposed developed film for the NIR filter and that seems to work pretty well. It leaks a little visible light but I don't think it's too bad. If you search the research notes here you'll find some about dual-camera setups.

Ned, The NDVI image made from the Rosco 2008 photo by stretching the histograms is surprisingly similar to your calibrated NDVI image from the red filter photo. The two images have just about the same amount of information about plant vs non-plant. This is good news for all the people starting to use a Rosco blue filter, because it is a lot easier to stretch the histograms than to include a calibration target in your photos and then compute regression equations. What is the main message to people making decisions about what filter material and workflow to use? What do you really gain by using a red filter? What are the real advantages of making calibrated NDVI images? Is it possible for a typical user to reduce the considerable obstacles to making calibrated NDVI images?

Chris, So many questions... I think more testing is necessary but I'll take a shot at answering each question. I'd like to hear what other folks think.

What is the main message to people making decisions about what filter material: At this point I am pretty convinced that a red filter is superior to a blue filter if your intent is to monitor vegetation health. It appears to be more sensitive to changes plant productivity. A blue filter will still work but if you have a choice I think you're better off with a red filter.

and workflow to use? The workflow depends on the goal. If you just want to see changes in an image then doing custom stretches is probably easiest. If you want to compare your results with other measurements then some sort of calibration protocol would be helpful.

What do you really gain by using a red filter? The primary gain with regard to monitoring vegetation health/productivity is that a red filter will be more sensitive to changes across a photo and over time. On top of that is the improved clarity due to less scattering of red light and using a red band is the defacto standard for calculating NDVI so it's easier / more accurate to compare with other NDVI products.

What are the real advantages of making calibrated NDVI images? Calibration has the advantage of producing a product that should more accurately represent physical measurements. If we calibrate each band the measurement is reflectance and if we calibrate to NDVI then the measurement is NDVI. Manually stretching histograms can also produce good results but the output will be more subjective.

Is it possible for a typical user to reduce the considerable obstacles to making calibrated NDVI images? I think it's up to us (the atypical users) to figure out a way to reduce the obstacles. Calibration of most instruments is a bit of a bother but only because it requires a few extra steps. The calibration seems confusing now because we're still experimenting but my goal is to have a protocol that is easy to follow. I might be posting more details than I should. Hopefully by Spring we'll have something easy to use.

Hi Thorsten,

Glad to hear you're making progress. When you run the plugin are you specifying that the channel from the visible image to use for the red band is "red" and the channel from the IR image to use for the IR band is "blue"? You can use other channels for the IR image but I think most people use the blue band. You can try others channels and see what works best for you. If you are using these settings make sure you are not mixing up the visible and NIR images.

Thanks for letting me know about the missing xmpcore.jar file. I posted it to the GitHub site so it should be there now. If you need to you should be able to get the zip file from here:http://code.google.com/p/metadata-extractor/downloads/list

I am thinking of getting a modified DSLR for NDVI imaging and am having trouble deciding between two different options - camera with Schott BG3 filter replacing the stock IR filter - camera with filter removed and using lens filters

The second option seems much more flexible as it would be easy to change filters and adjust the spectral range, however, I am sure there is some good optics reason why a lens filter may be inferior to a sensor filter, maybe to do with focusing?

I don't have experience with lens mounted filters but you might get some feedback if you post your question on the plots-infrared list at http://publiclab.org/wiki/mailing-lists.

I had no problems with using lens filters so far. But it would be interesting if there is some reason to better replace the IR Filter instead.

Ned,

Our company is supposed to be writing an article for Vision System Design magazine regarding uses for dual band filters. I realize that the red filter is not a dual band filter, but none-the-less would like to possibly include subject matter that you address here and put it in the article. I do not feel particularly qualified to write about this subject. We have time constraints as well. Would you possibly be interested in contributing to this portion of the article as an author and photographer as well? If the asnswer is "maybe" and you would like to discuss it, I can be reached at 847-359-3550 x103. Thanks in advance for giving this some consideration... Barry Warzak

Hi Sorry for the trouble but how did you proceed to calibrate individual bands to reflectance before calculating NDVI? Did you use "dark object subtraction"? I can calibrate to reflection satellite images but I don't know how to do it in photographs from my modified canon with a r25A filter. Thanks for the trouble, and any advice possible. Best regards, Rita

Hi Ned thanks for your research! Is great this information. i have two doubts. First if i use a red filter how should be the formula (blue - red) / (blue+red) ? Because i'm not shure but in the red chanel we have red +nir data?? And the second doubt is wich software you are using to calculate the indexs? Regards Agustín

Hi Agustin,

The formula you wrote is what I use. I typically use the PhotoMonitoring plugin which can be found here: https://github.com/nedhorning/PhotoMonitoringPlugin but you can also use the Infragram web site:http://infragram.org/. The Infragram web site would be an easy way to test subtracting blue from red before calculating NDVI.

When I am creating NDVI form JPEG images I typically do not compensate for the NIR energy recorded by the red detectors but when I calibrate the images I do. For calibration I subtract some of the blue band (e.g. 80%) from the red band before calculating NDVI. The PhotoMonitoring plugin doesn't have this capability yet but I plan to add functionality to the plugin for calibrating before calculating NDVI and that will have an option to subtract some or all of the blue band from the red band. I have a research note in the works that explains my plan and I hope to post that in the next few days. Good luck. Ned

Could something like this (blue- (red-blue)) /(blue-(red-blue)) ?? To extract the nir data in the red chanel. Regards.

Sorry is should be (blue- (red-blue)) /(blue+(red-blue)) ?? To extract the nir data in the red chanel. Regards.

Hi Agustin - Your second equation is one option. Another is: (blue- (red-blue0.8)) /(blue+(red-blue0.8))

You can play around with the factor I added (0.8 in the example). Using a factor greater than one might make sense if the red filter is a broad band filter that includes red through the NIR. This red correction approach works better when working with raw images and in some cases it might not work well with JPEG depending on the white balance you use but it's worth playing around with it.

It looks like the computed index will no longer be between -1 and +1 if you adjust the red value that way. Do you then have to rescale the index somehow?

Chris - Thanks for pointing that out. I typically clip the values so anything greater than 1 becomes 1 and anything less than -1 become -1.

Cfastie and Agustin If we try to change de index co-dominium? I mean 0 to 1. And the equation of NDVI index must be.. NDVI 1= (1/2)(NDVI+1) = (1/2){(NIR-R)/(NIR+R)+1}. So if we resolve this equation we must get.. NDVI 1=NIR/(NIR+R). If we remove the hot filter from the camera in the three channels we get the three colors plus the NIR. Then, the denominator index we obtain directly from the red channel and de NIR signal from de Green or blue channel directly. To obtain again the NDVI index we get again with (NDVI=2 NDVI 1-1), in order to arrange of the new index (-1<NDVI< 1) is just a easy way. Who agreed with me. Lo podemos discutir en español Agustin.

Dear Ned,

            Recently i have been going through your interesting works on Infragram NDVI and calibration. I was wondering if you had any published journals, which i could cite for my related works. I searched by your name in google scholar however, i didnt find any publications.