The NoIR Raspberry Pi camera comes with a blue filter to do near infrared photography – the blue filter ices the visible red but passes near IR which records as red, apparently.
NDVI (Normalized Difference Vegetation Index) is the near IR plus red divided by near IR minus red. Take a look at this image for the meaning of the colours – red, magenta and white is more photosynthesis, cool colours and black are less. Chlorophyll uses red but doesn’t use near IR which it reflects, hence the difference carries useful information.Lots more at Public Lab.
So I thought I might use this to look for plant health at The Oak Tree. My NoIR Rpi camera was out in the field so I was looking for a different way to do this using a regular camera to take two images. The blue filter starts off bad by throwing out the red channel, but in some of the older Public Lab stuff there is a way of integrating two photos- one a bog-standard RGB pic and the other a picture taken through an IR filter. I have a B&W IR filter that looks almost black so I shot pictures with the filter and without filter, both using a tripod, then used Ned Horning’s photo monitoring plugin for Fiji image processing to do the grunt work of matching the two images up.
The NRG image has its own charm and is reminiscent of IR film days – I think the IR is added to the red but I am not sure
The normal colour image is this
Exposure times through the IR filter are shockingly long, presumably because the camera IR stop filter is fighting what residual gets through. There is a case to be made for using a raspberry Pi or perhaps two to take simultaneous pictures, one with the NoIR and the IR filter and the other with the regular Pi camera.
Hi! Great work! Congrats 🙂 I have a small doubt. all those images with yellowish and pinkish images. Are they taken using the same raspberry pi camera? If you could reply ASAP it would be reaaaalllly great. Thanks 🙂
> Are they taken using the same raspberry pi camera
No, I used an Olympus E20 on a tripod, first to take a regular photo, then with the B&W IR only filter mentioned. I did have the idea of mounting two Pi cameras side by side, on normal, one noIR, and putting the B&W over the NoIR, but the parallax canned that idea. At the focal length of the Pi camera, you’d be too close to the plants to be able to register the pictures.
A Pi NoIR camera on a tripod would work better, but I’d need a separate IR cut filter for the front of the camera, and that B&W IR filter for the second IR only shot
Thanks a lot for the fast reply. okay. I get what you are saying. I’m currently involved in a project that needs to analyse soil using IR. Since we are using raspberry as the main controller, i thought i could make use of the rpi ir camera. But it doesn’t seem to give away much. Should i use some filters? Or should i use altogetherly a different cam? And can u suggest me an IR camera that is suitable for student project and could work with raspberry? Thanks a tonnn! 🙂
The key to a successful student project is to think about what you are trying to do and understand the principles 😉 You need to understand NDVI to use this. The key is in this
and the references are in the article.
> And can u suggest me an IR camera that is suitable for student project and could work with raspberry?
You can perfectly well use the Pi NoIR camera on a tripod and then do a similar thing as I did with the E20. As long as you choose a day which isn’t windy (otherwise the plants will move from one pic to the other) and you don’t have fast-varying cloud conditions which will cause overall light changes, take one picture as normal (which will have a little more IR than it should, unless you use a IR cut hot mirror extracted from another camera) and the other one through a IR pass only filter. As long as the difference is only a few seconds up to a minute the scene won’t have changed much between the two photos, and you can take a NDVI difference. You will have no parallax errors because the camera is in the same place.
Pi NoIR used to come with a square piece of blue theatrical gel which happens to pass IR but block the red. Shoot the picture without this and then again with, holding the filter over the lens. Then run the NDVI software which will take the difference between the red channel pic with IR and the red channel without. Alternatively use a real IR pass only filter, which is what I did with the E20, because I happened to have it already.
With the E20 I didn’t take out the internal camera body IR cut filter, so I was cutting everything but the IR with the B&W filter, and then taking a lot of attenuation due to the internal IR hot mirror filter inside the camera, which is why I was getting IR exposure times measured in tens of seconds. Using PiNoIR you will get short exposures with both filters and you can use a poorer performance IR pass filter, the square piece of gel if you got it with your NoIR camera.
Very interesting. Thanks for sharing!
I’m on my way to monitor my hydroponic tomato plants’ health with a RPi IR cut camera.
A few questions:
1. Did you take the images in a raw format? Which?
2. Do I need to normalize the DN values (of the different channels) before popping them in the NDVI formula? Such as converting them to reflectance.
3. Can I add a filter (like the blue gel one), that filters out the green reflectance, and instead captures the nir on the green channel (Red-Nir-Blue)? Or, there isn’t enough reflectance of nir in the green channel from the beginning?
Thanks again.
Yedidya
I think the infragram project explains how you use the blue filter better that I could 😉
I actually used a real IR filter that KOs the visible spectrum – it looked black to me. So the IR passes but visible doesn’t, then the E20’s IR filter filters most of the the wanted IR, exposure times were looong.
In that case the red channel contains the IR that leaked through the camera filter. I used tiff in the case of the E20
I was going to mount two Pi cameras side by side, one a noIR the other a normal, and then put the black IR filter in front of the noIR and trip the two simultaneously from the GPIO using a DPDT switch. But then other stuff got in the way.
The Pi with the blue filter seems the way to go now