An Application Study on Road Surface Monitoring Using DTW Based Image Processing and Ultrasonic Sensors

Application: Road surface monitoring for severe conditions. Abstract: Road surface monitoring is an essential problem in providing smooth road infrastructure to commuters. This paper proposed an efficient road surface monitoring using an ultrasonic sensor and image processing technique. A novel cost-effective system, which includes ultrasonic sensors sensing with GPS for the detection of the road surface conditions, was designed and proposed. Dynamic time warping (DTW) technique was incorporated with ultrasonic sensors to improve the classification and accuracy of road surface detecting conditions. A new algorithm, HANUMAN, was proposed for automatic recognition and calculation of pothole and speed bumps. Manual inspection was performed and comparison was undertaken to validate the results. The proposed system showed better efficiency than the previous systems with a 95.50% detection rate for various road surface irregularities. The novel framework will not only identify the road irregularities, but also help in decreasing the number of accidents by alerting drivers.


Introduction
Treacherous road surface conditions are a significant problem for safe and comfortable transportation. The importance of road infrastructure for society can be compared with the importance of blood vessels for humans. For better road surface quality, it should be monitored continuously and repaired as necessary. The optimal distribution of resources for road repairs is possible by providing the availability of comprehensive and objective real-time data about the state of the roads. Developing countries with an escalating economy have an enormously extensive network of roads. Events within the past have shown that countries like the USA have invested about $68 billion a year on the maintenance of roads, bridges, and highways. These potholes also contribute to the degradation of suspension and fuel efficiency. In India, roads are the most common means of mobility; roads carry 90% of passengers and 65% of freight. Even with such a massive network, traveling is tiring in India as the roads are not sufficiently wide and the maintenance is inadequate. Regardless of where you are, driving is a stressful and potentially life-threatening affair. Over the last two decades, with an exponential rise in population, the number of vehicles has increased at a tremendous rate. The road infrastructure is not at par with the number of vehicles to support it, resulting in traffic congestion and accidents. As the ECONOMIC TIME's report of January 2018 suggests, at the very least, 400 people lose their lives every day in the country to road accidents due to potholes [1].
According to the report, "Road Accidents in India, 2016 [1] ", by the Ministry of Road Transport and Highways, there were 480,652 road accidents in 2016 as opposed to 501,423 in 2015. However, fatalities resulting from these accidents have risen by about 3.2%, which means that nearly 150,785 people were killed in 2016 compared to 46,133 in 2015 [1]. In India, most of the vehicles (unusually small hatchbacks) sold are either a 0-star rating or a 1-star rating in correspondence to the European standards, which implies that there could be fatal injuries even at moderate speeds. A considerable amount of research has been conducted on reducing traffic congestion and the number of evergrowing accidents. Vast sums of money are spent on repairing these potholes and bumps, however, small developing countries cannot afford to invest these amounts, which are a significant cause of road degradation. Irregularities on the road such as potholes caused by activities like erosion, weather, traffic, and some other factors may lead to accidents. Moreover, human-induced bumps such as speed breakers, which are made in the form of speed bumps, are used to control the speed of the vehicles, but they are not distributed at even distances, and the heights of the speed bumps have not been scientifically justified, which could also cause accidents. While said obstacles ought to be signaled according to specific road regulations, they are not always correctly labeled. One of the primary goals of this research was to detect road irregularities and decrease the number of accidents and fatalities. This approach is cost-efficient and can be applied worldwide. Generically, in modernday field practices, the evaluation of the road irregularity data is done entirely via the raw data assessment [2]. Several road irregularity stats are used for the same. The existing technique can be categorically classified into three main types: imaging-based, sensor, and manual techniques.
There has been a substantial amount of research done in the past on the detection of potholes [3][4][5] using various techniques like reconstruction using laser [6], stereo vision [7,8], Light Detection and Raanging (LIDAR) [9], ultrasonic [10][11][12][13], etc. Forrest et al. [10] proposed a method of detecting road surface disruptions based on ultrasonic sensors in which the pothole detection rate of 62% was achieved on a paved road. Singh et al. [11] used a global positioning system receiver and ultrasonic for the identification of geographical location coordinates of the detected potholes and speed breaker with 59.23% efficiency. Madli et al. [12] worked on the automatic detection and notification of potholes and humps on roads to aid drivers using ultrasonic and a Global Positioning System (GPS). It was found that the system was 74% efficient and the data could be stored in the cloud. Shivaleelavathi et al. [13] also proposed an intelligent system using an ultrasonic sensor based on Raspberry Pi, GPS, and ultrasonic to take corrective measures. Devapriya et al. [14] proposed a realtime system that detected speed bumps by the analysis of photos of the road that were further enhanced using a Gaussian Filter (computer vision technique). This system had a correct rate ranging from 30% to 92%; however, failure was witnessed for faded speed bumps, and for a higher price, they had to be painted and maintained; this was a significant drawback of the system. Eriksson et al. [8] established the patrol system that comprised of a GPS and a 3-axis accelerometer for the detection of potholes. Likewise, Chen et al. [15] used the very same system and evaluated the power spectral density (PSD) for the detection of pavement irregularities using Fourier transformations. Inaccurate location of the irregularities was a shortcoming of the system. Nericell was a system developed by Mohan et al. [7] that comprised of amici, global system for mobile communication (GSM), accelerometer, and GPS sensors for road surface monitoring. The method yielded a False Negative Rate (FNR) of 37% and 41% for low speed and high-speed bumps, respectively. The use of smartphones, an adaptive fuzzy classifier, GPS, and inertial sensors for the detection of sudden driving events was presented by Arroyo et al. [16] and a precision performance of 0.87 and 0.91 was recorded. A fuzzy inference system was proposed by Aljaafreh et al. [17] for the detection of speed bumps using accelerometers embedded in smartphones. Nevertheless, the actual results of the tests were missing and accuracy only ranged from 70-80%. A multi-mobile phone system was developed by Astarita et al. [18], who also used accelerometers for the detection of bumps and potholes. A whopping 90% detection rate was obtained for bumps whereas the False Positive Rate (FPR) was about 35%. Furthermore, the use of a smartphone accelerometer with six different algorithms to categorize road surface conditions was done by González et al. [19], who reported an Area Under Curve (AUC) ranging from 0.823 to 0.9445. Nature driven approaches such as genetic algorithm have also been explored: Yu and Yu [20] explored the use of genetic algorithms using images as a source of information to detect road irregularities. Moreover, abnormalities or distress data collection are increasingly being automated by using various imaging systems. However, analysis of the collected raw video clips for distress assessment is still predominantly being done manually, which is expensive, time-consuming, and slows down road maintenance management [21]. Pre-existing research suggests that three-dimensional image-based techniques are quite expensive; on the other hand, vibration sensor-based techniques are not as accurate and reliable [22] for road surface monitoring. The majority of the existing two-dimensional imaging methods have solely focused on either crack distress detection or pothole detection.
In this paper, an experimental analysis was conducted to detect potholes and speed bumps in quasi-real-time conditions using three different techniques, namely, an ultrasonic sensor with DWT, imaging-based systems, and manual inspection for validation from various roads of Noida city. In the first technique, which consists of an ultrasonic sensor, a GPS and Arduino connected to the Head Up Display (HUD) device are introduced. This system is a cost-effective method for a better, faster, and more reliable way to avoid accidents caused by potholes and raised humps. During the conduct of this experimental analysis, a collection of an exclusive data pattern of speed bumps and potholes was undertaken and directly fed to dynamic time warping (DTW) to find the likeness and similarity. A robust method for automated segmentation of frames with and without distress from the image processing technique is presented. These photo processing methods are responsible for the detection of potholes and speed bumps, which are supported by user-defined decision logic. The derivation of the decision logic is dependent on three characteristic visual properties of these irregularities (i.e., the standard deviation for calculating pixels intensities, circularity (CIRC) for calculating the shape, and average width for the dimension). An agile video separation algorithm called irregularity frame selection (IFS) was used to separate the visual frames with irregularities or not categorically. A new algorithm named the Hanuman algorithm took care of the second phase for automatically detecting and assessing potholes and speed bumps in one go. Finally, in the third technique, a manual visual inspection was undertaken to validate the above two methods.

