Public Lab Research note


Possible problem with DIY Infragram camera or infrapix

by ceefoster | September 19, 2013 17:11 19 Sep 17:11 | #9347 | #9347

I've been working with an Infragram camera that was made following the instructions on the website, and originally it appeared to work fine. However, I've noticed that in recent photos some of the buildings are colored like they living.

I attached the image that I'm getting on the infrapix web app. The building is appearing in the green, which seems to be incorrect, but the sky and road are blue. There is hardly any differentiation among all of the plants.

I also looked at the blue and red channel images that are generated, and the red channel correctly appears brighter than the blue channel, so I would say that the camera is functioning as it should.

Is the camera functioning as it should? Why is the building green? Why is there little differentiation? I've also been using the ImageJ plugin and the colors seem skewed there as well.

I can post more photos if needed.

Thanks in advance for any help.


12 Comments

That is a good looking image. You are correct that this image paints everything with a narrow range of colors, which means that most of the NDVI values for different surfaces are similar (between -0.2 and +0.2). There a few possible reasons for this.

  • Some cameras do a better job than others. What camera are you using?
  • White balance can make a big difference. Does your camera allow custom white balance presets? Was this done?
  • The lighting for the scene can make a difference. Was it sunny, cloudy, bright, dim?

In general, troubleshooting Infrablue results is more productive if lots of information is available. Check our this note for guidelines.

Also, you can drag a few photos into the note, like the original infragram, or add a link to the Infragram.org page with your results.

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

Reply to this comment...


Thanks! I'm using a Canon PowerShot A490. I'm not sure about the custom white balance presets, but I can ask the person who worked on the camera. The camera has the Rosco #2007 filter.

It was sunny outside, but I was around some shade from trees. The only post-processing completed was reducing the image size.

Here's the link to my results of the image I posted: http://infrapix.pvos.org/show/figs_faraway_small.jpg

I also tested a closeup image: http://infrapix.pvos.org/show/figs_closeup_small.jpg

Reply to this comment...


Okay. I think the A490 allows custom white balance. It will make a big difference to follow the procedure here and make your own custom white balance preset. Then take your Infragrams with that preset selected. That pinky purple infragram will be replaced with orangey yellow ones. Let us know if you get better NDVI results.

Reply to this comment...


Thanks. I'm looking into that now. Can I do this if the camera has already been hacked to take Infragrams? Do I need to take off the Rosco filter? Once I get through those questions, do you have a recommendation of something blue to point it at?

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

Reply to this comment...


That's a good question. I updated the wiki page to make it clear that the white balance procedure should be done on an Infragram camera with the blue filter in place. Many different blue surfaces will work. The color of the light when you do the white balance is also important. If it is sunny and blue outside when you do it, put your blue surface under a blue sky and shade it from direct sunlight. If there is no blue sky, try it anyway. Then take some photos of plants. If foliage is orangey yellow, you are good to go.

Reply to this comment...


Thanks! I'm definitely headed in the right direction -- I have more variation than before. However, I'd like to double check that my white balance seems accurate. I'm still getting green colors on the building, but even in the example river.jpg image provided, the sky is marked partially green (http://infrapix.pvos.org/show/river.jpg).

These are three sample images I took and uploaded to infrapix:

  1. http://infrapix.pvos.org/show/IMG_0074.JPG
  2. http://infrapix.pvos.org/show/IMG_0075.JPG
  3. http://infrapix.pvos.org/show/IMG_0073.JPG

Reply to this comment...


Actually, based on your comment here: http://publiclab.org/notes/warren/08-15-2013/white-balancing-a-canon-camera-for-infragram-photography -- I think my plants need to be a little more orange.

Are there instructions on how to reset the white balance once I've already set it, or do I just point it at another piece of blue paper? Thanks again.

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

Reply to this comment...


