Determination of Moving Vehicle Speed using Image Processing

DOI : 10.17577/IJERTCONV4IS18029

Download Full-Text PDF Cite this Publication

Text Only Version

Determination of Moving Vehicle Speed using Image Processing

B. Suresh

M.Tech, Associate Professor Department of ECE ASIST, Paritala, AP

P. Saritha

B.Tech, Student Department of ECE ASIST, Paritala, AP

K. Triveni

B.Tech, Student Department of ECE ASIST, Paritala, AP

K. Sriharsha

B.Tech, Student Department of ECE ASIST, Paritala, AP

Y. V. Lakshmi

B.Tech, Student Department of ECE ASIST, Paritala, AP

D. Srinivas Reddy

    1. ech, Student Department of ECE ASIST, Paritala, AP

      Abstract As the traffic problems in urban areas are going to increase traffic surveillance systems based on video are attracted over past decades. These systems are very much useful to monitor and manage various traffic conditions such as traffic management, prevention of accident, also secure transportation

      .Within this vehicle speed determination on the road is one of the aim. So the vehicle speed determination is become challenging task. In speed determination vehicle detection and vehicle tracking are the key steps. To overcome disadvantages of traditional method here vehicle speed determination using image processing is done in MATLAB. In this paper, the proposed method consists of mainly three steps background subtraction, feature extraction and vehicle tracking. The speed is determined using distance travelled by vehicle over number of frames and frame rate.

      Keywords Background subtraction, feature extraction, object matching, vehicle detection, vehicle tracking

      1. INTRODUCTION

        Nowadays there is more demand for traffic surveillance system. The traffic surveillance system gives the information about various traffic parameters such as vehicle count, traffic congestion, vehicle speed etc. As the single biggest cause of road accidents is speed most of the research is going on to detect speed of vehicle. Many speed detection instruments are available for moving vehicle speed detection Also the field of image processing is widely used for various applications generally in video surveillance systems. So, video sequences are in use for instance tracking moving objects, extracting trajectories, finding traffic intensity or estimating vehicle velocity etc. Using video to track vehicle in a scene reveals added information difficult to obtain using loop detectors. This system might be useful for extending in real-time surveillance. Traditionally radar systems were used for many applications. So it can be applicable not only in military applications but also in civilian applications. The radar system is not able to become popular in traffic surveillance system due to high cost of radar and less accuracy. Also it requires line of sight connection between vehicle and radar equipment. The other method for speed calculation is use of inductive loops. But this requires high maintenance and installation cost, also it doesnt provide enough information about traffic

        parameters.

        So to overcome the limitations in existing methods, various techniques have been developed for vehicle speed determination using image processing. But the contingent factors such as illumination changes, tree waving, camera noise may affect the output of algorithm which is used in image processing. So for vehicle detection and speed measurement using image processing there are many work have been done. Some of these are reviewed here. The motion is derive in [1] using equation of spherical projection to estimate the vehicle speed. Lucas-Kanade-Tomasi algorithm is used for motion tracking. The various algorithms which are developed for vehicle detection and tracking has reviewed in [2].This paper is based on background subtraction. In background subtraction background modelling is most important. The various methods of moving vehicle speed detection are Inductive loops, RADAR gun, LASER Gun, Manual count [3]. The methods of background extraction from colour image [4] based on average value, median filter and common region. Also running average, median algorithm, Mixture of Gaussian [5] are developed, these are based on DCT. Many times first frame or frame differencing is used for background subtraction. To remove misdetection of vehicle[6] due to vehicle travelling from other lane, or other small movements such as tree waving can be avoided using ROI extraction. The background is multiplied with roi mask. So that vehicles are detected accurately. Furthermore thresholding and morphological operations are used to reduce noise. In thresholding selection of threshold value is based on various methods. The threshold value can be selected manually or automatically by using thresholding. The histogram thresholding is explained in [7].

      2. PROPOSED METHOD