Materials and Methods
The proposed threshold-based efficient road monitoring system detects the pothole and a speed break. Figure 1 shows the methodology overview of the information taken from the ultrasonic sensor. Collection and analysis of data were done using the primary server where the application of the DTW algorithm and noise filtering techniques was made. After the observation of the limitations of the existing systems, the present framework introduces the use of an ultrasonic sensor, DTW, IFS (algorithms), and filters for the detection of road irregularities. The ultrasonic sensor is fit in the moving direction of the car, as explained in Section 4. Information gathered with the help of sensors is sent to the central server for further analysis. Furthermore, noises, vibrations, and gravity components are eliminated using the filters. DTW helps to obtain the closeness score by analyzing the patterns for potholes and speed bumps. Ergo, road irregularity detection is undertaken with its GPS signature. Eventually, the final output is displayed on the mobile HUD for ease of the driver, making it even more ergonomic.

Hardware Setup
The main aim of the research was to create inexpensive hardware that runs on open software. Ergo, we used an Arduino Uno with an ultrasonic sensor (in Figure 2 and Figure 3) and a GPS. Table  1 shows the hardware specification and Figure 4 shows the components used in the setup. The architecture of the proposed system consisted of four parts: an ultrasonic sensor, Arduino, a server module, and a heads-up display module. The ultrasonic sensor and Arduino are used to gather information about potholes and speed bumps and their geographical locations, and this information is sent to the server. The server module receives information from the microcontroller module, processes, and stores in the database.
Ultrasonic sensors are utilized to determine the separation between the vehicle frame and the street surface numerically, and this value is passed to the microcontroller. Threshold distance is defined as the distance between the body of the vehicle and the smooth road surface, which depends upon the ground clearance of vehicles. If the value obtained by the ultrasonic sensor is more than the threshold distance, it recognizes it as a pothole, and if it is less, it is recognized as an unimportant irregularity, otherwise the street is smooth.  The microcontroller module (Arduino) is the main controller of the entire system and is responsible for incorporating the ultrasonic sensors and sending and receiving signals between the GPS receiver and the sensors. The microcontroller module is merely the processing power of the whole system and is utilized to accumulate data about potholes and their topographical areas, and these data are passed onto the server. The server module gets this data from the microcontroller and uploads its respective location signatures to the cloud server. This location will appear on the GPS system whenever any vehicle passes through or near it. The Arduino contains several filters to smoothen out the output from the ultrasonic sensor. The basic variations from the ultrasonic sensor are bolstered to the filters, where the information is smoothed and standardized. The filters are to filter the vibration due to some irregularities from the road surface apart from speed bumps and potholes. These vibrations are removed from the ultrasonic sensor information to lessen the impact of other outside powers and for the system to be able to differentiate between a constant/normal variation and an actual pothole or a bump.  Figure 4a Arduino with HY-SRF05.

