^{1}

^{*}

^{2}

^{*}

^{1}

^{*}

Vehicle speed is an important parameter that finds tremendous application in traffic control identifying over speed vehicles with a view to reducing accidents. Many methods, such as using RADAR and LIDAR sensors have been proposed. However, these are expensive, and their accuracy is not quite satisfactory. In this paper, a video-based vehicle speed determination method is presented. The method shows satisfactory performance on standard data sets and gives that error rate of velocity estimation is within 10%.

Traffic accidents are very dangerous as these result in injury and death of passengers and pedestrians in addition to the damage of vehicles and roads. Bangladesh is one of the top countries in the world where road accident rate is very high. A traffic accident is a great pain and loss of a nation. Though concerned authorities have taken many initiatives to minimize the road accident rate and increase the road safety, still every year thousands of people get killed and injured due to road accidents. According to statistics of road accidents and casualties from Bangladesh Police, in the year of 2016, 2566 dangerous accidents occurred and that caused 2463 deaths and 2134 injuries [

In this paper, an imaged-based vehicle speed estimation method is developed using physics-based velocity theory. It consists of a video camera that is placed a fixed location for capturing images and then a computation system works on the images to calculate the speed. Several video-based techniques are developed for detecting moving objects, such as temporal differentiation, optical flow, background subtraction, etc. Among these, background subtraction technique is simpler than other techniques. In this technique, the absolute difference of the background frame and the current frame is taken. Here, a hybrid technique is used that consists of an adaptive background subtraction technique and a three-frame differentiation method.

The method consists of five major modules such as image acquisition and enhancement, segmentation, centroid calculation, shadow removal and speed calculation.

The rest of the paper is organized as follows. Section II describes the theory and method along with implementation for vehicle speed estimation. In Section III, experimental result and discussions are given. Finally, conclusions are drawn in Section IV.

A flow diagram of the vehicle speed detection method is shown in

It consists of three major blocks. The first block is video image capturing and background subtraction. It consists of a stationary video camera that is placed a fixed location for capturing images. The primary task of the vehicle speed estimation method is to detect the moving vehicle from the video. A three-frame differencing technique is applied to know the motion pixels. So, the second block is the extraction of vehicle by using an adaptive background subtraction method. Here, the stationary pixels are background pixel and the moving pixels are foreground, as shown in

Let the position of a captured pixel is (x,y) at time t = n and its intensity is I_{n}(x,y). Using three frame differencing technique, an object is moving if the position of a pixel in the current image (I_{n}) and its position in the consecutive previous frames (I_{n}_{-1}) and (I_{n}_{-2}). Mathematically, motion is detected if the conditions of Equation (1) hold.

( I n ( x , y ) − I n − 1 ( x , y ) > T h n ( x , y ) ) and ( I n ( x , y ) − I n − 2 ( x , y ) > T h ( x , y ) ) (1)

where T h n ( x , y ) is the threshold value at pixel position (x,y).

Then the background subtraction image is achieved by the subtraction of the background B_{n}(x,y) frame from the current frame I_{n}(x,y) through Equation (2).

S I n ( x , y ) = I n ( x , y ) − B n ( x , y ) (2)

where, S I n ( x , y ) be the subtracted image.

From the background subtracted image the noise pixels are removed based on outlier and the shadow pixels are removed based on the intensity of pixels, as the intensity of a shadow pixel is lower than the intensity of an object pixel. After that object tracking is done through segmentation by connectivity of pixels and labeling of objects. Each labelled object is bounded through a rectangle. Then the area of each labelled object is calculated. Tracking of each object (vehicle) is recorded when it enters the scene (at frame S I 0 ) and when it leaves the scene (at frame SI_{n}). Centroid of vehicle in the respective frame can be easily determined from the labelled object using the x and y coordinates as

( x c , y c ) = ( ( x 1 + x 2 ) 2 , y 1 + y 2 2 ) (3)

Actual Speed | Variation in measured value | Error |
---|---|---|

10 km/hr | 9 - 11 km/hr | ±10.0% |

15 km/hr | 14.5 - 16 km/hr | ±5.0% |

30 km/hr | 27 - 32 km/hr | ±8.3% |

40 km/hr | 39 - 42 km/hr | ±3.7% |

50 km/hr | 47 - 52 km/hr | ±5.0% |

where, ( x c , y c ) is the center of the vehicle.

The third and the final block is the calculation of the speed of the vehicle. Speed can be easily calculated by counting the frame numbers needed to enter and leave the labelled object and the distance it covers. The Euclidean distance of the centroids of nth and (n − 1)th frames gives the distance traveled by the respective object (vehicle). The frame rate of the video is then multiplied by the total number of frames. From this total time and distance, speed is measured and mapped in real time through Equation (5).

Distance = ( x n − 1 − x n ) 2 + ( y n − 1 − y n ) 2 (4)

where, ( ( x n , y n ) , ( x n − 1 , x n − 1 ) ) is the coordinates of the centroid pixel in nth frame and (n − 1)th frame, respectively.

Speed = α × Distance ( Frame ( n ) − Frame ( n − 1 ) ) × FrameRate (5)

where, α is the calibration coefficient that maps image to object motion and can be calculated as

α = real height of the vehicle/image height of the vehicle.

For our experiment, we have used QMUL Dataset [

An image-based vehicle speed estimation system is presented in this paper, which is a good alternative to the traditional RADAR or LIDAR-based system. We have done experimentation through standard dataset and estimated the real speed of a vehicle. From the experimental findings, it is confirmed that the system works well with good accuracy as the error rate is within 10% limit. In the future, we will work for accuracy improvement as well as implementation of the system in real-life environment.

The authors declare no conflicts of interest regarding the publication of this paper.

Moazzam, Md.G., Haque, M.R. and Uddin, M.S. (2019) Image-Based Vehicle Speed Estimation. Journal of Computer and Communications, 7, 1-5. https://doi.org/10.4236/jcc.2019.76001