Your results are really good now. I agree that they would probably improve if the images straight from the camera were a little more orangey. To achieve that, repeat the custom white balance procedure with a different blue surface or under different light. The sky is a different color every day, and sometimes every hour, so repeating a "blue sky without direct sun" white balance with the same blue surface can give different results every time you do it. Experiments with other procedures are welcome. Try just pointing the camera at a blue sky during white balance. Results of this will vary for people in the desert and people in a rain forest. Maybe try putting some Rosco filter over a light bulb and illuminating some blue paper with blue light. Or point the camera at Rosco filter in front of a lamp. Or use a blue LED. Then you don't need good weather. You can see immediately whether it worked by looking at plants through the camera. Let us know if you find a procedure that works for you.

Even the best white balance for a particular camera and particular filter will not produce perfect NDVI results. The goal is three-fold: 1) NDVI values for healthy plants in the range 0.1 to 0.9, ideally near the middle of that range, 2) NDVI results for foliage with a range of values, so differences in plant health can be discerned, and 3) NDVI values below 0.1 for non-foliage surfaces. There will always be non-foliage surfaces that mimic the NIR/VIS ratio of foliage, so there will always be artifacts in NDVI images. This is especially true with very bright or very dark areas of the scene.

Reply to this comment...


OK, thanks for the tips. I adjusted the white balance so the images are more orangey. However, now the blue channel image generated does not look like a normal black and white photo. It's darker and grainier. The red channel looks correct because it's unnaturally bright, although it might also be a bit grainy. I would think that near infrared light has "leaked", as is mentioned on the description, but I didn't have this problem until I adjusted the white balance, and it's not the result that describes the leakage. Is there anything you know of that might cause this? Thanks. Here are my results I'm talking about: http://infrapix.pvos.org/show/schoolpath.jpg

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

Reply to this comment...


Wow, you must have used something really blue to white balance. Please let us know how you did that. The Infragram is definitely orange. It looks like it is too orange. The NDVI values for plants are mostly greater than 0.7. So for this kind of scene you have to find a setting that produces Infragrams that are a little less orange. Unfortunately, there is no way to dial it back, you have to start over with a new custom white balance. That's why it would be nice to find a way to do the white balance with artificial light so it is repeatable regardless of weather. It would be fun to try a blue LED and an NIR LED illuminating the same white surface. Then the relative contribution of blue and NIR could be adjusted until the NDVI results are acceptable. If this worked it would tell us a lot about what white balance is doing.

The white balance setting should not influence how much NIR is leaking into the blue channel. That will be more or less constant and determined by the color filter array in front of the sensor. I am not sure why the blue channel is getting that posterized look. Your result is a great example of how an orange Infragram photo has a very dark blue channel and light red channel. The very red NDVI image indicates that each pixel has an NIR:blue ratio of about 9 (NDVI=0.8). The mean ratio for plants should be closer to 3 (NDVI = 0.5).

Reply to this comment...


I pointed the camera at a very dark sky-blue sky, standing in the shade. It was a completely clear day, and I got the very orangey images as a result.

I redid the white balance, this time using a standard blue bag outside in the early evening. The sun was still up and I took the photo in shade. My results are better, with blue, green, yellow, and red showing.

http://infrapix.pvos.org/show/IMG_0108.jpg

Would you mind taking a look to give me your opinion? I'm trying to get it accurate enough to show how it can be used for a demonstration. Thanks.

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

Reply to this comment...


Great to know a blue sky can produce a white balance setting with so much separation of the blue and red (NIR) channels. there is at least one other example of this from California where the sun can be really deep blue. This is a handy way to do the white balance when the sky is just the right color (not as blue as when you did it earlier).

Your current setting looks like a good compromise. The NDVI of the tree leaves is right where it should be. The tree trunks are conspicuous anomalies. They should have very low NDVI values, but because they are so dark (both blue and NIR values are very low) the computed NDVI values can turn out to be just about anything. That setting could produce meaningful NDVI values for scenes of plants under even lighting. Of course the exact NDVI values will depend on both the plants and the quality of the light hitting them. Your current setting should produce good discrimination between foliage and non-foliage when both are similarly illuminated and similar in brightness.

Reply to this comment...


Login to comment.