GPS Receiver
It is a satellite navigation system and is used to capture geographic location and time, irrespective of the weather conditions ( Figure 4b).
HUD A mobile device that used to display the information on the windshield as shown in Figure 4c.

Automated Assessment of Potholes and Speed Bumps Using Imaging Processing
The inception of the motivation for this research paper was induced directly or indirectly by our personal first-hand experiences with the Indian road conditions. The validation was for the determination of the efficiency of the proposed system. Initially, the pothole and bumps were detected with the help of using ultrasonic sensors paired with an Arduino attached with a heads-up display feeding the information to the GPS receiver. Irregularity frame selection is a recursive algorithm for searching all the vertices of a graph or tree data structure. This algorithm uses raw visual clips that are further put through several image processing methods; this is done using userdefined logics, which ensures the precise detection of irregularities. Segmentation of the irregular pixels in a visual frame is done by the algorithm using user defined decision logics that categorize those frames by the area covered by the irregular pixel. This segmentation is categorized into two parts: (1) Frames with irregularities, (2) frames without irregularities.
The Hanuman algorithm is used in the presented technique for computerized location and estimation of speed bumps and potholes in a single go from a grouping of video outlines. This algorithm is generated by the arrangement of two visual properties of bumps and potholes, which are distinguished from video photographs of Indian streets. This aggregate arrangement of recognized visual properties incorporates the accompanying, including the following: Picture Texture: The picture surface of the interior of a pothole and speed bump is more different and distinguishing than the encompassing zone (i.e., irregularity less street surface region).
Shape Factor: The state of a pothole and speed bump is distinguishable. Their shape factor is estimated as far as circularity, which changes depending on their surface territory and border.
Measurement: The element of pothole and speed bump is expressed in terms of average width. This particular algorithm fundamentally includes five segments: • Image augmentation (Algorithm steps 3 and 4), • Photo categorization (Algorithm step 5), • Extraction of visual properties of articles (Algorithm steps 6 to 11), • Recognition and classification of irregularities by decision logic (Algorithm step 12) and • Quantification (Algorithm step 13). The calculation produced for the robotized identification, estimation, and arrangement of casings with potholes and speed bumps without basic irregularity from a grouping of street video outlines is recorded underneath. 1. Categorized video frames are input; 2. The initial frame is selected; 3. A blue channel is selected for the conversion of the preset 24-bit depth format into 8-bit depth format; 4. Median filtering is used for photo augmentation; 5. Application of weighted mean based adaptive thresholding is made to covert processed photos into a binary image wherein black pixels signify objects of concentration; 6. Morphological erosion is used to add black pixels to link the slits in the binary photo; 7. Morphological dilation is used to eradicate secluded black pixels or their minor cluster; 8. Morphological erosion is used again to add black pixels to the binary photo; 9. Connected element classification and chain coding methods are used to quantify the number of substances or areas of notice and evaluate the area (A) and perimeter (P) of each of the object/substance; 10. Filter out all the objects/substances whose A = 192cm 2 in the primary photo; 11. Calculate standard deviation, circularity and average width of every remaining substance/object (critical objects, i.e., objects whose A ≥ 192 cm 2 ); 12. Categorize every substance/object into three kinds using heuristically derivative decision logic: The procedure applied to extract the pothole information using the proposed algorithm is shown in Figure 5. Figure 5a is the original image with potholes; (b) is the binary image after median filtering (i.e., after random noise reduction in column (a) image), and adaptive thresholding (i.e., after object segmentation in column (b) image); (c) is binary image after erosion (i.e., after joining disparate black pixels in column (b) image); column (d) image after the Hanuman algorithm and (e) is the report of the pothole. Similarly, Figure 6 shows the speed bumps.

