This repository is made to dispose of several drone-based tools for crop monitoring. Currently, there are available examples for:
- Drone data reading
- Spectral indexes calculation
- Plant level 3D visualization
- Plant level identification given a trained YOLO model
- Cluster classification
Considering that crop monitoring involves a continuous capture of data through its cycle. We have implemented a framework in which the data is stored as a multi-dimensional object. Where besides the x and y axis data, a time dimension is included. This refers to when the image was taken. Regarding the spectral bands, those are located as a fourth dimensiononal array. Wrapping up, the data is a xarray object with dimensions time, Spectral band, Y, X.
You can also calculate different vegetation index layers using the function .calculate_vi. To use this function you will need to indicate two parameters:
- vi: which is the name of the vegetation index
- expression: is the equation to calculate the vegetation index, eg. "((green_msgreen_ms) - (red_msred_ms))/((green_msgreen_ms) + (red_msred_ms))" will calculate the modified green red vegetation index.
### Calculando indices vegetales
dronedata.calculate_vi('ndvi')
dronedata.calculate_vi(vi = 'mgrvi', expression = "((green_ms*green_ms) - (red_ms*red_ms))/((green_ms*green_ms) + (red_ms*red_ms))"
the following table contains different VI, which can be obtained from combining RGB and NIR spectral bands:
- GRVI: Red and photographic infrared linear combinations for monitoring vegetation
$$\frac{green - red}{green + red}$$ - MGRVI: modified green red vegetation index$$ \frac{green^2 - red^2}{green^2 + red^2} $$
- RGBVI: Red Green Blue Vegetation Index$$ \frac{(green^2) - (blue*red)}{(green^2) + (blue * red)} $$
- NDVI: normalized difference vegetation index
$$\frac{nir - red}{red + nir}$$ - NDRE: normalized difference red edge index
$$\frac{nir - edge}{red + edge}$$ - GNDVI: green normalized difference vegetation index
$$\frac{nir - green}{red + green}$$ - RECI: red edge chlorophyll index
$$(\frac{nir}{edge} - 1)$$
the plotsingleband() function will a single spectral band
m.plot_singleband('ndvi')