OBJECT BASED IMAGE ANALYSIS AND TEXTURE FEATURES FOR PASTURE CLASSIFICATION IN BRAZILIAN SAVANNAH

The classification of different types of pasture using remote sensing imagery is still a challenge. Assessing high quality geospatial information of pasture management system and productivity are key factors for establishing local public policies related to food security. In this context, we aim to investigate how texture features, allied with Object Based Image Analysis, can contribute to the automatic classification of herbaceous pastures and shrubby pastures in a region of Brazilian Savannah. We used Sentinel-2 images from dry and rainy seasons to extract several vegetation indexes, spectral unmixing components and texture features. The SLIC algorithm was used for perform image segmentation and the Random Forest for image classification. The use of texture features on pasture classification resulted in an accuracy of 87.03%. Our key finding is that features like entropy and contrast were able to detect areas with a greater concentration of shrubby-arboreal elements, which are often present on shrubby pastures and may be the first signal of a degradation process.


INTRODUCTION
On April 2016, United Nations (UN) proclaimed the Decade of Action andNutrition (2016-2025) which aims to accomplish several goals in order to reduce hunger and poverty by 2030 (Baker et al., 2018). According to UN statistics, 821 million people suffered from food insecurity in the world by 2016. In this context, Brazil was one of the first countries to propose serious commitments to this policy, increasing the annual budget of several programs related to food security (United Nations, 2017). Brazil contributes significantly to food production in the world, being currently the largest exporter of beef and soybeans and it is expected to be the second largest exporter of corn by 2020 (USDA, 2019;. Brazil has the second highest cattle stock in the world, with 244 million heads (only behind India with 300 million heads) (USDA, 2019). Brazilian exports for 2019, related only to cattle beef, were 19% greater when compared to 2018, generating an annual budget of US$ 6.5 billion. Countries such as China, Hong Kong, Egypt, Chile and Iran represent almost 70% of the destination of Brazilian beef (BMIEC, 2020).
The increase in beef production is highly related to pasture expansion in Brazil and is usually associated with the conversion of natural system into pastures, especially in Amazon and Cerrado (Brazilian Savanna) biomes (Lapola et al., 2014). However, with the intensification of public polices and international pressure, programs such as "Prevention, control and monitoring of bushfires in the Cerrado" (Tuchschneider, 2013), "Mapping Land use and cover in Cerrado -TerraClass Cerrado 2013" (Scaramuzza et al., 2017), "Development of Systems to Prevent Forest Fires and Monitor Vegetation" (World Bank, 2016) and "Integrated Landscape Management in the Cerrado Biome" (World Bank, 2018) were developed. The results of In this context, remote sensing is an essential tool to develop methodologies and provide good results. Mapping pasture areas in Cerrado was successfully done by Sano et al. (2008) and Scaramuzza et al. (2017), but no pasture condition was analysed. Almeida et al. (2016) mapped four different covers types on pastures in Amazon: herbaceous pasture, shrubby pasture, pasture with bare soil and regeneration with pasture. However, all these authors used methodologies based on segmentation and visual interpretation of remote sensing imagery, which is time consuming and the quality is related to the interpreter experience. This challenge was overcome by using remote sensing time series for automatic pasture detection regarding other land use and cover classes. Muller et al. (2015) used Landsat-5 and Landsat-7 images in order to map pastures, agriculture, savannah, forest, water and non-vegetated lands on Mato Grosso State, Brazil. Normalized Difference Vegetation Index (NDVI) time series and the Random Forest algorithm were used to perform a pixel wise classification. Several statistical metrics, such as mean values, standard deviation and other indexes were used on the classification, which resulted in an accuracy of 93%. A similar methodology was adopted by Parente et al. (2017), who mapped pasture areas the whole Brazilian territory. Once again NDVI time series and the Random Forest Classifier were used and the accuracy was of 87% on a pixel wise classification.
Object Based Image Classification (OBIA) was applied by Neves et al. (2016) in order to classify pastures, forest and agriculture in Mato Grosso State. Using Enhanced Vegetation Index 2 (EVI2) time series from MODIS (Moderated-Resolution Imaging Spectroradiometer) data and including polar time series metrics, the authors compared a pixel wise classification versus OBIA. Considering the pasture class, the OBIA outperformed the pixel wise classification with an accuracy of 92% against 75% (both using the Random Forest classifier), which indicates that the use of OBIA might be a reliable technique to improve pasture classification. Neither of the previous works advanced on different pasture covers classification, like proposed by Almeida et al. (2016).
Several other authors classified pasture cover using other image processing techniques. For instance, Davidson et al. (2008) evaluated spectral unmixing components (Shimabukuro, Smith, 1991) for the identification of degraded pastures. Considering how seasonality influences on pasture vegetation, greater values of the soil component were detected on degraded pasture, whereas, the vegetation component had higher values on cultivated pastures. Rufin et al. (2015) evaluated the Tasseled Cap transformation (Kauth, Thomas, 1976) in order to discriminate herbaceous pasture from shrubby pasture in Pará State, Brazil (Amazon biome). Once again considering seasonality, the high variability of the components was able to identify the transition between both pastures.
Despite all the effort, automatic classification of pasture cover is still an issue. Neves et al. (2017) investigated optical image texture in order to classify herbaceous pasture from shrubby pasture on Acre State, Brazil (Amazon biome). Using images from both seasons and the random forest classifier, texture features and OBIA improved the classification of both pasture classes from 64.7% to 76.4%, when compared to classification without texture. Considering the Cerrado Biome, the discrimination of natural herbaceous grasslands from natural shrubby grasslands was also improved by the use of texture, especially because some texture features, like entropy were able to capture the transition between herbaceous and shrubbyarboreal vegetation (Girolamo Neto, 2018).
In this context, we aim to investigate how texture features, allied with OBIA, can contribute to the automatic classification of herbaceous pastures and shrubby pastures in a region of Cerrado (Mato Grosso do Sul State, Brazil) using Sentinel-2 imagery with 10m spatial resolution. This study is also part of the Integrated Landscape Management in the Cerrado Biome Project (World Bank, 2018).

Study site
The study site is within Mato Grosso do Sul state, which holds 10.2% of Brazilian cattle heads in an area of 17.2 million hectares (IBGE, 2019). The Sentinel-2 tile (T22KBB) was used as study site and contains partially the municipalities of Bataguassu, Brasilândia, Campo Grande, Nova Andradina, Nova Alvorada do Sul, Ribas do Rio Pardo e Santa Rita do Pardo. These seven municipalities (highlighted in green in Figure 1) represent 15% of the cattle production of the state and on 4.3 million hectares. Figure 1. Study site highlighting Mato Grosso do Sul State in Brazil, the Sentinel-2 tile and also the selected municipalities for the present study.

Satellite and field data
Two Sentinel-2 images from rainy (21/01/2019) and dry seasons (24/08/2019) were used. They were acquired in level 2A product (surface reflectance with values adjusted from 0 to 10000). Spectral bands with 10m spatial resolution were used: Blue (439-535 nm), Green (537-582 nm), Red (646-685 nm) and Near Infrared (767-908 nm). The images were obtained without any cost on the Copernicus platform (scihub.copernicus.eu/). A field work was carried out on the study site on a close period to image acquisition (01/09/2019 until 06/09/2019). A total of 461 field observations were obtained considering two pasture classes described on Table 1.

Herbaceous pasture
Shrubby pasture Definition: More than 50% of the pasture area is dominated by an herbaceous specie. Sparse shrubs and small trees may occur. Smooth texture.
Definition: More than 50% of the pasture area is dominated by shrubs and small trees. May present patches of bare soil. Rough texture. Sentinel-2 True Colour: Sentinel-2 True Colour: Field campaign photo: Field campaign photo:

Image processing
Several image processing procedures were applied in order to obtain the variables used for classification. They are described on the following sections.
2.3.1. Vegetation Indexes: They are used to highlight vegetation pixels on remote sensing imagery by analyzing the combination of different regions of the spectrum (Xue, Su, 2017). Seven different vegetation indexes (Xue, Su, 2017) were used on this paper and are described on Table 2.
Table 2: Vegetation indexes extracted for both Sentinel-2 images, where, ρB,G,R,NIR = the reflectance value of the given band; L = soil line adjustment factor; G = gain factor; C1 e C2 = aerosol resistance coefficients; Lc = vegetation correction factor.

Texture:
Targets on a satellite image may be characterized by texture. A smooth texture is usually related to lower grey level variations in a window. On the other hand, a rough texture is associate with higher grey level variations (Hall-Beyer, 2017).
In order to extract texture information of an image, Haralick et al. (1973) proposed the Grey Level Co-occurrence Matrix (GLCM), which is a second order histogram where each entry reports the join probability of finding a set of two grey level pixels at a certain distance and direction from each other over a predefined window. It can be calculated for 4 different directions inside the window (0°, 45°, 90° and 135°). From the GLCM is also possible to calculate de Grey Level Difference Vector (GLDV), which computes absolute differences from grey level pairs obtained by the GLCM (Haralick et al., 1973;Hall-Beyer, 2017). The texture features used on this paper were generated using the 0º direction and are described on Table 3.

Feature name Equation
GLCM Homogeneity GLCM 2 nd Angular Moment , , GLCM Correlation GLDV 2 nd Angular Moment (16) GLDV Entropy The texture features were calculated for each of the four Sentinel-2 bands, the three spectral unmixing components and the seven vegetation indexes (10 textures per layer, e.g., 10 x 14 = 140 texture features for each image).

Spectral unmixing:
This approach aims to estimate the proportion of different components inside a single pixel, considering that the spectral response of the given pixel is a linear combination of other different and know spectral responses (Shimabukuro, Smith, 1991). The spectral response for components of bare soil, shadow and green vegetation were obtained from 20 pure pixels (each) manually selected on the images. The spectral unmixing, on both images (each one at a time), was performed according to the following equation: where j = number of components; i = number of spectral bands; ri = mean spectral reflectance for the ith spectral band of a pixel containing one or more endmembers; aij = spectral reflectance of the jth component in the pixel for the ith spectral band; xj = proportion value of the jth component in the pixel; ei = error term for the ith spectral band.

Image segmentation and class attribution:
The Superpixel approach is a region-based image segmentation that over segment the image in order to produce meaningful objects named superpixels (Çiğla, Alatan, 2010). Superpixels adhere well to image boundaries and the algorithm is memory efficient (Achanta et al., 2012). The Simple Linear Iterative Clustering (SLIC) superpixel algorithm was used in this paper (Achanta et al., 2012). The SLIC in an adaptation of the k-means algorithm, that computes not only the similarity of the pixels in terms of the colour space (e.g., RGB), but also the spatial proximity in relation to cluster centers, according to the following equations: where dRGB = Euclidean distance on the RGB space of a pixel i and a pixel on a cluster center k; dx,y = Euclidean distance on the x,y plane of a pixel i and a pixel on a cluster center k; S = superpixel grid interval; m = compactness of the superpixel.
The algorithm creates a regularly spaced grid controlled by the desired number of superpixels. After that, each image pixel overlapped by the search region is associated with the nearest cluster center, then the cluster centers are adjusted on an update step and this is repeated until convergence. The compactness of the superpixel refers to how spatial proximity weights on the calculations and, therefore, how compact they will be (closer to a square). The parameters S and m used on this work were 220,000 and 750, respectively. These values were reached after several empirical tests and visual evaluation of the segmentation.
Considering each field observation, the pasture area was adjusted visually based on the Sentinel-2 images (representative area of the field observation). After that, we assigned classes to the superpixels on this area (Figure 2). This resulted on 1973 samples of herbaceous pasture and 1061 samples of shrubby pasture.

Image classification
The classification algorithm used was the Random Forest (Breiman, 2001), which previously presented good results on other applications of pasture mapping (Muller et al., 2015;Neves et al., 2016;Parente et al., 2017). The Random Forest algorithm is also considered computationally efficient, it is less sensitive to noisy data and the generation of multiple trees with the bootstrap technique can also avoid overfitting (Belgiu, Drăguţ, 2016). We built up Random Forests with 1000 trees and no pruning was performed (Hall et al., 2009). Figure 2: Example of class assignment considering one field observation and the respective representative area in blue. Visual interpretation was performed in order to assign the class of herbaceous pasture on the green superpixels.
A total of four experiments were conducted in order to evaluate how texture contribute to pasture cover detection (  (Dash, Liu, 1997;Hall et al., 2009) The 10-fold cross-validation method was used in the experiments and each classification was repeated 10 times. An error matrix was generated and the metrics of Overall Accuracy (OA), Recall (R) and Precision (P) were employed to interpret the results. The equation of these metrics is described below.

RESULTS AND DISCUSSION
The Overall Accuracy (OA) of all experiments is presented on Table 5. Figure 3 shows the average values of precision and recall for each class on each experiment realized. All these results were obtained considering the Wrapper feature selection method, which outperformed the other methods mentioned on section 2.4.
Experiment number Overall Accuracy (%) 1 84.17 ± 0.08 2 85.47 ± 0.14 3 84.90 ± 0.13 4 87.03 ± 0.12 Table 5: Average overall accuracy obtained for the four experiments. The OA of experiment 1, using only the reflectance values for the Sentinel-2 bands, was of 84.17%. It will be considered the baseline for further analysis, together with the Precision and Recall values on Figure 3.
The addition of vegetation indexes and unmixing components to the dataset (experiment 2) improved the OA to 85.47%. This increase was expected, since the importance of vegetation indexes for pasture detection was already reported by Neves et al. (2016) and Parente et al. (2017). After feature selection, four vegetation indexes were selected: the VDVI and the MCARI for rainy season and the VDVI and the MSAVI2 for the dry season.
In order to understand why these vegetation indexes were used, a Pearson correlation analysis was performed between the indexes obtained for each season image (Figure 4). The high correlation values between all indexes, except the VDVI, indicates that they are always representing the same phenomena and, thus, representing the vegetation seasonality in our classifier. Considering that the VDVI only uses bands from the visible spectra (Equation 7), it obtains a different relation when compared to other indexes that uses the NIR band (Wang et al., 2015). This is the explanation for the lower correlation with other indexes and the selection by the Wrapper algorithm.
On experiment 2, the components of vegetation and shadow from the spectral unmixing were also selected. Davidson et al. (2008) already pointed out that the vegetation component had greater values on herbaceous cultivated pastures than shrubby pastures. The presence of this component also contributed to the accuracy improvement in our results as well. Comparing recall values of experiment 2 in relation to experiment 1, the improvements were more noticeable on the shrubby pasture recall, which increased from 68.94% to 72.68%. The increase on the hit rate of this class improved the quality of the generated map and better precision values were also obtained for both classes. Experiment 3 presented a slightly lower OA than experiment 2. Similar features from experiment 2 were on experiment 3 after feature selection (vegetation indexes from the rainy and dry seasons and both components of the spectral unmixing). Three standard deviation features and three skewness features were selected and did not improved the classification accuracy. Muller et al. (2015) also used similar statistical features, but no explanation was given on how they affected classification results.
When texture was used, the OA had the best result, which was 87.03%. The use of texture improved, not only the recall, but also the precision for both classes. Experiment 4 used a total of 364 features and the Wrapper algorithm selected 16 different features. Comparing to the other experiments, a pattern starts to be discovered, since vegetation indexes from the rainy and dry seasons and the shadow component of the spectral unmixing were selected once again.
Considering only texture, five different features were selected (Table 6). In order to better understand these features, we decided to divide then into two major groups, following Hall-Beyer (2017) suggestion. Texture features were divided into a group that is related to orderliness, and other that is related to contrast.
The contrast related textures are derived from features like homogeneity, dissimilarity and the contrast from the GLCM. These features evaluate how different the grey level values are in a superpixel. On a homogeneous superpixel, with less grey level differences, higher values of homogeneity are expected, whereas, the contrast values tend to be low. The dissimilarity works similar to contrast, but a liner relation is considered (Equation 10) and lower values are also expected for a homogeneous superpixel.
The group of textures related to orderliness are derived from second angular moment and entropy from the GLCM or the GLDV. These features are directly related on how the pixel grey levels are distributed on a superpixel, not the difference between the grey level values, like on the contrast group. A more ordered superpixel would present a constant variation of grey level pixels along a direction, whereas a disorder image would present an uneven or random variation. A disordered superpixel has greater values of entropy, while more ordered superpixel have lower values. The second angular moment has a similar behaviour, but in an opposite way of the entropy.
It may be hard to identify what characteristics each texture feature can describe, thus, an example can be found on Table 7, considering the image from the dry season and the respective superpixels and texture features from Table 6.  Table 6: Selected texture features for experiment 4 considering the dry and rainy seasons.
The shrubby pasture has 50% or more of its area composed by shrubs or small trees, which was highlighted on the Soil component of the spectral unmixing on Table 7, as mentioned by Davidson et al. (2008). Considering the superpixels limits shown in a red dashed line, the distribution of the shrubby-arboreal elements (dark pixels) in the image does not follow a pattern and are uneven, which generates low values of second angular moment. On the other hand, this uneven distribution generates high values of entropy, which was observed when analysing the superpixels on the band 4 composition. There are considerable grey level variations within each superpixel as well, which results in high contrast values (represented in our case by the contrast of band 1).
Comparing our results with other applications that evaluated texture for pasture cover classification, we obtained better results. Neves et al. (2017) obtained an accuracy of 76%, but their references were obtained from visual interpretation of RapidEye images (with 5m spatial resolution). This emphasizes the importance of verifying the pasture on field, carefully analysing the vegetation patterns.
Comparing the above mentioned results to the herbaceous pasture class, almost no shrubby-arboreal elements can be seen on the The entropy patterns related to vegetation features found on this paper are similar to the ones found by Girolamo Neto (2018), when the author analysed natural herbaceous and shrubby grasslands in the Cerrado.
Sentinel-2 true colour composition. The absence of these elements creates a smoother texture and a homogeneous area, thus the contrast of the superpixels (shown in a dashed green line in Table 7 -band 1 contrast) are low. This small difference in grey levels results into small entropy values, since there is almost none grey level variation, so it is hard to quantify if it is ordered or not. This kind of relationship also affects values for the second angular moment, which tends to be low as well. However, on the selected samples shown on Table 7, it is possible to see that some superpixels on the right edge of the herbaceous pasture encompassed a dirty road. Considering the soil fraction, there is a greater variation of this element, and this variation is ordered towards the 0º direction, thus greater values of this texture this example and the adoption of the "average" nomenclature on Table 7.
Performing a visual analysis of superpixels misclassified, we noticed several cases where the error was associate with the pasture landscape heterogeneity. Figure 5 presents two examples, where the first one is an area of herbaceous pasture where the concentration of shrubby-arboreal elements on the north were misclassified. The second example is an area of shrubby pasture, where the lack of these elements near the road resulted into misclassified superpixels.  Table 7: Examples for the classes of shrubby pasture and herbaceous pasture on several image compositions: Sentinel-2 true colour, the soil component of the spectral unmixing, the near infrared band and the blue band. In red dashed lines the superpixels corresponding to the shrubby pasture class and on green dashed lines the ones corresponding to the herbaceous pasture class and how the respective texture values were for each class on each image composition. Figure 5. Example of misclassified superpixels of both classes due the landscape heterogeneity in pastures (Sentinel-2 true colour composition).

CONCLUSION
Texture features derived from the grey level co-occurrence matrix and the grey level difference vector improved the discrimination between herbaceous pasture and shrubby pasture in a region of Brazilian Savannah. The best overall accuracy achieved was 87.03%, using the superpixel segmentation, the Random Forest classifier and Wrapper algorithm for feature selection. These metrics improved the discrimination of these classes considering the presence of shrubby-arboreal elements on shrubby pastures, vegetation patters that are not usually seen on herbaceous pasture. Higher values of entropy and contrast were found for shrubby pastures in comparison to herbaceous pastures. We also emphasized that a better classification was achieved by considering seasonality of the vegetation and the use of spectral unmixing fractions like soil, shadow and vegetation.
Most of the misclassified superpixels between the two classes were related to the landscape heterogeneity in pastures, especially considering a few patches of shrubby pasture without the arboreal elements and a smoother texture. As future works, we aim to evaluate texture features for other pasture covers related to different management systems, such as the Silvopasture, which integrates trees and forage for cattle production and have a unique patter on Sentinel-2 imagery.