# Extraction of Visible Boundaries for Cadastral Mapping Based on UAV Imagery
## 2 Materials and Methods
### Visible Boundary Delineation Method and Workflow  
#### 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 [PERSON] [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  
Figure 1: (**a**) Cadastral map and ground control points (GCPs). (**b**) Manually delineated object visible boundaries used as reference data to determine the detection/extraction quality. (**a,b**) Overlaid on UAV orthoimage of Ponova vas, Slovenia (EPSG 3794). 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.