# Monitoring Within-Field Variability of Corn Yield using Sentinel-2 and Machine Learning Techniques
## 2 Materials and Methods
### Vegetation Indices  
Nine different vegetation indices (NDVI, NDRE1, NDRE2, GNDVI, GARVI, EVI, WDRVI, mWDRVI, and GCVI) were derived from Sentinel-2 images after resampling all bands to 10 m pixel size using SNAP software (Sentinel application platform) version 5.0. These indices are the most common VIs used for crop yield monitoring in the literature and were derived using Equations (1)-(9).  
\[NDVI=\frac{\text{NIR}-\text{B4}}{\text{NIR}+\text{B4}}, \tag{1}\]  
\[NDRE1=\frac{\text{NIR}-\text{B5}}{\text{NIR}+\text{B5}}, \tag{2}\]  
\[NDRE2=\frac{\text{NIR}-\text{B6}}{\text{NIR}+\text{B6}}, \tag{3}\]  
\[GNDVI=\frac{\text{NIR}-\text{B3}}{\text{NIR}+\text{B3}}, \tag{4}\]  
\[GARVI=\frac{\text{NIR}-(\text{B3}-\text{B1}-\text{B5})}{\text{NIR}-(\text{B 3}+\text{B1}-\text{B5})}, \tag{5}\]  
\[EVI=\frac{\text{NIR}-\text{B4}}{\text{NIR}+\text{6B4}-7.5\text{B1}+1}\times 2.5, \tag{6}\]  
\[WDRVI=\frac{\alpha\times\text{NIR}-\text{B4}}{\alpha\times\text{NIR}+\text{ B4}}, \tag{7}\]  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & & \multicolumn{3}{c}{**Cloudy Sky Confidence**} \\ \hline
**Image Date** & **N. Pixels \({}^{\star}\)** & **Min** & **Mean** & **Max** \\ \hline
18 June 2016 & 6 & 1 & 1.83 & 2 \\
18 July 2016 & 4 & 1 & 1.00 & 1 \\
28 July 2016 & 4 & 1 & 1.00 & 1 \\
24 August 2016 & 4 & 1 & 1.00 & 1 \\
31 May 2017 & 70 & 1 & 1.17 & 3 \\
3 June 2017 & 690 & 1 & 1.08 & 5 \\
13 June2017 & 619 & 1 & 1.05 & 5 \\
23 June 2017 & 4 & 2 & 2.00 & 2 \\
10 July 2017 & 4 & 1 & 1.00 & 1 \\
13 July 2017 & 4 & 4 & 4.00 & 4 \\
2 August 2017 & 12 & 1 & 1.00 & 1 \\
12 August 2017 & 4 & 1 & 1.00 & 1 \\
10 June 2018 & 4 & 3 & 3.00 & 3 \\ \hline \hline \end{tabular} \({}^{\star}\) Number of pixels with cloudy sky confidence above zero. There are a total n. of 2006 pixels (10 m GSD) in the study area.  
\end{table}
Table 2: Number of pixels covered by clouds in each image and cloudy sky confidence (%) of removed pixels.  
\[mWDRVI=\left\{\begin{array}{cc}NDVI&NDVI\leq 0.6\\ WDRVI&NDVI>0.6\end{array}\right., \tag{8}\]  
\[GCVI=\left(\frac{\text{NIR}}{\text{B3}}\right)-1, \tag{9}\]  
where NDVI is the Normalized Difference Vegetation Index (Equation (1)), NDRE 1 and 2 are the Normalized Difference Red Edge calculated based on band numbers 5 and 6, respectively (Equations (2) and (3)), GARVI is the Green Atmospherically Resistant Vegetation Index (Equation (4)), GNDVI is the Green Normalized Difference Vegetation Index (Equation (5)), EVI is the Enhanced Vegetation Index (Equation (6)), WDRVI is the Wide Dynamic Range Vegetation Index (Equation (7)), and mWDRVI is a mixed WDRVI where the WDRVI value is used conditionally if the NDVI value is above 0.6, otherwise NDVI is used, as per the literature in [34; 55] (Equation (8)). GCVI is the Green Chlorophyll Vegetation Index (Equation (9)). B1 is the reflectance of the blue band (432-453 nm), B3 is the reflectance of the green band (542-578 nm), B4 is the reflectance of the red band (649-680 nm), B5 and B6 are the reflectance of the vegetation red edge band at (697-712 nm) and (733-748 nm), respectively, and NIR is the reflectance of the near-infrared bands of the Sentinel-2 satellite images. For NIR, we tested bands 8, 8A, and 9, at (780-886 nm), (854-875 nm), and (935-955 nm), respectively, for all the VIs. The \(\alpha\) value in WDRVI is a weighting factor equals to 0.15 as average value between 0.1 and 0.2 as it is reasonable according to literature [55]. The derived vegetation indices were analyzed and compared with the actual yield maps for each season. The correlation measured using R\({}^{2}\) value was calculated for each index at different crop ages.