Extraction of roads from satellite images using MATLAB
Research Article
Open Access
CC BY

Extraction of roads from satellite images using MATLAB

Zhengxi Wu 1*
1 Fuzhou University
*Corresponding author: zhengxi.wu@gmail.com
Published on 7 February 2024
Volume Cover
ACE Vol.38
ISSN (Print): 2755-273X
ISSN (Online): 2755-2721
ISBN (Print): 978-1-83558-301-2
ISBN (Online): 978-1-83558-302-9
Download Cover

Abstract

Satellite imagery is increasingly being used in geographic information and urban planning, with road detection being one of its important tasks. However, traditional road detection methods have some limitations, such as poor handling of sharp turns and intersections. Therefore, the development of automatic road tracking methods based on morphological principles is of significant importance. This study addresses the urgent need for efficient and accurate road detection in satellite images. By combining morphological principles and convolutional operations, the proposed method can accurately identify road networks in complex environments. The advancement of this automatic road tracking technology holds great potential for improving navigation systems and urban planning, greatly enhancing the efficiency and accuracy of road information extraction. Additionally, this technology has far-reaching implications for urban planning. By more accurately capturing road layouts, urban planners can develop more reasonable road construction plans, optimize traffic flow, and improve the quality of life for city residents.

Keywords:

Digital Morphology, Convolution, Dilation, Erosion, Skeleton Clipping

View PDF
Wu,Z. (2024). Extraction of roads from satellite images using MATLAB. Applied and Computational Engineering,38,161-169.

1. Introduction

With the continuous advancement of satellite remote sensing technology, satellite imagery has become a crucial means of acquiring surface information. However, satellite images often contain significant amounts of interference, such as buildings, trees, and more, which complicates the extraction of target information like roads. The primary focus of this study is to effectively extract road information from satellite images. This involves accurately distinguishing roads from other interferences and appropriately processing the images to achieve optimal road extraction results. To address the aforementioned issues, we employed morphological techniques. Specifically, we first enhanced image contrast to improve the computer's ability to recognize objects within the images. Then, we utilized convolution erosion and dilation techniques to selectively remove non-road interferences like buildings and trees. Through these morphological operations, we were able to better emphasize road features, thereby achieving effective road information extraction.

The significance of this study lies in providing an effective method for accurately extracting road information from complex satellite images. This is important in fields such as urban planning and traffic management. Additionally, by employing morphological approaches, we offer a novel perspective and methodology to the field of image processing. We were able to extract road information from satellite images and validated the effectiveness and outcomes of our method by comparing images before and after processing. This contributes to enhancing the computer's recognition capabilities concerning satellite images and provides more accurate surface information for various practical applications.

2. Design methodology

This project primarily employs convolution dilation and erosion techniques, as well as gradient computation methods, which fall under the domain of morphology [1]. The primary objective of these tools is to enhance image quality through the process of resizing, both enlarging and reducing the dimensions. The desired matrix, referred to as the kernel, is specified within a 3x3 range. Following the convolution operation, the pixel value is determined as the maximum value within the 3x3 neighborhood centered on the pixel [2]. By employing this method, the objective of increasing the pixel count can be accomplished (see Figure 1B). Next, the distractor term is expanded and inverted in order to obtain the erosion term (Figure 1C). Ultimately, the gradient calculation is employed to obtain the contour, as depicted in Figure 1D.

A

B

/word/media/image1.png

/word/media/image2.png

C

D

/word/media/image3.png

/word/media/image4.png

Figure 1. The image obtained after various technical operations.

1A: Original image of example., 1B: Image after Dilation, 1C: Image after Erosion. 1D: Image after Gradient Computation.

The flowchart for the specific operation is shown in the following diagram (Figure 2):

/word/media/image5.png

Figure 2. Road extraction process using principles of image analysis.

In the subsequent section, we shall elucidate the distinct process of our project from multiple perspectives.

2.1. Extraction of Roads

In order to obtain the satellite imagery of the road, it is necessary to import the images into MATLAB. Subsequently, the images will be converted into a grayscale representation, as depicted in Figure 3. This conversion is essential for the subsequent extraction of road-related data.

The following is the MATLAB code:

A = rgb2gray(I);

figure;

imshow(A);

figure;

imhist(A);

The observed outcome is as follows:

/word/media/image6.png

/word/media/image7.png

A

B

Figure 3. Convert the image to grayscale.

3A: Gray Graph, 3B: Grayscale Histogram.

2.2. Change the picture into a binary graph

We use MATLAB to separate road information from other information. Based on the data presented in Figure 4, roads are depicted using white images, while other relevant information is visually represented in black. This facilitates the execution of subsequent image processing tasks.

The following is the MATLAB code:

B = A > 140;

figure;

imshow(B);

