# Mobius NDVI

by cfastie | | 8,072 views | 29 comments | 26 Apr 14:33

Above: It should be pretty easy for a DIY NDVI image to differentiate between things in this scene that are green plants and things that are not.

In my quest to get good NDVI images from an Infragram-modified Mobius ActionCam, I previously found white balance settings that produced photos with color histograms like the ones for good Infragrams taken by Infragram-modified Powershots. I used the program mSetup on Windows to install the white balance settings on the Mobius via USB (Mac and Android solutions are also on that page). Yesterday I took a series of test photos to see if those white balance settings produced useful photos.

I took photos of the test scene in the topmost image with these five cameras. The four PowerShots have internal filters and the Mobius has no internal IR filter but has a holder for filters in front of the lens. All cameras have plates for easy attachment to a Manfroto tripod.
.
The dual camera system with an unmodified A495 and a pure near-infrared A495 generally produce the best DIY NDVI images I have seen. So that result is presented below as the benchmark. Ned's Fiji plugin was used to align the two photos and compute NRG and NDVI values for each pixel after stretching both histograms (parameter=2). This stretch parameter, and the same color table, were used on all of the NDVI images below, and no other adjustments were made on any of the photos or NDVI images.
.

Photos from an unmodified A495 (top left), a pure NIR A495 with Wratten 87 filter (top right), and a false color infrared image (NRG) and Normalized Difference Vegetation Index image (NDVI) derived from those two photos. Green plants are well differentiated from non-plants in the NDVI image. This is a high resolution image, right click to enlarge in new tab.
.
The Infragram-modified PowerShot A2200 with Wratten 25A filter produced an NDVI image that differentiated plant and non-plant about as well as the dual camera system. This camera was white balanced on red origami paper in full sun, and was used in the calibration of the white balance settings for the Mobius.
.

Super-red Infragram photo from a Canon A2200 and the NDVI image derived from that single photo.
.
The Infragram-modified PowerShot A2200 with glass BG3 filter also produced an NDVI image very similar to the one from the dual camera system. This camera was white balanced on blue origami paper under blue sky in the shade, and was used in the calibration of the white balance settings for the Mobius. The BG3 filter is similar to the Rosco 2007 filter.
.

Infrablue Infragram photo from a Canon A2200 and the NDVI image derived from that single photo.
.
The Mobius camera with Wratten 25A filter produced an NDVI image that differentiated plant and non-plant about as well as the Powershot Infragram cameras. The white balance setting for the Mobius was the one determined empirically by comparison with histograms of the PowerShot Infragrams. This setting is: red 310, green 500, blue 700.
.

Infrablue photo from the Mobius ActionCam with Wratten 25a filter and the NDVI image derived from that single photo. The Mobius has a a much wider lens than the PowerShots, so these images are cropped for comparison.
.

The Mobius camera with Rosco 2007 filter produced an NDVI image that was quite meaningless. The white balance setting for the Mobius was the one determined empirically by comparison with histograms of the PowerShot Infragrams. This setting is: red 690, green 500, blue 240. The NDVI image sort of differentiates between plant and non-plant, but NDVI values are consistently higher for non-plants than for plants, which seems to be a serious flaw. I don't yet understand what's happening here, but the process of determining white balance settings that worked for the red filter gave very different results for the blue filter.
.

Infrablue photo from the Mobius ActionCam with Rosco 2007 filter and the NDVI image derived from that single photo. The Mobius has a a much wider lens than the PowerShots, so these images are cropped for comparison.
.

I tried several combinations of white balance settings and also tried a Wratten 47B filter (not shown), but did not find a combination that produced useful NDVI images. I also have not come up with a hypothesis to explain the failure of a blue filter to produce usable NDVI information when a red filter works very well.
.

NDVI images with different white balance settings in the Rosco 2007 Mobius ActionCam. NDVI values for non-plants are generally higher than for plants. The lower right image has this pattern somewhat reversed and is the best version I have produced.
.
It might be possible to find settings that produce somewhat better results with a blue filter. But a red filter seems to work well, and there are other important reasons to use a red filter instead of blue. So the next task is to find a red filter that is less expensive than antique Kodak Wratten 25A gelatin (Rosco Fire, please).
.

A screen capture from mSetup. These are the Mobius settings I used with the Wratten 25A filter.

Help out by offering feedback! Browse other activities for "multispectral-imaging"

### People who did this (0)

None yet. Be the first to post one!

