# A Simple Method to Estimate Weed Control Threshold by Using RGB Images from Drones
## 2 Materials and Methods
### Image Processing  
The RGB images of experimental plots acquired from the UAV were orthorectified and mosaicked using Agisoft Photoscan Professional Edition 1.1.6 (Agisoft LLC, St. Petersburg, Russia). The orthomosaic was processed with Canopeo, which analyses images by using colour values in the red (R), green (G) and blue (B) system and classifies all pixels according to three selection parameters: R/G, B/G and the green excess index (GEI = 2G-R-B) [36; 37; 38; 39]. The starting image was turned into a binary image depending on whether the pixels met the selection criteria or not (R/G < 0.95, B/G < 0.95, and GEI > 20, default values). In this way, we obtained the total green cover for the WP and CP (Ca-TGCWP+CP). In order to estimate the values of MGC and WGC for the WP and CP, we tested two different methods. In the first method (M1), we expressed the Ca-TGCWP+CP as the sum of MGCWP+CP and WGCWP+CP (1) and they, in turn, are expressed as the product of the number of maize/weed plants by the average cover of a single plant of maize/weed (2) and (3) (Figure 2). \[\text{Ca }-\text{TGC}_{\text{WP+CP}}=\text{MGC}_{\text{WP+CP}}+\text{WCG}_{ \text{WP+CP}} \tag{1}\]  
\[\text{MGC}_{\text{WP+CP}}=\text{NM}_{\text{WP+CP}}\times\text{AM}_{\text{WP+CP}} \tag{2}\]  
\[\text{WGC}_{\text{WP+CP}}=\text{NW}_{\text{WP+CP}}\times\text{AW}_{\text{WP+CP}} \tag{3}\]  
\[\text{Ca }-\text{TGC}_{\text{WP+CP}}=\text{NM}_{\text{WP+CP}}\times\text{AM}_{ \text{WP+CP}}+\text{NW}_{\text{WP+CP}}\times\text{AW}_{\text{WP+CP}} \tag{4}\]  
where Ca-TGCWP+CP were the values obtained by processing the UAV images with Canopeo, NMWP+CP = the number of maize plants counted in the WP and CP, AMWP+CP = the average cover of a single maize plant, NMWP+CP = the number of weed plants counted in the WP and CP, and AWWP+CP = the average cover of a single weed plant. At this point, we used a linear least-squares fitting (\(n=8\)) to find the best values for the AM\({}_{\text{WP+CP}}\) (AM) and for the AW\({}_{\text{WP+CP}}\) (AW) able to approximate Equation (4), and to solve Equations (5) and (6):  
\[\text{M1}-\text{MGC}_{\text{WP+CP}}=\text{NM}_{\text{WP+CP}}\times\text{AM} \tag{5}\]  
\[\text{M1}-\text{WGC}_{\text{WP+CP}}=\text{NW}_{\text{WP+CP}}\times\text{AW} \tag{6}\]  
In the second method (M2), we estimated the value of AM (AM*) by using the images captured of the PWP. We assumed that the development of the maize plants was very similar within the experimental fields (sown all on the same day), therefore, we can estimate the value of AM by dividing the Ca-TGC data measured with Canopeo on the PWP (Ca-TGC\({}_{\text{PWP}}\)) by the corresponding number of maize plants NM\({}_{\text{PWP}}\) (7). Indeed, the Ca-TGC\({}_{\text{PWP}}\) corresponded to the Ca-MGC\({}_{\text{PWP}}\) values since, in the PWP, all weeds had been removed manually. Afterwards, we calculated the average of the AM* values obtained for each PWP (\(\overline{\text{AM}^{*}}\)) (8). \[\text{AM*}=\text{Ca}-\text{TGC}_{\text{PWP}}/\text{NM}_{\text{PWP}} \tag{7}\]  
\[\overline{\text{AM}^{*}}=\text{average of AM*}(1,\ldots 4) \tag{8}\]  
We replaced the AM with the \(\overline{\text{AM}^{*}}\) in (4) to obtain a new equation to express the TGC\({}_{\text{WP+CP}}\) (9). \[\text{Ca-TGC}_{\text{WP+CP}}\ =\text{NM}_{\text{WP+CP}}\times\overline{\text{AM}^{*}}+ \text{NW}_{\text{WP+CP}}\ \times\ \text{AW*}_{\text{WP+CP}} \tag{9}\]  
Figure 2: The graphic summary of the maize and weed green cover (MGC and WGC) from the two estimation methods (predicted data) in comparison to the Erdas classification method (observed data) ((a) = collection data, (b) = processing data, (c) = fitting and results, (*) = values used for the method 2). We approximated the value of AW* in Equation (9) by means of linear least-squares fitting (\(n=8\)) and, therefore, we estimated the value of weed green cover according to the M2 (M2-WGCWP+CP) by using Equation (10).