# Object-Based Land Cover Classification of Cork Oak Woodlands using UAV Imagery and Orfeo ToolBox
## 3 Methods
### Segmentation  
Segmentation is the first phase of the object-oriented classification procedure, and its result is a vector file in which every polygon represents an object. Original images are subdivided into a set of objects (or segments) that are spatially adjacent, composed of a set of pixels with homogeneity orsemantic meaning, and collectively cover the whole image. The shape of every notable object should be ideally represented by one real object in the image [19; 27]. Segmentation focuses not only on the radiometric information of the pixels, but also on the semantic properties of each segment, on the image structure, and on other background information (color, intensity, texture, weft, shape, context, dimensional relations, and position) whose values describe the association between adjacent pixels.  
The Large-Scale Mean-Shift (LSMS)-segmentation algorithm is a non-parametric and iterative clustering method that was introduced in 1975 by [PERSON] and [PERSON] [42]. It enables the performance of tile-wise segmentation of large VHR imagery, and the result is an artifact-free vector file in which each polygon corresponds to a segmented image containing the radiometric mean and variance of each band [33; 34]. This method allows for the optimal use of the memory and processors, and was designed specifically for large-sized VHR images [42]. The OTB LSMS-segmentation procedure is composed of four successive steps [33; 34]:  
1. LSMS-smoothing;
2. LSMS-segmentation;
3. LSMS-merging;
4. LSMS-vectorization.  
In the first phase, we tested the reliability of LSMS-smoothing in the segmentation process by adopting different values of the spatial radius (i.e., the maximum distance to build the neighborhood from averaging the analyzed pixels [35]). Starting from the default value of the spatial radius (5), we tested the following values: 5-10, 15, 20, and 30. However, considering that LSMS-smoothing did not improve the results of the segmentation process and is an optional step, we omitted it. Thus, we started from the second step (LSMS-segmentation).  
For this step, the literature was reviewed to make an informed choice of the values of the different parameters. However, all examined publications focus on the urban field and the use of satellite imagery. This highlights the lack of previous application of the method to the classification of plant species from UAV imagery. Thus, several tests were completed to assess different values of the range radius, defined as the threshold of the spectral signature distance among features and expressed in radiometry units [34; 35]. This parameter is based on the Euclidean distance among the spectral signature's values of pixels (spectral difference). Therefore, the range radius will have at least the same value of the minimum difference to discriminate these two pixels as two different objects. First, we measured the Euclidean distance of spectral signatures in several regions of interest, with particular attention given to cork oak. After that, we tested numerous values around the recorded minimum spectral distances (i.e., all values between 5 and 30 with steps of 1 unit).  
Given the segmentation result, the third step dealt with merging small objects with larger adjacent ones with the closest radiometry. The minsize (minimum size region) parameter enables the specification of the threshold for the size (in pixel) of the regions to be merged. If, after the segmentation, a segment's size is lower than this criterion, the segment is merged with the segment that has the closest spectral signature [33; 34]. For this parameter, we measured a number of smaller cork oak crowns so as to determine a suitable threshold value (Figure 10).  
The last step is LSMS-vectorization, in which the segmented image is converted into a vector file that contains one polygon per segment.