Chris, re the Mobius Rosco2007 image, some comments and questions. By "meaningless" do you mean that the pine board looks so much like the living plant matter, or that the dead stuff is so positive and the living stuff much less so? One comment, the red channel in that image is about 20% overexposed, mostly on the green growing stuff, but also on the pine board. Might that contribute to them looking the same? (wish I could put an image of the overexposed pixels here, but it can be had at [this link] (https://drive.google.com/file/d/0BzsIfcPtBojNVlpfN0x1V1dtMFE/edit?usp=sharing)

Second, assuming you take NDVI=(NIR-VIS)/(NIR+VIS), which channel do you use as NIR and which as VIS? It looks from some earlier posts that the Mobius blue band is pretty NIR sensitive.

Finally do you have raw versions of these images that I could look at?

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

Tom,
Yes, meaningless was not the best word choice. The real surprise was that the non-plants consistently had NDVI values higher than plants. That's kind of a deal breaker. The red channel in that Mobius 2007 infrablue photo is definitely the brightest. That is the channel that should contain the highest proportion of NIR (the 2007 filter blocks most red). And you are correct, many pixels in that particular photo have the value 255 in the red channel. The blue channel is also badly underexposed and has lots of pixels with the value 0. For infrablue photos, NDVI uses red for NIR and blue for VIS, so NDVI computes to 1 for many pixels (255-0)/(255+0). So that's why that photo fails for NDVI.

I tried lots of other white balance settings and got much better exposures, including one that actually had higher NDVI for plants. So some better NDVI results are probably attainable using that 2007 filter.

I don't really know if the blue channel in the Mobius is unduly sensitive to NIR. I guess we need some RAW images of LEDs to know for sure.
.

This photo produces the best NDVI of the 45 Mobius infrablue photos I made that day.
.
Pro tip: to insert an image into a comment, start to write a new research note, drag an image into it, and copy the code into the comment. Then close the new research note tab.
.
Chris

Indeed, that last Mobius with a 2007 did not work well for me either. What were the lighting conditions? I tried to stretch the histogram a bit, but still no good results:

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

Jeff, all of the photos that day were in bright sunshine under cloudless sky. You can see the afternoon progress in the four panel NDVI for Mobius 2007 as the shadow of the tripod and my arm swing into the white cedar branches. It has to be possible to find a slightly better white balance setting for blue filters, but it might be more important to see how Rosco Fire filters, (or other red Roscos) work. Maybe Mathew can send me some.

Well, I guess that pretty much settles it on the red. I went out flying with only the blue on friday, and haven't processed the results yet. I was having trouble with the custom white balance-- Mobius's setup software doesn't seem to work on the Mac.

Shouldn't it be possible to copy the text config file from Chris's mobius and post it here so Mathew can use it?

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

I've been manually editing the config file-- the only thing I can't figure out is how to turn on the custom white balance.

That nice windows program for Mobius is not official, just written by the isoprop guy. I guess nobody has done it yet for the Mac.

Here is the config file for using "Custom 3" white balance settings (the seventh one in the list of white balance choices):

CLF_SYSCFG.TXT

Thanks Chris!

I initially found this site while searching for automatic insect recognition because I'm interested in the potential for robots to help us by shooting pests with lasers. I'm super new to all of this but I've been reading for a few hours and after seeing these two posts http://publiclab.org/notes/cfastie/10-11-2013/oaktober http://publiclab.org/notes/cfastie/11-27-2013/cryptogams as well as this one I am left wondering if one camera systems can give meaningful NDVI data. It seems to me that if the system can't detect a difference between a brown or red leaf and a green one then we aren't getting the kind of info that we want from NDVI. The Wratten25A almost gets it but like on the cryptogram page the fern and the brown leaves have about the same value. Maybe a different formula would have to be used like where R=NIR+Red, G=XNIR, and B=YNIR, where X and Y are coefficients that correspond to how much the G and B sensors pick up the NIR so that NIR=(G/X+B/Y)/2 then NDVI=((G/X+B/Y)-R)/(R) . Of course the white balance will change the values of X and Y. If you can get the B sensor (or G) to match the NIR picked up by the R sensor then you can simplify the equation to NDVI=(2B-R)/R. You could test this if you got a red filter and compared the R and B values for an IR source. Or maybe you could just set your white balance based on looking at an IR LED with all visible light filtered and set the white balance so R and B have the same pixel values for that source. Anyways I don't know if this makes sense or if it was helpful in any way. If I can make a request, personally, I'd like to see some close ups of sick leaves and also plants with insects on them. Keep up the amazing work!

Hi Kendrick90, You're right that single camera systems have their limitations. The Wratten 25A camera produces a very good NIR channel (blue) with little contamination by visible light, but the red channel has lots of NIR in it. Corrections could be made, but the result will never be as good as a two camera system. Even two camera systems make crude versions of satellite NDVI because the bands are so wide (130+ nm vs. 40 to 100 nm). I'm intrigued by the idea of subtracting some brightness from a channel to account for contamination, but I still haven't figured out how to do it.

Some of the limitations are with NDVI itself. For example, dead leaves still have pigments which absorb selectively and can mimic the signature of healthy leaves. NDVI is a crude index and can't be expected to distinguish all differences in plant health.

Ned Horning is working on a promising protocol to calibrate the NDVI from these systems, and I am working on a two camera system with narrower bands.

And here is a narrower band pure-NIR GIF of plasterer bees (Colletes sp.) on chickweed (Stellaria media). They are collecting pollen from tiny white flowers which are indistinguishable from the green leaves in this NIR band (ca. 850-1050 nm). These are native pollinators so please don't zap them with lasers.

@cfastie What should be the formula of NDVI for NIR camera as it is blocking red light.

With a blue filter which blocks only red light, the red channel will capture NIR. Use the red channel for NIR and the blue channel for visible light. NDVI is the difference between NIR and VIS divided by the sum of NIR and VIS, so (red-blue)/(red+blue).

With a blue filter which blocks only red light, the red channel will capture NIR. Use the red channel for NIR and the blue channel for visible light. NDVI is the difference between NIR and VIS divided by the sum of NIR and VIS, so (red-blue)/(red+blue).

@cfastie Thank you for your time. I have two more doubts in my mind, 1.) What are the steps that I need to apply for image calibration? 2.) What is the importance of image calibration?(I am using image of agriculture farm taken by drone for plant health analysis.)

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