Experimental Design and Location
To investigate the road surface, the framework used for the testing is shown in Table 2. The research was performed in the city of Noida, which comes under the National Capital Region of New Delhi. The city has an elevation of 200 m above sea level and a flat topographical region. Like most of the country, there are extremely contrasting roads in Noida, ranging from excellent roads to terrible roads. An expressway just outside of Noida ( Figure 7a) and a slum road in Noida (Figure 7b) were considered for the experiment. Several test runs were performed, yielding different results. The experiment was conducted for three months covering around 150-170 km. For the evaluation of the performance of the framework, the algorithm presented in this research was applied in a Windows environment (Dell XPS 15Z with Intel i7 2600, 8GB DDR3 RAM on Windows 10 Pro) with the use of Visual Studio 2017 (VC ++ Redistributable) and Open CV3.3 Library. Hanuman, IFS, and DTW algorithms were used across the entire framework. For test runs, a Honda Amaze was used and image processing was done by a cost effective 4k resolution action camera. Table 2 shows the software and hardware specifications used in the experiment

Results and Discussion
The evaluation of the three different techniques is presented while traveling over the R1 (Yamuna expressway) and R2 (Khora Village) roads of Noida city and was also compared with other existing techniques.

Proposed Novel Framework
The ultrasonic sensor detects the pothole and speed bumps; these data are saved on the server and used to determine the separation amid the vehicle body and the street surface numerically, and this value is passed by the Arduino. Threshold distance is defined as the distance between the body of the vehicle and the smooth road surface and depends upon on the ground clearance of vehicles. If the value obtained by the ultrasonic sensor is more than the threshold distance, it will recognize it as a pothole, and if it is less, it is a mound, otherwise the street is smooth. The proto test was conducted using the design described in the Methodology Section above, and the results for R1 and R2 are shown in Tables 3 and 4. As can be clearly seen, the uneven roads of the rural areas showed many potholes and bumps with some specific dimensions. On the other hand, the motorway road only showed irregularities up to 6.2 cm, which were filtered by filters such as Speed, Virtual Re-orientation, Filtering Z-pivot, SMA, and Band-Pass on the basis of the threshold limit being 8 cm. Figure 8 shows the experimental comparison in the z-axis displacement for R1 and R2.