The observed outcome is as follows:

/word/media/image8.png

Figure 4. Binary Graph.

2.3. Convolution dilation and erosion

The application of the convolution expansion principle allows for the enlargement of the road dimensions within the satellite image, resulting in an enhanced and more distinct representation of the road. In order to enhance the processing of road images, the convolution erosion technique is employed to extract the white error associated with the road. This enables a more accurate differentiation between the road and surrounding structures, such as buildings. Ultimately, the processed white image is subtracted from the black image in order to obtain the base image. The depicted procedure is illustrated in Figure 5.

The following is the MATLAB code:

sa = ones(6, 6);

C = imdilate(B, sa);

figure;

imshow(C);

E = bwmorph(C, 'skel', 6);

figure;

imshow(E);

F = bwmorph(E, 'spur', 20);

figure;

imshow(F);

sc = ones(4, 4);

G = imerode(F, sc);

figure;

imshow(G);

H = imsubtract(F, G);

figure;

imshow(H);

I = bwmorph(H, 'clean', 10);

figure;

imshow(I);

The observed outcome is as follows:

/word/media/image9.png

/word/media/image10.png

A

B

/word/media/image11.png

/word/media/image12.png

C

D

Figure 5. Perform convolution dilation and erosion operations on road images.

5A: Road image after Dilation, 5B: Road image after Skeleton Processing, 5C: Road image after Trimming (Burr processing), 5D: Road image after Erosion.

2.4. Processing of Image Details

The initial image captured by our team will inevitably exhibit some imperfections, such as distortions and artifacts, which are contingent upon factors such as image resolution and architectural conditions [3]. Based on the findings presented in Figure 6, it is possible to mitigate the presence of burrs in the image road image by employing the clipping function available in MATLAB. Ultimately, the image quality can be enhanced through the process of noise reduction.

The following is the MATLAB code:

H = imsubtract(F, G);

figure;

imshow(H);

I = bwmorph(H, 'clean', 10);

figure;

imshow(I);

J = imcomplement(I);

figure;

imshow(J);

The observed outcome is as follows:

/word/media/image13.png

/word/media/image14.png

A

B

/word/media/image15.png

C

Figure 6. Perform detailed operations on road images.

6A: Image Subtraction, 6B: Noise Processing, 6C: Imcomplement Processing.

2.5. Comparison

Original Image

/word/media/image16.jpeg

Extracted Road

/word/media/image15.png

Figure 7. Comparison with the original image after the final operation.

7A: Original satellite road image, 7B: Road extracted after multiple operation.

3. Results & discussion

3.1. Results & Analysis

Up to this point, the fundamental objective of this project has been successfully accomplished, namely the extraction of road networks from satellite imagery. The impact of the project is illustrated in Figure 7.

Based on the comparative analysis conducted, it can be inferred that the program possesses the ability to accurately extract road information. However, it is evident that a disparity persists between our anticipated outcomes and the actual state of affairs. There are several potential reasons that can be considered:

To begin with, it is important to consider the inherent constraints associated with the image. Satellite imagery was obtained from the platform Zoom Earth. However, the image's resolution is insufficient, resulting in poor recognition of the road.

Additionally, there exist inaccuracies in the manual threshold selection process. According to the morphological approach, it is necessary to convert the satellite image into a grayscale representation in order to facilitate the extraction of road-related data.

The grayscale threshold necessitates manual adjustment. In conclusion, we select the image (Figure 3B) with a threshold value of 140, as it demonstrates the most prominent delineation of the road.

B = A > 140;

figure;

imshow(B);

The manual determination of the threshold is characterized by a lack of precision. It is inevitable that errors will occur. Finally, it is imperative that we do not furnish the program with a means to ascertain the parameters of the roadway. Herein lies a more comprehensive examination of the aforementioned assertion. The criterion for the road infrastructure we offer to the program is based on a spectrum of grayscale intervals. Regrettably, our program is unable to provide a more detailed explanation of the purpose and function of a road. The core factor that we posit as the cause for the disparity between our expectations and the actuality is believed to be the aforementioned.

3.2. Additional Discussion

In addition, we engaged in a discourse with our colleagues who possess expertise in the field of Computer Science, wherein we deliberated upon the obstacles encountered throughout the course of the project. Subsequently, they adeptly resolved the aforementioned predicament by employing the k-means clustering methodology. The k-means clustering algorithm is a technique used for vector quantization. The process of clustering involves the partitioning of n observations into k clusters, wherein each observation is assigned to the cluster that has the closest mean, also known as the cluster center or cluster centroid [4,5].

Python was employed for the implementation of this project, where the utilization of k-means was pivotal for data processing. Each individual point was treated as a 3D vector, with its components corresponding to the RGB channels. The clustering process was primarily driven by the similarity of pixel colors, which are represented by these 3D vectors. Consequently, pixels sharing a high degree of similarity were assigned the same color, as shown in figure 8.