This method is used for estimating vehicle speed which is coming towards camera by tracking the motion of vehicle through sequence of images. The proposed system mainly consists of steps as shown in fig.1 Firstly, the video is converted into frames. The Background Subtraction is used for moving vehicle detection. Averaging all frames, background without moving object is extracted. Background Subtraction output is applied for Thresholding and Morphological Operation. Connected Component Method is

used to detect object and centroid of that object. Centroid is

tracked over multiple frames. Velocity is calculated using distance travelled by vehicle and frame rate of video. This system is helpful for traffic parameter surveillance. Fig. 1 shows Block Diagram for proposed method.

Input video Pre- Moving

Signal processing vehicle detection

Speed Vehicle Feature

Determination Tracking Extraction

Fig. 1 Block Diagram for proposed method

  1. Pre-processing

    The video is recorded using mobile camera having pixels. In pre-processing the video has converted into the frames. The various parameters such as number of frames, frame rate, colour format, frame size are extracted. There are total 372 frames in this video. It has frame rate 30 frames per second. The frame size is of 640×480 pixels. Also at this stage the frames are converted into double data format i.e. required for future operation.

    From background image ROI Extraction has done. In this work, vehicle coming towards camera are tracked so that only one lane of road is considered as ROI. The extracted ROI is as shown in Fig.3.

    Fig . 2 Background Model using averaging frames

  2. Moving Vehicle Detection Fig. 3 Extracted ROI from background model

    Detecting Moving vehicle from video accurately is challenging task. To detect moving object there are various approaches such as temporal differencing method, optical flow algorithm, background subtraction algorithm. Temporal differencing method uses two adjacent frames only to get background image. This method has one disadvantage that it cannot detect slow changes accurately. Optical flow algorithm detects object independently using camera motion. Optical flow algorithm is computationally complex and it is not suitable for real time application. In background subtraction absolute difference between background model and each instantaneous frame is taken to detect moving object. Background model is an image with no moving object.

    In this work, background subtraction algorithm is used to detect moving vehicle. The background subtraction algorithm mainly consist of three stages Background Extraction, Thresholding, Morphological Operations.

    1. Background Extraction: The heart of Background Subtraction is background extraction. While recording video on highway; it is very difficult to get he image without any moving vehicle. For getting such image which is called as background or background model background extraction is used. In this work, average of all frames pixel values, have taken because of this as result as shown in Fig. 2, we got the image having only stationary object.

      Each frame is then multiplied with extracted ROI. Before multiplication RGB frames are converted to Gray level. Because of this detection of other movement such as waving trees, or any other unwanted movement is avoided. It is required to do to get accuracy in vehicle detection. The absolute difference of each instantaneous frame and background model after multiplying both with extracted ROI has taken to detect only moving vehicles. The result of this is as shown in fig. 4.

      Fig. 4 Difference image of background and frame

    2. Thresholding: Thresholding is one of the ways for image segmentation. It converts grey scale image to binary image.

      Selection of threshold value is very much important in thresholding. To separate foreground vehicle from static background thresholding is used here.

      g(x, y) = 0 for f(x, y) < T

      1 for f(x, y) >= T

      Where g(x, y) is threshold image, T is the selected threshold value; f(x, y) is instantaneous frame. In this work, we got vehicle as object and some noise. The result of this stage is as shown in fig. 5.

      Fig. 5 Result of Thresholding

    3. Morphological Operations: They are generally used to remove noise from imperfect segmentation. Morphological operations are especially suited for binary images. So they are performed on output image of thresholding. Here opening, closing and dilation are performed. Opening and closing is used to remove holes in the detected foreground. Dilation is interaction of structuring element and foreground pixels. The structuring element is nothing but a small binary image. In the process of dilation the size and shape determination of structuring element is very important. The results of these morphological operations are shown in fig.6.After this the selected object pixels are applied for connected component analysis.

    Fig. 6 Results of Morphological Operations

    Connected component analysis is used to identify connected pixel region by scanning an image pixel-by-pixel. It is applied to binary and grey scale image. It has various connectivity i.e.8 pixel connectivity or 4 pixel connectivity.

    Here connected component analysis is performed on binary image with 8 pixel connectivity.

  3. Feature Extraction

    Feature extraction is the key aspect in moving vehicle tracking. The more literature is available on various methods of feature extraction. Features are nothing but some of the characteristics of detected vehicle such as position, speed, colour, shape, centroid, edges etc. By using result of connected component analysis bounding box has drawn around vehicle. In this work the centroid and histogram of vehicles surrounded by bounding box are selected as features. The result of vehicle detection is as shown in fig.7.

    Fig. 7 Result of vehicle detection

  4. Vehicle Tracking

    It is based on feature tracking. The extracted features are tracked over sequential frames. To identify whether it is same object or other object matching algorithm is used. In object matching algorithm mahalanobis distance is calculated. Mahalanobis distance is used to find similarity and dissimilarity between two groups. It uses covariance of the two groups. When covariance matrix is same as identity matrix then mahalanobis distance is same as Euclidian distance.

    Fig. 8 Match id and detected vehicle

    In object matching the mahalanob is distance between features of object in the previous frame and instantaneous

    frame is calculated. Some threshold value is set and it has compared with calculated distance. If the distance is less than the threshold value then the object in the previous frame and instantaneous frame is same. According to this, match id has given for each object. The result of this is as shown in fig.7. This match id is tracked over sequential frames.

  5. Speed Determination

