Question: Question: Determining Plant-Health

kiranay is asking a question about plant-health: Subscribe to answer questions on this topic

kiranay asked on October 15, 2015 11:12
1,916 views | 0 answers | #12304


What I want to do or know

I want to know how i am able to find the health of the plant with using raspberry pi and it PI-NOIR camera. I have attached the image i have taken with the PI-NOIR camera. I am facing difficulty in determining the health condition. I cannot find the better software for it. Can you help me with it? Kiran frame033.jpg

Background story

I am making an agricultural monitoring prototype ( QUAD COPTER). For this i have to taken multi-spectral images taken from PI-NOIR camera and after taking the images i have to process it to determine: Plant health condition, water condition, insecticide and pesticide condition through NDVI.



26 Comments

Hi Kiran,

The Pi NOIR camera does not have an IR block filter (NOIR = no IR). So it is a full spectrum camera. That means some NIR is captured in each of the three channels (R,G,B) along with visible light of one color.The plant leaves in your photos are light because much NIR is reflecting from them and being captured by the camera. If you look at each channel, they will all look similar.

Infrared plant health images usually highlight the difference between NIR reflected from leaves and visible light reflected from leaves. But in your photos NIR and visible is mixed. DIY plant health cameras start with a full spectrum camera and then add a filter that blocks all visible light of one color. Then one of the channels (R,G,B) will not capture any visible light and will only capture NIR light. NDVI-like images could then highlight the difference between that channel and a visible light channel.

Public Lab sells filters that can turn a PI NOIR camera into a plant health camera.

Chris

Reply to this comment...


At one time the Pi NOIR camera shipped with a piece of blue filter that blocked red light. This could be used to make photos that could be transformed into pseudo NDVI images.

Reply to this comment...


@cfastie frame035.jpg

Here i am attaching that same picture with the blue filter. How this picture can be use to transform into pseudo NDVI image.

Reply to this comment...


Photomonitoring Plugin on Fiji or http://infragram.org/

Reply to this comment...


The blue filter did not seem to change the photo very much. The three channels are still very similar. Even for just a leaf (marquee below) the brightness of the three channels is almost the same:

KiranFrame35.JPG

To compute realistic NDVI directly from a photo, the channel used for NIR must be much brighter than the channel used for visible light. Healthy leaves reflect many times more NIR than visible light. To produce photos with the correct relationship between NIR and VIS, an artificial white balance setting on the camera is used. Below is a photo taken with a Rosco 2007 filter (probably the same filter you used) with a camera that had a custom white balance that exaggerated the red channel:

Arbutus2007Hist.JPG

Here is an NDVI image made from that photo with the Photo Monitoring plugin for Fiji:

Arbutus2007NDVI.JPG

It is possible that the Raspberry Pi allows custom white balance before photos are taken. If so, it should be possible to capture photos that can be converted directly to NDVI. Otherwise it will be difficult.

Your results could improve by using different white balance settings (fluorescent, cloudy) and by taking photos in direct sunlight. Good exposure also helps. Dull photos never work.

Chris

Reply to this comment...


@cfastie can you please guide me how did you made the spectrum of my image, and the NDVI image of your picture.

Reply to this comment...


Kiran,

The graph is a histogram which can be made in free programs like GIMP, IrfanView, or Fiji or photo editing programs like Photoshop. Here is an old note about histograms: http://publiclab.org/notes/cfastie/06-13-2013/histograms.

I used the Photo Monitoring plugin for Fiji to make the NDVI image. You can get this program here: https://github.com/nedhorning/PhotoMonitoringPlugin and there is a user manual included.

Chris

Reply to this comment...


frame027.jpg

is this a better image? can i evaluate the accurate results from it? @cfastie

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

Reply to this comment...


frame008.jpg

@cfastie

Reply to this comment...


From the above two images how can i detect the plant condition? @cfastie

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

Reply to this comment...


Those two photos have some good plant health information in them, especially the second one of tree foliage (family Anacardiaceae?). That one produces NDVI values within the range of where they should be:

frame008NDVI.jpg
The color scale goes from -1 to +1.

The other one is not orange enough to produce NDVI values in the proper range (assuming the plant was healthy).

frame027NDVI.jpg
NDVI values for the leaves are around +0.1 whihc is probably much too low.

Both photos produce very good distinction between foliage and non-foliage, which is good.

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

Reply to this comment...


@cfastie following image describes what? And what proper image processing index can be used to evaluate the health, ndvi_vgyrm photo_auto_auto.png

, ndviblu2red, or ndviblue2redwb

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

Reply to this comment...


@cfastie check this too. What i conclude from these two images now? I've set the white balance too. photo_auto_tungsten.png

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

Reply to this comment...


It would be helpful to know how you made those photos (camera, filters, white balance). I am guessing they were made with an RPi NoIR camera with a blue filter with preset white balance settings. The brightness of all three channels is very similar so those photos will not allow direct computation of NDVI. An artificial white balance or calibration procedure is needed for that.

Reply to this comment...


@cfastie check this too. What i conclude from these two images now? I've set the white balance too.

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

Reply to this comment...


@cfastie how can i do artificial white balance or calibration? Yes, these photos are taken with RPI NoIR camera with a blue filter with preset white balance settings

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

Reply to this comment...


@cfastie And how can i use NDVI formula to calculate the value?

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

Reply to this comment...


There is a discussion of controlling the white balance on the Raspberry Pi camera here: https://publiclab.org/notes/LaPa/12-03-2015/how-do-i-set-a-costum-white-balance-of-the-noir-modulo-cam.
There is a discussion of calibration here: https://publiclab.org/notes/cfastie/05-01-2016/calibration-cogitation.
Software to compute NDVI from an image is discussed here: https://publiclab.org/notes/nedhorning/07-22-2015/introducing-the-calibration-plugin-for-imagej-fiji.

To manually calculate NDVI you need to access the DNs in each pixel. To do it for one pixel, open any jpeg in Fiji and the three DNs (R, G, B) are displayed for the pixel the mouse is hovering over. For a blue filter, use the R number for NIR and the B number for VIS and plug them into the NDVI formula. Repeat for all five million pixels.

Reply to this comment...


@cfastie Its not understandable, that when i'll open my PNG file how will i able to read the pixels on it?

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

Reply to this comment...


@cfastie I did white balance setting again for the image, check it out aaAgriQuad001.jpg

Reply to this comment...


You need a program like Fiji to see the RGB values. The latest photo has more yellow orange color in the foliage so it should do a good job discriminating between plants and non plants.

Reply to this comment...


@cfastie I have Fiji on my laptop, but cannot determine RGB values.Guide me with it. Can you calculate NDVI for the following image? And can you tell me what does it tells about? aaAgriQuad004.jpg

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

Reply to this comment...


Open an image in Fiji and hover the cursor over it. At the bottom of the Fiji window it will say "value=" followed by three numbers which are the RGB DNs. Use the Photo Monitoring plugin to convert the image to NDVI. Links are in previous comments above and include the instruction manual.

Reply to this comment...


@cfastie Thank you so much for your helo

Reply to this comment...


@cfastie How about this picture? Can you compute its NDVI? AgriQuad001.jpg

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

Reply to this comment...


@cfastie and can you please guide me with the plot of ndviImage.

Reply to this comment...


Log in to comment