/word/media/image17.jpeg

Figure 8. Using k-means clustering to group similar RGB pixels. ( The extracted road is represented by the red portion in the image.)

It is evident that the roads obtained through the utilization of k-means clustering exhibit a higher level of accuracy in comparison to those derived through morphological approaches. This finding offers a promising avenue for further investigation in the realm of study. In subsequent endeavors, we are inclined to explore the application of this technique in MATLAB for the purpose of extracting road networks from satellite imagery.

4. Conclusion

In this study, we applied morphological techniques to satellite imagery to extract road information, with MATLAB serving as the primary tool for project implementation. Through contrast enhancement, we improved the computer's capability to discern features within satellite images. Noise reduction was achieved using convolutional erosion and dilation methods. Additionally, our exploration of the k-means clustering method provided valuable insights, offering an enticing avenue for potential future research. Further investigation into this approach holds great potential for forthcoming endeavors.

The road segments derived from satellite imagery initially aligned with our predetermined criteria. Nevertheless, the level of precision provided by these devices is insufficient for applications that demand a high degree of accuracy, such as scientific surveying and mapping. Our forthcoming objective is to enhance the precision of road extraction. Our organization remains dedicated to persistently pursuing the goal of accurately extracting road networks from satellite imagery. Nevertheless, our study has some limitations. Firstly, while morphological methods were employed for road extraction, their effectiveness might be hindered in complex terrain and diverse road scenarios. Combining other image processing techniques, such as deep learning, could address this concern. Secondly, our method may be sensitive to noise and poor image quality, thereby affecting extraction accuracy. To address this limitation, advanced noise reduction and image enhancement techniques could be incorporated.

In future research, one notable direction is delving into deep learning approaches for satellite image processing, particularly convolutional neural networks (CNNs) [6]. These techniques hold significant potential for learning and extracting image features, possibly enhancing road extraction precision and robustness. Furthermore, exploring interdisciplinary collaboration, such as integrating road extraction with Geographic Information Systems (GIS), could facilitate practical applications in surveying and planning tasks [7].

References

[1]. Jiuxiang, H., Razdan, A., Femiani, J., Wonka, P., & Ming, C. (2006). Fourier shape descriptors of pixel footprints for road extraction from satellite images. In 2007 IEEE International Conference on Image Processing, ICIP 2007 Proceedings [4378888] (Proceedings - International Conference on Image Processing, ICIP; Vol. 1). https://doi.org/10.1109/ICIP.2007.4378888

[2]. Ximing Wang, Hongrui Zhao, Baojun Fang, Gang Fu, and Wei Wang "The development of road information extraction from remote sensing images", Proc. SPIE 7285, International Conference on Earth Observation Data Processing and Analysis (ICEODPA), 72850U (29 December 2008); https://doi.org/10.1117/12.815930

[3]. LI Li-Wei, LIU Ji-Ping, YIN as. Road extraction from high-resolution remote sensing images based on mathematical morphology[J]. Remote Sensing Information, 2005(5):9-11. DOI:10.3969/j.issn.1000-3177.2005.05.003.

[4]. J. Xu and K. Lange, “Power k-means clustering,” in 36th International Conference on Machine Learning, ICML 2019, 2019, vol. 2019-June.

[5]. H. P. Kriegel, E. Schubert, and A. Zimek, “The (black) art of runtime evaluation: Are we comparing algorithms or implementations?,” Knowl Inf Syst, vol. 52, no. 2, 2017, doi: 10.1007/s10115-016-1004-2.

[6]. Mnih, V. , & Hinton, G. E. . (2010). Learning to Detect Roads in High-Resolution Aerial Images. Computer Vision - ECCV 2010 - 11th European Conference on Computer Vision, Heraklion, Crete, Greece, September 5-11, 2010, Proceedings, Part VI. Springer, Berlin, Heidelberg.

[7]. Gecen, R. , & Sarp, G. . (2012). ROAD DETECTION FROM HIGH AND LOW RESOLUTION SATELLITE IMAGES. (Vol.23, pp.S154-S155).

Cite this article

Wu,Z. (2024). Extraction of roads from satellite images using MATLAB. Applied and Computational Engineering,38,161-169.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

About volume

Volume title: Proceedings of the 2023 International Conference on Machine Learning and Automation

ISBN: 978-1-83558-301-2(Print) / 978-1-83558-302-9(Online)
Editor: Mustafa İSTANBULLU
Conference website: https://2023.confmla.org/
Conference date: 18 October 2023
Series: Applied and Computational Engineering
Volume number: Vol.38
ISSN: 2755-2721(Print) / 2755-273X(Online)