The detected vehicle having match id is tracked over frames. The total number of frames in which same object is present has calculated.

Total Frames Covered= frame n frame 0

Car#: 1, Speed: 30.2831 km/Hr

Fig. 9 Speed detection result

Where, frame 0 is the first frame when object is entered in roi and frame n is last frame when object passed away from roi. Also the real world distance is mapped on the image. The count of total number of frames is then multiplied with duration of one frame which is calculated from frame rate of video. From this the total time taken by vehicle to travel and

Distance is fixed it is mNeCasAuCreSdPVin-r2e0a1l 6wCoorlndfearnedncme aPprpoceededinintogs image.

Speed=Distance/ (TF*Frame rate)

From distance and travelled time of detected vehicle, speed of that vehicle is determined from above formulae.

III CONCLUSION

The proposed method gives better results as compared to previous techniques. Background subtraction is robust against illumination changes in real world. Also by extracting ROI the noise immunity is improved. As the distance is mapped on the image by calculating it from real world. So the calculated speed is approximated to actual speed.

REFERENCES

  1. Vamsi Krishna Madasu and M. Hanmandlu, Estimation of Vehicle Speed by Motion Tracking on Image Sequences, IEEE Intelligent Vehicles Symposium University of California, San Diego, CA,

    USA,June 2010.

  2. Guolin Wang, and Deyun Xian Jason Gu Review on Vehicle Detection Based on Video for Traffic Surveillance Proceedings of the

    IEEE International Conference on Automation and Logistics Qingdao,

    China September 2008

  3. Muhammad Akram Adnan, Nor Izzah Zainuddin Vehicle Speed Measurement Technique Using Various Speed Detection Instrumentation IEEE Business Engineering and Industrial Applications Colloquium (BEIAC), 2013

  4. Chen Peijiang, Moving Object Detection Based on Background Extraction IEEE conference, 2009

  5. Weiqiang Wang, Member, IEEE, Jie Yang, Senior Member, IEEE, and Wen Gao, Senior Member, IEEE Modeling Background and Segmenting Moving Objects from Compressed Video, IEEE

    Transactions On Circuits And Systems For Video Technology, VOL. 18, NO. 5, MAY 2008

  6. Chieh-Ling, Huang, Heng-Ning, Ma, A Moving Object Detection Algorithm for Vehicle Localization, Sixth International Conference on Genetic and Evolutionary Computing, 2012

P.Daniel Ratna Raju, G.Neelima, Image Segmentation by using Histogram Thresholding, IJCSET Vol 2, Issue 1pp:776-779, 2012.

Leave a Reply