SEMI-AUTOMATIC ROAD NETWORK EXTRACTION FROM DIGITAL IMAGES USING OBJECT-BASED CLASSIFICATION AND MORPHOLOGICAL OPERATORS

Abstract: The demand for geospatial data concerning road network is constant, due to the wide variety of application which needs this type of data. It stands out the importance of this data in cartography update cycles, that can be obtained using automated processes of feature extraction in digital images, which are more accurate, fast and less costly than the traditional methods. In this sense, this work aimed the road network extraction from RapidEye satellite imagery, by developing a hybrid methodology using techniques of object-based image classification and morphological operators. The methodology was tested in three different sites, with images acquired in distinct dates, and the extraction process was evaluated through metrics obtained from the linear matching procedure. By the proposed extraction process, were achieved in terms of correctness and completeness the values of 92.23% and 85.15% for test site 1, the values of 79.16% and 81.06% for test site 2, and the values of 82.05% and 92.22% for test site 3, respectively. The results shown that the proposed methodology presented a good performance for semi-automatic road network extraction from Rapideye images, representing an alternative to auxiliary road network database acquisition and updating.


Introduction
The digital images obtained by remote sensors deployed on aircraft or satellite platforms are the main source for detection and/or extraction of cartographic features, such as buildings, roads, rivers, vegetation, which provide data for mapping, cartographic database actualization and Geographic Information Systems (GIS) (Gallis, 2006).
Cartographic databases are fundamental tool for managements and planning in many humans activities. Since these databases have dense content of information for several activities and constitute the cornerstone for efficient and effective decision making. However, the Brazilian Cartography scenario is lack of cartographic products with suitable scales for developing a series of activities. In addition, some of these existing products are outdated over decades (according to the scale and region) (CONCAR, 2005). Therefore, it is necessary to focus the efforts in searching and developing alternative processes (semi-automatic / automatic) to overcome these problems and minimize the hard work made through traditional (manual) procedures of mapping, which are usually costly and timeconsuming, even in the digital environment.
In this context, the use of satellite images is of a great interest. Besides the possibilities of cartographic features acquisition and updating it, such images are relatively more economically accessible data sources with large temporary database, in addition to the spectral range available, and cover large territorial areas.
The technological advances in remote sensing (RS) satellite and sensors, allowed the imagery acquisition of Earth's surface with significant improvements in spatial, spectral and radiometric resolution, as well as high recurrence time. This opens new possibilities for the extraction of linear features such as road network (Bacher and Mayer, 2005).
A wide variety of application needs and requires the detailed, up-to-date and accurate information about road network. Therefore, this type of data are constantly in demand. Some examples of application include updating cartographic road databases, urban planning, transportation planning, infrastructure management, traffic and fleet management, car navigation systems, location based services, web-based applications, tourism and etc (Hinz and Baumgartner, 2000, Mayer et al., 2006, Babaali et al., 2014, Sujatha and Selvathi, 2015. Researches about detection and / or extraction of roads in aerial and satellite images have been accomplished since the 70's in digital photogrammetry and computer vision scientific community, with pioneering works by, e.g., Bajcsy and Tavakoli (1976) and Quam (1978).
As commented by Ishikawa et al. (2010), since then it has appeared different approaches, mostly seeking for automation processes to obtain the cartographic features (e.g., buildings, rivers, roads, and others). Although it is recognized by the difficulties of full automation in this area of knowledge, mainly due to the complexity of the images involved, in the face of great feature target diversity with different shapes, tones and textures.
The road extraction methods are characterized according to the level of automation, in two basic tasks inherent the extraction process: recognition and delineation. The recognition task depends of the semantic knowledge performed by a human to assign meaning to each object that are present in the image. On the other hand, the delineation task refers that each object in the image can be geometrically delineated through geometric and radiometric information. Thus, automatic methods address both (recognition and delineation) task, whereas semi-automatic methods address only the geometric delineation of the roads, leaving the high-level decisions (i.e., the recognition) to a human operator, who uses his ability to set the meaning to the object (road) (Dal Poz et al., 2005).
Dal Poz and Agouris (2000) argue that for road extraction, no full automatic approach has proven to be competitive against the ability of the human operator, and semi-automatic solutions have been proposed combining the human operator's ability to interpret with the computer's measurement capability. As stated by Bakhtiari et al. (2017), although a fully automatic approach requires no human intervention, this is not practical due to some limiting factors of automatic extraction of roads.
These limiting factors refers to background, neighborhood, road materials, obstructions of roads (e.g. vehicles, shadows, clouds), error of sensor, that increase the complexity of the scene and the current technology hasn't yet provided a satisfactory result of fully automatic approaches of road extraction. Therefore, in semi-automatic methods, human knowledge plays an important role in the first stage of road extraction (i.e., the recognition task -providing correct identification and segmentation of different objects), and these solutions have been the most researched (Li et al., 2009, Kumar et al., 2014, Bakhtiari et al., 2017. For a detailed review and surveys on the state of the art on road extraction methods from remotely sensed imagery, are recommended the works of Mena (2003), that surveys a bibliography of almost 250 references related to automatic road extraction methods from aerial and satellite imagery for GIS update purpose, Li et al. (2009) which describe basic ideas and approaches of semi-automatic extraction methods of the roads from high-resolution remote sensing image and gives a review and prospects for further development of road extraction. Either, the works of Babaali et al. (2014) presents an extensive bibliography of references describing automatic road network extraction from RS image and classify the methods according to a general classification and by to the different extraction techniques applied, and more Bulletin of Geodetic Sciences, 24(4): 485-502, Oct-Dec, 2018 recently, Wang et al. (2016) that analyzed different road features and road models, made a classification of the surveyed road extraction methods into different categories and performed comparisons of the distinct road extraction algorithms in terms of road features, test samples, shortcomings and performance.
The use of remote sensing images, allied with digital image processing (DIP) and analysis techniques, has led on achieving more meaningful results in feature extraction procedures, both in geometric and semantic terms (Gato et al., 2001;Silva et al., 2010).
With the improvements in digital images resolutions, the object-based image analysis (OBIA) has been in the spotlight in remote sensing community. This topic is detailed reviewed in Blaschke and Strobl (2001), Blaschke et al. (2008), Blaschke (2010) and Jawak et al. (2015), which exploit the potential of object-oriented classification faced with the traditional pixel-based classification methods for the extraction of information from remote sensing imagery.
The OBIA approaches has been commonly applied in land use/cover mapping, mainly using high spatial resolution imagery, as presented in Hofmann (2001), Taubenböck et al. (2010) and others. However, it is still little explored in the extraction of linear feature for cartography mapping purpose. Some related approaches adopting OBIA for road network extraction are presented in Potuckova et al. (2010), Kumar et al. (2014) and Miao et al. (2015), are all using high or very high spatial resolution images (i.e., Ikonos 2, QuickBird and Worldview 2 products with resolution's ranging from 0.5 m to 2.5 m).
It also stands out among DIP techniques the morphological operators from Mathematical Morphology theory (Serra, 1982;Soille, 2003). Due to the providing conditions on to analyzing the geometric structure of targets (roads, rivers, buildings, etc) presents in digital images, is a tool widely used in cartographic features extraction. As examples of some related works are Zhang et al. (1999), that used an approach for detecting road network from high resolution image and aerial photos using a combination of mathematical morphology operations, Castro and Centeno (2010) evaluated the roads extraction from ALOS images through the use of mathematical morphology, Silva et al. (2010) applied routines based on morphologic operators in order to detect cartographic features, particularly a segment of road from a QuickBird image, and Liu et al. (2015) put forward a method for urban main roads extraction of high-resolution grayscale imagery based on directional mathematical morphology and OpenStreetMap roads as prior knowledge.
According to Wang et al. (2016), the road extraction from RS images through mathematical morphology methods has been widely used to present certain advantages. However, in practical terms, the results are greatly affected by the choice of structure element (size and shape), which makes it difficult to obtain a high accuracy and good results in extraction process only by using mathematical morphology methods. These authors further suggest that in order to obtain more significant results in road extraction procedures from digital images, morphological operations should be applied in a combination with different others DPI methods and in different situations.
It is also necessary to emphasize that as relevant as the road network extraction method, it is the evaluation of the quality achieved by the extraction process. According to Maia and Dal Poz (2004), the evaluation of (semi-) automatic method of cartographic features extraction is essential, since it allows assessing the new extraction methodologies potential over traditional methods (which are based only on the human operator). Cardim et al. (2014) emphasize that once an extraction result is obtained by any of the several methods developed, it is of great importance being able to evaluate the quality achieved by this method of extraction. This paper presents a semi-automatic hybrid methodology developed for road network extraction from digital images that use an object-based image classification approach combined with morphological operators. The performance achieved by the proposed extraction method is evaluated by calculating statistical metrics such as correctness, completeness, quality and redundancy, through the linear matching procedure.
The remaining part of this paper is outlined as follows: Section 2 describes the study area, data and tools employed. Section 3 presents the proposed methodology for semi-automatic road network extraction. The evaluation of results is presented and discussed in Section 4. In Section 5 provided general conclusions and future perspectives.

Study area and data used
The study area used to this research is located in the near urban and rural zones of Rio de Janeiro state, in the southeast region of Brazil. For the research purposes, three sample sites of Araruama, Rio Bonito e Cabo Frio municipalities were chosen (see Figure 1). These sites are characterized by the presence of residential clusters, roads, vegetation and agriculture land. The road network consists of several paved (mainly by asphalt) and unpaved paths and roads that present in residential areas and open lands. In current work, three sample sets of RapidEye images (level 3A) obtained from Geo Catalog of Brazilian Ministry of Environment (MMA) website, through the Civil Engineering Department of Federal University of Viçosa (UFV), were employed. The first and second sample sets covering the test sites 1 (Araruama) and 2 (Rio Bonito) were acquired on October 09th and April 06th 2014, respectively, and the third one from February 20th 2015 covers the test site 3 (Cabo Frio).
As briefly overview, the RapidEye is a constellation of five earth observation satellites equipped with identical sensors, with the ability to acquire large-area multispectral image data with a daily revisit time (off-nadir); a ground sampling distance of 6.5m (at nadir) and resample of 5.0m (orthorectified); with five bands: blue (440 -510 nm), green (520 -590 nm), red (630 -685 nm), red-edge (690 -730 nm) and near-infrared (760 -850 nm) bands. The RapidEye standard processing level 3A (orthorectified) image product covers an area of 25 by 25 km, is radiometrically calibrated to radiance values, with 12 bits (stored in image files with 16 bits) and pixel size resample to 5 m spatial resolution (Rapideye, 2015).

Overview
The method developed in this work for semi-automatic road network extraction from digital images is based on two major processes: object-based image classification and morphological operations. The proposed approach was tested on three RapidEye scenes and the aforementioned processes include several steps, which will be detailed in the following sections. The flowchart on Figure 2 summarizes the developed approach.

Input image pre-processing
The methodology firstly implements a simple technique for atmospheric correction, in order to reduce the effects of atmospheric scattering on images employed and contribute to improving the results in the classification process. This is carried out using the Dark Object Subtraction (DOS) technique in ENVI software, which automatically searches (option used) each band image for the darkest pixel value and the atmospheric scattering correction is applied (if the darkest objects have any value greater than zero) by subtracting this value from every pixel in the band.

Object-based classification of features of interest (roads)
The object-based classification process applied to detect the features of interest (roads) in this study consists of two steps: image segmentation and rule-based classification. This process was developed in Envi Feature Extraction module (ENVI FX).
The segmentation step was carried out for the input images in order to obtain the objects. Thereby the Edge algorithm was used with the Scale Level of 40, which means to dispose of 40% of the lower values of the gradient image, allowing preserve only the better defined edges of the objects. In addition, to merge each similar adjacent segment, the Full Lambda Schedule algorithm was applied, setting a Merge Level of 80, for all five (5) spectral bands of the input images, and mask size of 5x5.
The values set to scale and merge level parameters above-mentioned were defined after performing several manual tests for all three input scenes. These values were the ones that delineate the features of interest better in all three cases.
After image segmentation, was developed a rule set for the classification process. The strategy adopted was to define a rule set that conditioned the classification for only features of interest into a single class and workflow. Through this procedure all other targets present in the images and that did not fit to the rules and parameters settled for the class of interest (roads) would not be classified.
The rules for road classification consider the following set of object descriptors (attributes): • Spectral Mean (Red band): spectral attribute corresponding to the mean value of pixels comprising the object / region in red band of the input images.
• Elongation: this attribute represents a measure of shape that indicates the ratio of the major and minor axes of the object. These axes are derived from an oriented bounding box containing the object; • Minor Length: also represents a measure of shape, obtained from the minor axis of an oriented bounding box enclosing the object; and • NDVI (Normalized Difference Vegetation Index): inserted as a custom attribute, the normalized difference vegetation index was obtained from the red and near-infrared (NIR) bands.
Among the list of possible attributes to be used, such as minimum and maximum values, standard deviation, texture mean, entropy, area, rectangular fit and others, after conducted tests only those aforementioned (based on spectral and shape values) were used since it presented a better performance for road classification. Only the red band was used among the five spectral bands of the RapidEye images, due to the high contrast of the targets of interest (roads paved and unpaved) and its surroundings ones.
In order to improve the classification process, the index of vegetation NDVI, calculated from the red and near-infrared bands, was incorporated as custom attribute to the rule. This index provides an interesting condition since it also presents very low values for areas with exposed soil, approximately 0 and 0.2 (Brasileiro et al., 2015), which is the predominant cover type of unpaved roads. In this way, the NDVI allows to filter out the vegetation of the extraction process and retain the segments with characteristics of unpaved roads at the same time.
Then, for road objects classification in all three test sites, two decision rules were implemented, that combine the multiple attributes selected and are associated with a single class named as Roads. These rules are based on some decision criteria, i.e., in addition to the selected attributes, thresholds (chosen from an Attribute Histogram) and weights assigned to the rules (that allows promoting one rule that effectively identifies the feature of interest over the other) and among attributes (equally distributed) were employed. A fuzzy membership function of the linear type, with a standard tolerance of 5% was also associated with all rules' attributes.
Therefore, from the defined rules, the objects are analyzed and classified or not in the class of interest (Roads) according to the conditions imposed by the decision rules. Although the rules developed preserve the same attributes, it was necessary adapted the thresholds values for some of these through analysis and manual selection on the attribute histogram, in order to fit the images of the test sites, as shown in Table 1.

Morphological processing operations
Through the rule-based classification process developed, it was possible to delineate the most relevant segments of the road network in the images under study. Nevertheless, some roads were not completely classified ("missing") and on the other hand, some features that are not of interest (noise) were also detected. Partially of this is due to the limitations imposed by the images used (for example, the spatial resolution that does not provide a condition to clearly discriminate some roads segments and the radiometric image quality).
Thus, routines based on morphological operators were applied, which allowed to obtain the roads missing as well as provide a solution to image pre-processing, filtering and refinements. These routines described in the sequence were implemented in MATLAB software environment.

Reconstruction of roads missing segments
In order to recover the road segments that were missing in the classification process, a morphological reconstruction (by dilatation) was employed. Briefly, the morphological reconstruction operation extracts the peaks spread out (or dilate) in a mask (conditioning) image that is touched by a marker image (Heneghan et al., 2002).
As marker image for morphological reconstruction was used a binary image produced from the results of object-based classification. In this image, the roads elements classified previously were assigned the value one (1) and to the background value zero (0).
The mask image is resulting from a morphological Top-hat filtering and following thresholding operation. The Top-hat filtering used the Red band of the input images and a square structuring element with size of 3x3 pixels. The thresholding operation enabled to create another binary image with the roads emphasized by the Top-hat filtering and the threshold values were based on the histogram shape analysis for each test site image.

Noise removal by morphological filtering operation
The previous step returns a complete image, i.e., with road segments obtained by the objectbased classification process filled with many segments of the feature of interest recovered by morphological reconstruction operation.
However, noise still remains together with the roads due to the threshold value chosen (based only on the histogram shape and the pixel brightness values) in addition to noise from classification errors.
Thus, in order to obtain a cleaner version of the image resulting from the previous step and preserve linear shapes at the same time, the supremum of the openings of the image with linear structuring elements with many different angular rotations was taken, as proposed in Heneghan et al. (2002) and namely as Opening with rotation operation in this work. For this purpose, twelve (12) linear structuring elements of 10 pixel length (size) and each 15º apart was used. It corresponds to rotate the structuring element in the range from 0º to 165º.
Several tests were carried out to investigate the best solution to the length of the structuring element and the number of rotation, in order to preserve linear elements but remove noise and non-road structures from the images. It is also important to emphasize that the choice of the most suitable values for these parameters depends on the presence of sinuosities (e.g. curve road segment etc) in the linear shapes and the amount of noise in the images.
By applying the Opening with rotation most of linear roads elements were preserved by at least one rotation. Although, many finer details of the roads were also removed together with noise and other non-road structures by such an operation. But these have been recovered by applying a morphological reconstruction operation, being the result of this step (Opening with rotation) inserted as the marker image and those obtained in item 3.4.1(described above) as the mask image. With these step, a significantly cleaner version of the road network image was obtained.

Further morphological operation to roads refinements
At this final stage, the road network centerline for the images of each test sites has been produced. First, it needed a further morphological operation to roads refinements, such as the connection of small missing road region, fill (remove) the spaces (holes) inside the road regions and remove unwanted objects.
Initially, morphological dilatation was used to connect the small missing road regions, and an iteration process was applied to the images of the test sites 1 and 2 under study with three and two iterations, respectively. To the image of the test site 3 any iteration was needed. In the sequence, the spaces inside the road regions were filled with the morphological closing operation. As the next step, area opening operation (also a morphological task) is applied to remove all unwanted objects smallest than a certain number of connected pixels that are not part of the roads (10 pixels to test site 1 and 100 pixels to test site 2 and 3). In all of these operations, a square structuring element with a size of 3x3 pixels was used.
After that, the morphological thinning was applied on the output images of the area opening operation. Then, the road network centerline was extracted by reducing all road regions to single pixel thickness.

Results assessment and discussion
As results of the developed methodology, the road network was semi-automatic extracted from three sample sets of RapidEye images. The results from main performed steps of proposed method are given in Figure 3. First is shown the results of object-based classification process applied to detect the roads features (Figure 3 a1, a2 and a3) of each the test site. The results of morphological Top-hat filtering following by thresholding operation, used on the reconstruction of road segments missing, are given in Figure 3 b1, b2 and b3.
The proposed method implemented morphological reconstruction operations, and its results are shown in Figure 3 c1, c2 and c3. After performed further morphological operations for refinements such as dilation, closing, area opening and thinning, the final road network was obtained (Figure 3 d1, d2 and d3).
Bulletin of Geodetic Sciences, 24 (4) In order to quality assessment of road network achieved by the proposed extraction method, a program developed by Cardim et al. (2014) was used. This program implements a variation of the linear matching procedure established by Heipke et al. (1997) and Wiedemann (2003), that it is able to calculate statistical values for quality metrics (such as correctness, completeness, quality and redundancy) about the result of an extraction method, using or not an acceptance buffer (tolerance area).
To perform the quality measures, the extracted road network (Figure 4 a2, b2 and c2) was compared with roads from field data collection using GNSS (Global Navigation Satellite System) receiver, as reference data, that were provided by Teixeira (2016). In addition, some roads manually drawn by image interpretation were necessary to complete the road data collected in the field and to cover the entire road network presented in the images used, seen in Figure 4 a3, b3 and c3. Then, the comparison was carried out, considering a tolerance area of one pixel size around either extracted and reference road network. The results of the evaluation are summarized in Table 2.
Figure 4: Original RapidEye images (a1, b1, c1), semi-automatic extracted road network (a2, b2, c2) and reference road network (a3, b3, c3) used to evaluate the extraction method, for (a) test site 1, (b) test site 2, and (c) test site 3. The quality values demonstrated that the extraction results were most satisfactory for the test site 1 and 3 (79.40% and 76.68%, respectively) since quality metric has shown more than 75% matched between the reference and the road network resulting from the semi-automatic extraction process proposed. For the test site 2 was obtained that only 66.74% of the roads extracted agreed to the reference one. Furthermore, low redundancy values were achieved to all three test sites.
As can be seen, major parts of the road networks have been extracted by the proposed methodology, nevertheless some road segments were not properly extracted and false positives occurred. The first case is mainly due to obstacles in the roads, shadows and / or low contrast of the interest feature, and these occurrences are evidenced by the completeness values. In the second case, the false positives are mainly due to spectral confusion among roads and others unwanted targets that the proposed extraction method failed to separate only those of interest. The correctness value reflects this last case.
In the research conducted by Mayer et al. (2006), where different approaches for road extraction were evaluated according to linear matching procedure and using a tolerance area similar to the one employed in this present work, was reported that the road extraction results become practically useful when the lowest needed limit of correctness and completeness are beyond a value of 75% or 60%, respectively. Furthermore, it is also commented that to be of real practical importance, in many cases both values probably need to be even higher.
Thus, by drawing a parallel between the completeness and correctness values, obtained through the proposed extraction method in this work, with the values suggested by Mayer et al. (2006) and taken as a reference, it has that the road network extracted in all three test sites are potentially useful to practical applications.
In general, the main roads segments present in the input images were detected through the object-based classification procedure. The parameters used in the segmentation step provided a good delineation of the features of interest and other homogeneous regions, as the vegetation and bare soil that were well segmented, achieving a good separation. However, in residential clusters, it was difficult to partition the regions due to the spectral confusion in this environment and the resolution of the images. In the rule-based classification step, the attributes assigned to the rules were essential to delineate the roads. In this context, stands out the custom attribute NDVI, that provide a condition to filter out the vegetation of the extraction process, even in the scenes with less vegetation cover, and retain the segments with characteristics of unpaved roads at the same time, due to the sensitivity capacity of this index.
The morphological operations applied were of fundamental importance. These operations allow reconstructing road segments missing in the classification process, besides providing a solution to image pre-processing, filtering and refinements of the road network.
The proposed extraction method is sensitive to partial or total occlusion in the road network by, e.g, by trees and shadows. In these cases, the road network could not be extracted from the images.

Conclusions
In this paper, a semi-automatic approach to achieve road network extraction from digital images was shown. The proposed method is based on the combination of object-based image classification and mathematical morphology operations.
The methodology was applied to RapidEye images in three test sites. Despite some fails and false positives, by the proposed extraction method, in all cases, the main roads network, both paved and unpaved, was successfully extracted from the images.
Regarding the evaluation road network extraction process, in terms of correctness and completeness measures, were obtained the values of 92.23% and 85.15% for test site 1, values of 79.16% and 81.06% for test site 2, and values of 82.05% and 92.22% for test site 3, respectively.
The performance and accuracy achieved by the proposed method, applying the parameters and threshold values chosen as the most appropriate ones, provided satisfactory results and indicate the potential of the approach as an alternative to auxiliary the acquisition and updating road network database.
It is stands out that the applicability of the results achieved through the proposed methodology, for example, in order to compose or update a cartographic database, still require further postediting intervention, including format conversion (e.g., raster to vector data), edit attributes, topology correction and some cartographic generalization procedures.
As main difficulties encountered in the proposed extraction method, was to determine the optimal parameters and the most suitable thresholds values for segmentation and morphological procedure, as ones that provide the best delineation of the features of interest (i.e. road features) for the model applied in all three test sites. This is partially, due to the limitations imposed by the images used as inputs, where some roads are unclear and tough to distinguish from other objects in the scenes.
The future works comprise applying the proposed methodology to others remote sensing images with different resolutions. Improvements on classification rules, the use of more robust platforms and auxiliary data to overcome the limitations of the proposed method are also the future goals.