Road Extraction From Satellite Images
Need for Road Extraction :
In today’s world of growing population, the need for urban planning is very high. In this project, A robust and efficient method for the extraction of roads from a given set of satellite images is explained. Roads play a vital and important role in urban planning and thus, its extraction can be of great help. The other applications of road extraction are : identification of isolated buildings that need to be detected and updating of GIS database according to the requirements of the human expertise. In this method, roads are extracted solely based on their color. The steps in the algorithm are easy to follow and implement. It is also less time consuming and an automatic method.
Road extraction plays one of the major roles in many applications regarding the betterment of present human lives. Thus, the need for road extraction using a robust and efficient method is also high. Currently, there are many ways to extract roads manually and automatically. There are many methods to extract roads but the main disadvantage of them is the difficulty to provide the best parameters for a particular image. Road extraction explained in this paper depends only on the color of the road. The advantage of this method is that road images from any type of satellite can be used provided it has more than 0.5m resolution. Here, the images considered are multispectral images. Multispectral images are those images that consist of three or more spectral bands. Any type of roads can be extracted based on their color. The algorithm is implemented using MATLAB software.
Steps Involved :
The first step in this method is the creation of a database. The database should contain satellite road images whose road intensity values are within a particular range. By considering different intensity ranges, any type of roads can be extracted. The basic steps involved in the algorithm are described in the figure given below.
The given input image is converted to a grayscale image and then the grayscale image is adjusted to the threshold values of the road. The obtained image is then converted to a binary image with a threshold value taken from graythresh() i.e., Otsu’s method. Then the image is filtered using a median filter to remove noises and it still contains unwanted objects and those are removed using morphological operations, edges of the extracted road are determined and finally, the extracted road is overlaid onto the original image.
Extraction Algorithm :
At first, the image is converted into a grayscale image and then it is adjusted from threshold range 0.5 to 0.9(as most of the roads contain this range) to remove unwanted stuff. Below is the image that shows the image obtained after adjusting.
Then the image is converted to a binary image using ‘graythresh’ i.e., Otsu’s method which automatically sets the threshold value for the conversion. The figure below shows the image obtained after converting to binary.
In Otsu’s method, we exhaustively search for the threshold that minimizes the intra-class variance (the variance within the class), defined as a weighted sum of variances of the two classes:
Where W0 and W1 are the probabilities of the two classes separated by a threshold t, and sigma not and sigma one are the standard deviations of these two classes.
Otsu shows that minimizing the intra-class variance is the same as maximizing inter-class variance.
The class probabilities and class means can be computed iteratively. This idea yields an effective algorithm.
On the binary image obtained, median filtering is done to remove the noise that affects the satellite image. When considering different types of filters, the median filter is the aptest one to reduce noise in a satellite image. Following is the image after median filtering.
From the median filtered image small objects are removed which are unnecessary and whose pixels are less than 60 using ‘bwareaopen’. This helps in removing buildings and small parking slots. The image after removing small pixels is given below.
The image still contains many unwanted pixels. One of the easiest ways to eliminate unwanted objects from an image is by applying morphological operations. Morphological operations are those operations used to remove undesired pixels based on the foreground and the background of an image. Since the operations are done on the binary image, the MATLAB function used is ‘bwmorph’. The figure obtained after applying morphological operations is given below.
After applying the morphological operations we get the clean roads but it is very important to obtain the edges of these roads for clear identification of the roads. Gradient filter is used for the edge detection and the type of operator used for the detection is ‘sobel’. Sobel operator is used because the edges are extracted with greater accuracy. The edges of the roads are shown in the following figure.
The final step is to overlay the extracted road onto the scalar image of the original image. Overlaying of the result helps to illustrate the accuracy of the road extraction. In the final image, the thin lines indicate the paths of roads in the image. The final image is given in below.
The algorithm introduced is an automatic one. It requires only very little interaction from the users. The algorithm was implemented to detect roadways from satellite images with a resolution greater than 0.5m. The important and key parameter of this algorithm is the color of the roads in the database. Different types of roads can be extracted based on this algorithm. Since extraction is solely based on color, some of the barren lands and small areas of parking lots are also being extracted. This is because the locations also have the same pixel intensity values as that of roads. Different other techniques such as the usage of Digital Elevation Models (DEM), active contours and artificial intelligence methods could be included to remove the unwanted objects that are being extracted. The algorithm implemented is fast, robust and easy to understand and implement.
If interested, can visit my Github account for code: https://github.com/rajayalla98/Road-Extraction-from-Satellite-Images and don’t forget to give a star.