## 2 Automatic Geometric Corrections
### Automatic GCP Extraction
#### 2.1.2 Modifications of GCP Extraction Module for VHR Panchromatic Images  
On panchromatic VHR images of resolution far below 2 m (e.g., panchromatic WorldView-1/-2/-3/-4 and Pleiades images have resolutions mostly between 0.3 and 0.8 m), the previous GCP extraction module was not capable of delivering accurate GCPs. The main problem proved to be the detection of roads from raw satellite images. Namely, the morphological filtering (top-hat) could easily detect road edges, even road markings; however, it failed to extract the whole sections of roads that are--at this resolution--several pixels wide. The previous extraction of roads is replaced with a new method that combines object segmentation and classification algorithm to overcome this deficiency (Figure 3). All the other parts of the GCP extraction modules remained mostly unchanged. Figure 2: Detailed three-step workflow of the matching algorithm, which presents the core of the automatic GCP extraction module. The two-step algorithm is composed from coarse matching and fine positioning, while the three-step algorithm includes also the super-fine positioning. Although the proposed method takes more time (in average it needs almost 10x more processing time), it can accurately detect the road segments across their full width. The watershed transformation is used to segment the road network. Watershed transformation [27; 28] is an efficient procedure for image segmentation with a morphological algorithm. It is recognised as a powerful method, because it has the advantage of speed and simplicity [29]. The segmentation procedure implemented in the proposed algorithm works in four main steps:  
* First, the algorithm automatically detects the initial seeds for the region growing. The seeds are defined as the regional minima of a gradient image that is produced by edge detectors (differences at the boundaries). When generated, the gradient image is smoothed with a circular element where size is set relative to the image resolution. Additionally, a threshold is adaptively determined in the way that it only selects the seeds that are relevant for the image (based on resolution and radiometric range). The size of the smoothing element and the threshold determine the number and location of the seeds. In the end, the selected seeds are labelled. * A second gradient image is generated with sharp edges that constitute the limits of the final segments. * Starting from the seeds, region growing is then performed. The simultaneously growing patches result in a segmented image, where every segment is labelled and does not overlap with the neighbours. * The properties of the segments are computed and used in the classification part. The generated segments need to be classified, so that only those that possibly represent road segments are retained. The matching process between the extracted and reference road mask is very robust and it does not need the extracted mask to contain the whole road network. On the contrary, just its fractions are sufficient. For this reason and to speed-up the process of identifying the road segments, only a basic decision tree classification is performed. Since the classification of roads that are only based on spectral data is not feasible on panchromatic images, the classification mainly focuses on geometric properties that usually represent roads (i.e., it identifies small elongated segments). There are three properties that are employed to classify the road segments:  
* Area: Is defined as the total number of pixels in the segment [13]. A road has a relatively larger area when compared to other artificial objects. Figure 3: Flowchart of the proposed road extraction, starting with object watershed segmentation, and followed by classification of segments and generation of tiles. * Elongation: Is defined as the ratio between the major and minor axis of the segment [13]. Additionally, the ratio between the segment bounding box axes and the ratio between the bounding box and segment area are computed to retain the segments in the shape of crossroads.