So your new Pi NoIR has plopped through the letterbox, and you’ve unpacked it. There’s a little square of blue gel in there. What’s it for?

Thanks to Andrew Back for the picture! Click to read more about his adventures with Pi NoIR on the Designspark blog.

If you’ve been reading our posts about why we developed an infrared camera board keenly, you’ll have noticed that we mentioned a lot of interest from botanists, who use infrared photography to work on the health of trees. We started to read up about the work, found it absolutely fascinating, and thought you’d like to get in on it too.

A short biology lesson follows.

Photosynthesis involves chlorophyll absorbing light and using the energy to drive a charge separation process which ultimately (via a vast range of hacked together bits and pieces – if you believe in intelligent design, you won’t after you’ve read the Wikipedia page on chlorophyll) generates oxygen and carbohydrate. Here’s a nice picture of the absorption spectrum of two sorts of chlorophyll, swiped from Wikipedia:

Notice that both kinds of chlorophyll absorb blue and red light, but not green or infrared.

So: why are trees green? The graph above shows you that it’s because green is what’s left once the chlorophyll has grabbed all the long wavelength (red) and short wavelength (blue) light.

Let’s say you’re a biologist, and you want to measure how much photosynthesis is going on. One way to do this would be to look for greenness, but it turns out an even better method is to look for infrared and not blue – this is what the filter lets us do. Bright areas in a picture filtered like this mean that lots of photosynthesis is happening in those spots.

There’s a long history of doing this stuff from space (the Landsat vehicles, for example, look at the Earth across a very broad spectrum), and Public Lab have done loads of research as part of their Infragram project (and associated Kickstarter) to find ways of modifying cameras, and to find cheap alternatives to expensive optical bandgap filters. Our friend Roscolux #2007 Storaro Blue (that’s the blue thing’s full name) turns out to be a great example – we buy it on giant reels and the guys at the factory in Wales where we make the Raspberry Pi and both kinds of camera board cut it up into little squares for you to use. It’s not very expensive at all for us to provide you with a little square of blue, and it adds a lot of extra functionality to the camera that we hope you’ll enjoy playing with.

The work of the folk at Public Lab has been absolutely vital in helping us understand all this, and we’re very grateful to them for their work on finding suitable filters at low prices, and especially on image processing. We strongly recommend that you visit Public Lab’s Infragram to process your own images. We’re talking to Public Lab at the moment about working together on developing some educational activities around Pi NoIR. We’ll let you know what we come up with right here.

We sent Matthew Lippincott from Public Lab an early Pi NoIR (and a blue thing), and he sent it up on a quadcopter to take some shots of the tree canopy, which he’s processed using Infragram, to show you what’s possible.

Click to visit a Flickr set with many more Pi NoIR + Infragram images.

We still have some to do in getting images taken with the filter absolutely perfect (notably in white balance calibration), but we hope that what you can do with the filter already gives you a feel for the potential of an infrared camera. In a way, it’s a shame we’re launching this in the autumn: there’s less photosynthesising going on out there that there might be. But you’ll still get some really interesting results if you go outside today and start snapping.

Well, you do realize that the “Cali” in “California” means “warm” in Español, correcto? We may be fat, dumb, and lazy out here, but we know enough to come in from the cold by avoiding it altogether! :lol: Our condolences to our friends elsewhere in the hemisphere tilting away from the Sun at the moment, although anyone South of about 35 ~ 40 degrees North latitude should be able to provide plenty of active foliage-growth shots with the Pi NoIR, too.

If it’s that frickin cool then why don’t humans have it? Then we could all just walk round in the sun getting energied up and no one in Africa etc would starve.

And why have goddamn mantis shrimp got better eyes than us?! It makes me crazy to see those rubbish little decapods running around seeing way into the spectrum with 3D vision even from one eye when we have to make do with some delicate flabby sac of floater-filled fluid, blind spot, no night vision, half of the population wearing spectacles, poor peripheral vision, laughable acuity, inefficient receptors etc etc. Any engineer coming up with that ‘intelligent design’ when asked to design some visual apparatus would be sacked. And laughed at.

One of my photographic interests is taking infrared pictures of trees and general landscapes. In the early 2000s I used a Minolta Dimage 5 digital camera with an Ilford SFX200 filter to capture near-infrared images, and got pictures similar to those above. The Minolta was good for shooting evaluation images before committing relatively expensive frames of 120 film.

Thinking about this a bit more – one of the colour blindness problems I have whilst gardening is working out which plants are healthy and which plants are unhealthy. I can spot which ones are dehydrated, and those which are withered, but I’m told by others that colour-sighted people can tell signs of ill plant health by the colour of the leaves. Apparently colour-sighted gardeners can then either remove the ill plants, or give them extra water, nutrients and specialised foods to help them along.