Image Processing Result
Identification of the unique visuals of irregularities like illumination, size, and shape are made using image processing techniques. These accurately identify and help classify those irregularities. The irregularity frame selection algorithm is used as a quick video separation of the real-life visual clips captured of the Indian National Highways at several locations, which are divided into two frame categories (frames with irregularities and frames without irregularities). The Hanuman algorithm is responsible for the evaluation of the database of frames with irregularities, which is an automatic technique for the recognition and analysis of potholes and speedbumps. The proto test was conducted using the design described in the image processing methodology and the results for R1 and R2 are shown in Tables 5 and 6.

Manual Inspection
Manual inspection was performed using a band meter, which is used to measure the depth of an object with precision and accuracy. Figure 9 shows the manual inspection at R1 and R2, respectively. The proto test was conducted using manual inspection, and the results for R1 and R2 are shown in Tables 7 and 8. Generally, manual inspection is performed using some technical equipment, but in our case, we performed a very traditional manual inspection. Different scales were used to measure the different potholes and speed bumps for the validation.

Validation of Proposed System with Other Techniques
The same experiment was conducted using three different methods several times on the very same roads; the rural road of Khora village and the urban road of the Yamuna Expressway. Each method, ultrasonic sensor, image processing, and manual inspection had slight deviations, as shown below. The comparison between three different techniques for depth/height, latitude, and longitude with their error are given in Tables 9-14 for both roads.  The deviation of the location of the pothole is relevant in different methods. The ultrasonic sensor and image processing detection deviated slightly from the actual position. Ergo, to calculate the accuracy of the system, the mean of the output using different method was calculated. The maximum error was 4.60% and the efficiency of the proposed system was about 95.48%. Table 15 shows a full comparison between the results obtained with the proposed methodology and those yielded by similar approaches. As can be seen, our approach clearly outperformed the others, where TPR is the True Positive Rate, FPR is the False Positive Rate, and FNR is the False Negative Rate. One of the strongest points presented in this research is the use of a multi-variate model for pothole and speed bump detection. The presented methodology builds a model by combining different methods for the detection of road surface irregularities which provides greater accuracy to the entire framework. The collaboration of different methods with our novel framework targets a much bigger audience, and since it is very cost effective, it makes this system ideal for road surface monitoring in all regions.

Conclusions
It has been highlighted that the current road anomaly detection frameworks used by the government or the existing authorities are very tedious and overwhelmingly time consuming, which is why this device eradicates all the problems and complications with the existing systems with much better efficiency. The analysis results demonstrated the use of ultrasonic sensors mated with an Arduino, GPS receivers, and HUD module, which runs on several filters. Dynamic time warping was also one of the algorithms used, which makes the validation process more manageable and is also one of the reasons for the increased efficiency. The presented Hanuman algorithm could detect the potholes and speed bumps accurately and efficiently. The calculated accuracy of the system was 95.48%, and the use of inexpensive components makes it the most cost effective framework among the existing systems. The model proposed in this paper serves two critical purposes (i.e., automatic detection of potholes, bumps, and alerting vehicle drivers to evade potential accidents). The HUD application provides real-time alerts about potholes and bumps right in front onto the windshield, making it more ergonomic. The framework works perfectly in all seasons, especially in monsoon as the signal/warning is generated from a database. The novel framework ha the highest efficiency when compared to all preexisting systems. Since it is a cost effective long time solution for pothole management, it can be easily provided to the maximum number of people; which can furthermore save many lives. Integration of GMaps and Satnav with the system can be done for ease of use. This framework can be applied to different types of road conditions and will be the future scope of this work.  Acknowledgments: The authors would like to thank Amrit Seth, Ansh Mittal, and Vansh Malik, students at Amity University, who helped in conducting this research.

Conflicts of Interest:
The authors declare that they have no conflicts of interest. We declare that we do not have any commercial or associative interest that represents a conflict of interest in connection with the work submitted.