Question: How to find the sweet spot for manual white balance settings using Pi NoIR and a blue filter with artificial (full spectrum) lighting

patalbright is asking a question about ndvi: Follow this topic

by patalbright | October 20, 2020 09:56 | #24774


Hi publiclab community :)

First off - thanks a lot for your great effort in bringing some light into these super interesting topics. I dug through a lot of articles, comments and questions on here but there is still one thing that I seem to miss or are not able to find (even tough there are a lot of posts regarding white balancing).

In my setting I use a Pi NoIR camera with a blue filter but in the end I guess this does not matter so much. I learned that a white balance setting can be done (e.g. with a DSLR) by pointing the camera at a specific sheet of paper and saving this WB setting for later pictures. However, by applying this tequnique one does not exactly know what the settings have been. Also they change from time to time due to changes in the lighting conditions. However, with the Pi camera - this is not possible because I need to adjust the AWB gains (blue, red) manually. Also my setup has static lighting conditions since it is within my apartment in a tent with artificial (full spectrum) lighting.

Now when it comes down to adjusting the settings - I am still not quite sure on what to focus most importantly.

a) Should all the colors within the picture look as natural as possible while having yellowish/orange looking plants? Would it help to add more reference cards in other colors (yellow, green)?

b) What should I look for when analyzing the color histogram of the pictures taken (without NDVI analysis / postprocessing)?

Example 1: Picture without processing looks very greenish. Blue can almost not be found on the color histogram. Lot of "noise" in the images after NDVI processing.

image description

Example 2: Picture looks blueish - Color histogram shows more balance on blue. Red shows a peak in low numbers. Still a lot of "noise" in the processed image (grey dots) but the infragram image (to the right) looks already promising.

image description

Example 3: Picture already looks almost natural (in my opinion). Plants have a strong orange look. Blue and red reference cards look more or less authentic. Color histogramm shows that all colors stretch over the entire spectrum (0-255).

image description

Example 4: Colors look a bit "cooler" than in example 3. Plants have a strong orange look. Compared to example 3 only red correction was raised/adjusted a bit resulting in the histogram to look a bit more "pointy" -> especially the blue one

image description

Any hints on whether I am making progress or have found a good whitebalance already would be very appreciated! I then would also try to setup a guide for other "newbies" like me in regards to white balance.

Best, Patrick



11 Comments

Hello Patrick,

Seems like we have had a similar approach using the PiNoIR camera.

I went with the same approach as you. Trying to adjust the awb gains until everything except the plants looked as natural as they could. I think result in example 3 looks the best. I think that setup could be used for experiments.

Hi Petter Thaks a lot for your comment, glad to have followed a similar approach as you did! Of course I also checked our post on this topic Link and I already had a look at your GitHub repo some weeks ago. My target is to also have everything neatly in python or R (which I am a bit more familiar with).

a) What were your findings running this analysis within your setup? b) Did you have a closer look at the color histograms at your end? c) Did you evaluate each pixel value > 0 in a more automated way with Python?

Best, Patrick

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


Super excellent documentation! CC @cfastie


Thanks a lot liz, it is a super interesting project for me and makes a lot of fun! Happy to get additional insights from your end if there is anything to add / criticize / challenge. 😃


Reply to this comment...


Hi @patalbright, A couple of things 1. Use whit Styrofoam as a reference white, try to find one that's Matt and not glossy. 2. The light source you have here looks like an LED, it hardly have any power in the over 700 nm range of the spectrum, to really take advantage of NDVI you'd want to use illumination with more power in the IR. Cinsider possibly adding light from an incandescent lamp.

Hi @amirberAgain, thanks for sharing this. You are absolutely correct - I use an LED with a sunlike spectrum but it is a bit weak on the NIR side of things. Wavelenghts should essentially go close to 780nm but are not very strong on this end.

Do you have experience with complementing full spectrum LEDs (or other light sources) with an incandescent light that is producing stronger NIR for NDVI analysis/purposes? Would be great to get a feeling if this would benefit the ndvi/plant health analysis :) Better data would therefore lead to more confident scores when building my models around this.

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


My experience with broad illumination for spectral imaging is to prefer an incandescent type lamp, sometimes with a blue LED in addition to that. Halogen lamps (the kind used in the automotive market or decaroica lamps is a simple way to make those. If you plot the LED spectrum you have here next to the reflectance spectrum of chlorophyll you could see why it is so important.


Thanks @amirberAgain

My full spectrum LED lamp produces some light in the IR spectrum as well. However, I do not want to have a too high intensity in the red spectrum so my plants don't flower. Also - I think - Incandescent type lamps are a lot less energy efficient than full spectrum LEDs which is a huge deal in my setup or did you experience otherwise?

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


As amirberAgain says, illuminating the plants with a balance of NIR and visible light similar to sunlight will make interpretation of the NDVI results easier. These high-NIR lights used to illuminate the plants do not have to be on all of the time -- only when the photos are being taken.

Chris


Yes, you are correct that incandescent lamps are far less efficient than LEDs. You should be able to find LEDs centered around 740mn, try looking at Luxeon LEDs.


Thanks, I will try to add an IR spotlight (used also in security camera settings) to add more IR light to this NDVI setup. Has anyone experience with different IR wavelenghts for plant health analysis? Is 850 nm also fine for this (even tough not being very beneficial for the plants themselves)? @cfastie @amirberAgain

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


Reply to this comment...


Log in to comment