If the NoIR + filter enables me to detect high vs. low photosynthesis, would this enable me to tell healthy vs. unhealthy plants? Can the images be converted into monochrome, or even subject to numerical analysis, in order to provide that information to me without use of colour?

They actually look a lot like monochrome (only with some more blues in the picture than you find with b/w). The areas which would appear green (healthy leaves) appear varying shades of grey/white: the brighter the white, the greener the leaves. When a plant is sick, the green leaves often start to turn colour towards red or yellow before withering. I can imagine that yes, it might help you detect which of your plants are healthy, especially if you use numerical analysis.

We were talking about your colour-blindness in the office when I was preparing this post, actually; and commiserating. I would not like to live in a world without green.

I already wrote a pixel-analysis routine in Python as part of a camera motion detector, so I might try re-using that code (and posting it up somewhere for others to play with).

My world isn’t entirely without green – I can tell Crayola crayons apart, if I take them outside in bright sunlight. However my world IS entirely without pink and purple, which many people assure me is no bad thing.

Rainbows are lovely, they have a beautiful binary simplicity; one wide yellow stripe, one wide blue stripe, and that’s it.

Autumn also has a binary simplicity; leaves are on, leaves are off.

A full-colour world must be very distracting. I’m amazed you lot ever get anything done.

The odd thing about the picture above (to my near-typical vision) is that is is extremely monochrome. Each individual tree is made up of one uniform shade, and a lot brighter than the background, whereas in a normal image I’d expect to see more of a mixture of both colours and shades over the plant. A closer look shows there are very few branches visible in the gaps – we’re only looking at the leaves and any algae, after all. I think that’s why it reminds me of an electronmicrograph – probably one from an STM, where we only see the outer surfaces of the subject.

To your second question, in my experience sick leaves almost always turn either yellow or brown, indicating a loss of chlorophyll, so that’s a yes. You could see the same effect by looking at the green channel – or better still, comparing the green and red channels – in a normal RGB image.

The Pi NoIR has the same color sensor as the Pi camera, so it makes a color image using the YUV color model. I don’t know what kind of color filter array it uses (Bayer or other), but I assume each pixel on the sensor is covered with a colored filter, and that there are three different colors, like RGB. With the Infrared block filter removed, each pixel still captures some red, green, or blue light as usual, but also captures some near infrared (NIR) light. So the photos look a little strange. If you put an infrared filter over the lens, like a Wratten 87 which blocks all visible light, each channel will capture only near infrared light. Viewed as a monochrome image, this would have information about plant health because healthy leaves reflect almost all near infrared light, and dead leaves or non-plants usually don’t. So the brightest pixels are likely to be healthy plants.

If you put the little blue filter (Rosco) over the lens (or behind it), then you can learn even more about plant health. The Rosco filter blocks most red light but passes the blue end of the spectrum and also near infrared light. The blue channel will now capture visible blue light as usual (plus some infrared) but there is no red light for the red channel to capture so it captures mostly near infrared light. Using these two channels you can compare the amount of blue and infrared light that is reflected from plants and other surfaces.

For 40 years, remote sensing scientists have used the difference between near infrared and visible light to create the Normalized Difference Vegetation Index (NDVI). This index uses reflected infrared light as a proxy for the amount of incoming sunlight, and uses reflected red (or blue) as an indication of how much visible light has been absorbed by the surface. Healthy plants absorb lots of blue and red light to power photosynthesis, so they show a big difference between infrared and visible. By doing math with the DNs in the blue and red (NIR) channels you can compute NDVI as NDVI=(NIR-blue)/(NIR+blue). The values will be between -1 and +1, with healthy plants between 0.2 and 0.8. The higher the NDVI value, the more photosynthesis is probably happening. I works pretty well, but each camera is different, and we have barely started to test the Pi NoIR.

The NDVI results can be greatly improved if a custom white balance can be done on the camera. So that feature is highly anticipated. There is some , and more information about .

As far a I know, it’s the identical sensor to the standard Raspberry Pi camera, but with the IR filter element removed. This is basically an official version of the delicate please-do-not-try-this-at-home conversion of the existing camera to remove the IR filter.

Just reading our local newspaper with an article about a local lad’s success.
If you can search the results of that event for yourself, his name is Brett Roy.

He’s just returned from the International Chocolate Awards held in London on the 20th October with two Silver Medals.
One was in the “Flavoured Dark Ganaches and Truffles” division with his entry of Raspberry Noir

Oh dear*furrows brow*! Looks like another trip to the RPI store is in order. The problem is that I know “exactly” what I can do with that here in the South of France! Mmm technology, science, nature, eco-friendliness, all in one tasty package.
PS Where can you buy an on-board biologist? (re : Comment 6)

I might be interpreting this incorrectly. But is it saying that the NoIR camera is infrared enabled solely by that piece of blue and has nothing to do with the camera itself, which is same as other green standard Pi cameras?