2.3.1. ENVI Feature Extraction (FX)

The investigated tool, ENVI FX, is a combined process of image segmentation and classification. The focus of this study is only at image segmentation and calculating spatial attributes for each segmented object [41]. In addition to spatial attributes, spectral and textural attributes are often used by users for further image classification analysis.

The first step, image segmentation, is based on the technique developed by Jin [43] and involves calculating a gradient map, calculating cumulative distribution function, modification of the gradient map by defining a scale level, and segmentation of a modified gradient map by using the Watershed Transform [44]. A gradient is calculated for each band of the image. The ENVI FX module uses two approaches: edge method and intensity. The edge method calculates a gradient map using the Sobel edge detection algorithm [44]. The Intensity method converts each pixel to a spectral intensity value by averaging it across the selected image bands [44]. The edge method is used for detecting features with distinct boundaries and is considered in this study. In contrast, the Intensity method is suitable for digital elevation models, images of gravitational potential and images of electromagnetic fields [44]. After a gradient map is calculated, a density function of gradients over the whole map is calculated in the form of a cumulative relative histogram [43]. Once the cumulative distribution function has been calculated, it can be used along with the gradient map to calculate the gradient scale space [43]. The gradient map can be modified by changing the scale level. The scale level is the relative threshold on the cumulative relative histogram from which the corresponding gradient magnitude can be determined [43]. For example, at a scale level of 50, the lowest 50 percent of gradient magnitude values are discarded from the gradient image [44]. Increasing the scale level results in fewer segments and keeps objects with the most distinct boundaries [41]. Once the scale level is selected the Watershed Transform algorithm is applied to the modified gradient map. The Watershed Transform is based on the concept of hydrologic watersheds [22,35]. In digital imagery, the same process can be similarly explained as the darker a pixel, the lower its "elevation" (minimum pixel). The algorithm categorizes a pixel by increasing the greyscale value, then begins with the minimum pixels and "floods" the image, dividing the image into objects with similar pixel intensities. The result is a segmented image and each segmented object is assigned with a mean spectral value of all the pixels that belong to that object [44].

The second step is merging. This step aggregates over-segmented areas by using the ENVI FX default full Lambda schedule algorithm. The algorithm is meant to aggregate object outlines within larger, textured areas, such as trees and, fields, based on a combination of spectral and spatial information [41,45]. The merge level represents the threshold Lambda value. Merging occurs when the algorithm finds a pair of adjacent objects such that the merging cost is less than a defined threshold Lambda value—if the merge level is set to 20, it will merge adjacent objects with the lowest 20 percent of Lambda values [45]. When a merge level of 0 is selected no merging will be performed. In this step, the selection of Texture Kernel Size is optional, i.e., the size of a moving box centered over each pixel value. The ENVI FX default Texture Kernel Size is 3, and the maximum is 19 [45].

The final step is the export of object boundaries in a vector format and a segmented image in a raster format. Moreover, each extracted object consists of spatial, spectral, and texture information in the attribute table [41].

#### 2.3.2. Visible Boundary Delineation Workflow

The visible boundary delineation workflow (Figure 2) consists of four main steps. In the following, each workflow step is described in detail with additional comments based on our own preliminary studies aiming to understand and justify the selection of the parameters and algorithms used. The first and second steps were implemented in ENVI 5.5 image analysis software [46] by using the ENVI FX [47] tool. The other steps were implemented using QGIS [48] and GRASS [49] functions.


i.e., 3. In addition, further object extractions were tested at the highest texture kernel size and no differences in the number and locations of extracted objects were identified. Scale level values ranged from 50 to 80 and merge level values from 50 to 99. The initial incremental value for both scale and merge levels was 10. In cases where a jump in the total number of extracted objects was detected the incremental value was dropped for both scale and merge levels. In order to identify the optimal scale and merge values for the detection and extraction of visible objects for cadastral mapping, all possible range values of scale and merge combinations were tested. For each extraction information about the total number of extracted objects and processing time was stored. This resulted in 50 boundary maps for each resampled UAV orthoimage. The boundary map consisted of extracted objects (polygon-based), which were in digital vector format.


**Figure 2.** Cadastral mapping workflow based on the automatic detection and extraction of visible boundaries from UAV imagery.

**Figure 3.** Object-based accuracy assessment method—buffer overlaying method. (**a**) Matched reference. (**b**) Matched extraction. (**a**,**b**) Calculation of boundary lengths of true positives (TP), false positives (FP) and false negatives (FN) (Adapted from [50]).