Here is my discussion of calibrating NDVI images: https://publiclab.org/notes/cfastie/05-01-2016/calibration-cogitation

And Ned's most recent notes explain how his Photo Monitoring plugin works: https://publiclab.org/profile/nedhorning

@cfastie On an agriculture land, How can we specify the targets for calibration?

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

@cfastie sample image is like this,

Finding inexpensive, do-it-yourself calibration targets is an obstacle to NDVI calibration. You need targets for which the spectral reflectance is known for the wavelengths you capture and use for the NIR and VIS bands. Ideally these targets would have the SAME reflectance for ALL wavelengths, but that usually requires commercial targets like these: http://labsphere.com/labsphere-products-solutions/materials-coatings-2/coatings-materials/permaflect-1/

You can use common materials with published spectral response, but these don't have the same response for all wavelengths, so you have to know the exact wavelengths you are capturing. Below are some sources of spectral data for common materials:
http://speclab.cr.usgs.gov/spectral-lib.html, http://speclib.jpl.nasa.gov/ http://spectrallibrary.utep.edu/, http://www.frames.gov/partner-sites/assessing-burn-severity/spectral/

You can use a spectrometer to describe the response of any material as Ned did here:
https://publiclab.org/notes/nedhorning/05-01-2014/improved-diy-nir-camera-calibration

Some initial results using your white balance settings are impressive, however in this particular picture the roof of the house is showing high photosynthetic activity. The camera i have used is Mobius Modified Infrared Camera from Public Labs with red filter gel and wide angle lens , the photo was taken at a height of 150 feet. I think i should follow the procedure by Ned where he asked his friend to scan the spectroradiometer to create my own custom white balance. Do you think i need the targets of known spectral reflectivity in the same bands that will be used to compute NDVI or it can be tested with any materials as mentioned by Ned.

Also, do you have any idea how could i possibly validate my final end results of NDVI ? Do i need to take spectroradiometer measurements in the field as well to validate ? If you have validated it can you explain the process of validation.

Best Regards, Suman

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

Hi -- well, there may be methods like that; just to put in another idea, although you probably won't want to do it; Dorn Cox from Farm Hack has actually mowed, dried, and weighed biomass from different test plots to validate. There is some on this under the #ifarm tag, from a few years ago.

Do you think i need the targets of known spectral reflectivity in the same bands that will be used to compute NDVI or it can be tested with any materials as mentioned by Ned.

Any target will have reflectance (or none) at each wavelength. Ideally you would know the reflectance at each wavelength, including the band you will use to compute NDVI. If you measure the reflectance at higher and lower wavelengths, you could interpolate the values in between. The ideal target material will have the same reflectance at all wavelengths (a flat curve) so the same value can be used regardless of the band used to compute NDVI. But inexpensive target materials rarely have flat reflectance curves, so it is important to have a measurement in the band you will use for NDVI. If the reflectance curve for the target is not close to flat within the band you plan to use for NDVI, more than one measurement within that band might be important.

There are lots of types of validation, and different ways to validate. One way is to find recent satellite (e.g., Landsat) NDVI data for a big agricultural field near you and compare your results. Or you can measure the radiance (light energy) in the wavelength bands you use for NDVI and compare the resulting NDVI with your camera system. Or compare your results with a camera system or other NDVI system that has been calibrated.

Chris

Thanks for your response warren and Chris...I highly appreciate it..I was also interested to know about the vignetting effect and how public labs is accounting the vignetting correction in the mobius action camera?

I look forward to your response.

Best Regards, Suman

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

There are a few different approaches to this too, but one which definitely works is documented alongside an in-progress web-based approach, both under the tag #lens-distortion.

Thanks for your prompt response warren.....highly appreciable.... Cheers

Thanks for your prompt response warren.....highly appreciable.... Cheers

Dear Warren, I checked about the lens vignetting correction under the tag Lens-distortion as you mentioned. However, i didn't find anything related to lens vignetting. Can you please send the link of the specific page.

Best Regards,

Suman

Ah, i've just learned that I didn't know the definition of vignetting. But I do now -- apologies for mixing this up! I haven't heard anything about dealing with that, unfortunately. But if you do, please share!