Team:Aix-Marseille/Hardware

Detection of the disease


The purpose of the detection would be to determine if the tree is infected by Xylella fastidiosa. For this, there is a method called PCR (Polymerase Chain Reaction) that can detect the presence of viruses or measure viral loads. However, this is a complex method that requires DNA sampling on the tree, which will undergo various treatments in the laboratory, so it is not a way to detect X. fastidiosa. on the field.

Therefore, this project focuses on detecting the drying of the tree which is one of the first symptoms of X. fastidiosa. In the case of the olive tree, this method is relevant because the olive tree is an evergreen tree: its leaves will not dry naturally if the tree is healthy. However, the drying of the leaves can be caused by other factors than X. fastidiosa, the solution presented here serves primarily as a warning device; it is therefore appropriate after detecting the drying of a tree to take a sample and to ensure that it is X. fastidiosa which infects the tree before injecting the remedy developed by the team.

You can see below a diagram representing a chain of events that would allow you to observe the status of one or more trees in real time. This report relates mainly on the sensor and the data processing part.

T--Aix-Marseille--transmission chain.png

You can see on the diagram below that healthy leaves return more infrared light; there is an index, the NDVI, which allows to determine the relative level of photosynthesis of a plant. NDVI (Normalized Difference Vegetation Index) images, by monitoring the absorbed light of leaves, allows to detect the level of photosynthesis of a tree.

$$\text{Index NDVI} = \frac{\text{NIR}-\text{RED}}{\text{NIR}+\text{RED}}$$

T--Aix-Marseille--refraction spectrum leaves.png

The calculated index is between -1 and 1 and is associated with a color scale that allows you to observe easily and quickly if the tree is healthy or not. You can see an example of a NDVI image below.

T--Aix-Marseille--NDVI comparison.png

Sensor Operation

We use a Raspberry Pi 2 which will support the different software and programs used, a Black Pi camera (an infrared camera) and a ROSCO # 2007 blue filter, which is used for the detection of the drying of the tree.

Pi camera

T--Aix-Marseille--Pi camera and operation normal camera.png

Above, the black Pi camera used is shown on the left, and on the right the operation of a normal camera. Compared to a normal camera, an infrared camera doesn't have the anti-infrared filter.

However, we add another filter in front of the camera that will be used to create the NDVI image.

Blue filter ROSCO#2007

T--Aix-Marseille--blue filter rosco.png

This filter is used to filter the light and keep only blue and near infrared wavelengths (see graph below), which is relevant for photosynthesis.

T--Aix-Marseille--graph filter rosco.png

Software presentation

Presentation of Python and OpenCV

To make a NDVI image, we will use a library that allows image processing. This library allows the detection of objects, faces, shapes. It can be used with various programming languages, mainly C ++ and python. It is the last one that we have used for its portability, which will simplify the development.

T--Aix-Marseille--Python and OpenCV.png

Development of the NDVI image

In the computer memory, the images are coded in RGB, i.e. each color, red, green and blue, is coded on 1 byte and represents the intensity of the color. In a normal camera, the colors are captured and restored, the resulting image is in accordance with natural colors. In our case, the filter removes the red component, and is replaced by infrared. The resulting image of this montage is in "false colors" because it is composed of green and blue, visible by a human eye with infrared which is normally impossible to see.

The NDVI index can be calculated for each pixel of the image. For each pixel of the image we calculate the index NDVI with the relation shown previously:

$$\text{Index NDVI} = \frac{\text{NIR}-\text{RED}}{\text{NIR}+\text{RED}}$$

With the index of each pixel, we create a new grayscale image. The image is the visual representation of the NDVI index. However, the human eye cannot easily discern the gray levels, but more easily the color variations. We will use the OpenCV library to apply a color scale to our image. We apply the color colormap_jet.

T--Aix-Marseille--NDVI explanations.png

T--Aix-Marseille--scales of color.png