Line 4: | Line 4: | ||
The purpose of the detection would be to determine if the tree is infected by X.F. 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.F. on the field. | The purpose of the detection would be to determine if the tree is infected by X.F. 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.F. on the field. | ||
− | Therefore, this project focuses on detecting the drying of the tree which is one of the first symptoms of X.F. In the case of the olive tree, this method is relevant because the olive tree is an evergreen tree | + | Therefore, this project focuses on detecting the drying of the tree which is one of the first symptoms of X.F. 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 XF, 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 XF which infects the tree before injecting the remedy developed by the team. |
− | You can see below a diagram representing a chain of | + | 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. |
[[File:T--Aix-Marseille--transmission chain.png]] | [[File: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. | |
− | + | ||
− | You can see on the diagram below that healthy leaves return more infrared light | + | |
$$\text{Index NDVI} = \frac{\text{NIR}-\text{RED}}{\text{NIR}+\text{RED}}$$ | $$\text{Index NDVI} = \frac{\text{NIR}-\text{RED}}{\text{NIR}+\text{RED}}$$ | ||
Line 18: | Line 16: | ||
[[File:T--Aix-Marseille--refraction spectrum leaves.png|400px]] | [[File:T--Aix-Marseille--refraction spectrum leaves.png|400px]] | ||
− | The calculated index is between -1 and 1 and | + | 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. |
[[File:T--Aix-Marseille--NDVI comparison.png]] | [[File:T--Aix-Marseille--NDVI comparison.png]] | ||
Line 24: | Line 22: | ||
==Sensor Operation== | ==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 | + | 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=== | ===Pi camera=== | ||
Line 30: | Line 28: | ||
[[File:T--Aix-Marseille--Pi camera and operation normal camera.png]] | [[File: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, an infrared camera | + | 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. | However, we add another filter in front of the camera that will be used to create the NDVI image. | ||
Line 38: | Line 36: | ||
[[File:T--Aix-Marseille--blue filter rosco.png|left|300px]] | [[File:T--Aix-Marseille--blue filter rosco.png|left|300px]] | ||
− | This filter is used to filter the light and keep only blue and near infrared (see graph below). | + | This filter is used to filter the light and keep only blue and near infrared wavelengths (see graph below), which is relevant for photosynthesis. |
[[File:T--Aix-Marseille--graph filter rosco.png]] | [[File:T--Aix-Marseille--graph filter rosco.png]] | ||
Line 52: | Line 50: | ||
===Development of the NDVI image=== | ===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 | + | 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: | 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: | ||
Line 58: | Line 56: | ||
$$\text{Index NDVI} = \frac{\text{NIR}-\text{RED}}{\text{NIR}+\text{RED}}$$ | $$\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 color colormap_jet. | + | 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. |
[[File:T--Aix-Marseille--NDVI explanations.png]] | [[File:T--Aix-Marseille--NDVI explanations.png]] | ||
[[File:T--Aix-Marseille--scales of color.png]] | [[File:T--Aix-Marseille--scales of color.png]] |
Revision as of 14:44, 29 September 2017
Detection of the disease
Contents
The purpose of the detection would be to determine if the tree is infected by X.F. 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.F. on the field.
Therefore, this project focuses on detecting the drying of the tree which is one of the first symptoms of X.F. 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 XF, 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 XF 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.
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}}$$
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.
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
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
This filter is used to filter the light and keep only blue and near infrared wavelengths (see graph below), which is relevant for photosynthesis.
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.
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.