Video-Based Detection and Tracking Model For Traffic Surveillance

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/282328780

VIDEO-BASED DETECTION AND TRACKING MODEL FOR TRAFFIC


SURVEILLANCE

Conference Paper · January 2015


DOI: 10.13140/RG.2.1.4167.0162

CITATIONS READS

3 519

3 authors, including:

Ragab M. Mousa
Ministry of Transport and Communications-Oman
33 PUBLICATIONS   117 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

DEVELOPMENT OF SUPERPAVE PERFORMANCE GRADING MAP FOR THE SULTANATE OF OMAN View project

Design of Road Rehabilitation Works View project

All content following this page was uploaded by Ragab M. Mousa on 01 October 2015.

The user has requested enhancement of the downloaded file.


A. Al Kherret, S. Sobky, and R. Mousa 1

VIDEO-BASED DETECTION AND TRACKING MODEL FOR TRAFFIC


SURVEILLANCE

Abdul Razak Al Kherret, PH.D Student


[email protected]
Faculty of Engineering, Cairo University, Egypt

Al Sayed Al Sobky, Assistant Professor


[email protected]
Faculty of Engineering, Ain Shams University, Egypt

Ragab M. Mousa*, Professor and ASCE Associate Member


E-mail: [email protected]
Faculty of Engineering, Cairo University, Egypt
(Currently: Expert, Ministry of Transport and Communications, Sultanate of Oman)
(P.O. Box 684, Postal Code 100, Muscat, Sultanate of Oman, Tel: 00968 93819248)

Paper No. 15-1465


Submitted to:
th
The 94 Transportation Research Board Annual Meeting January 11-15, 2015
Washington, D.C.

Word Count
Abstract 250
Text 5239
Tables (3 x 250) 750
Figures (6 x 250) 1500
Total 7,489

* Corresponding Author
A. Al Kherret, A. Al Sobky, and R. Mousa 1

1 ABSTRACT
2 The continuous increase of traffic congestion in urban areas demands a high reliable
3 traffic management system for monitoring traffic flows and providing key input parameters
4 for predicting traffic conditions. Video sequences of road scenes are increasingly used in
5 several contexts with an emphasis on automation, notably for tracking moving objects in a
6 static background. This paper presents a multiple-vehicle surveillance model developed using
7 Matlab Software for detecting and tracking moving vehicles, and collecting traffic data for
8 different lengths of region of interest (ROI), ranging between 5 and 30 m. The model was
9 validated using simulated video scenes, designed in VISSIM with known traffic data.
10 Measurements from model were compared with actual measurements reported by VISSIM
11 and results confirmed exact match of vehicle counts. Statistical t-tests of mean speed
12 differences confirmed the model validity at 5% significance level, especially with ROI length
13 of 10 and 15 m. Validation of headway measurements was also confirmed for optimum ROI
14 lengths. The model processes one second in video clips of frame rate 20 frames/sec in 0.96
15 sec. This is appropriate for real-time applications to yield traffic parameters including vehicle
16 speed, headway, count, incident detection, queue detection, etc. However, the model was
17 validated assuming no lane changes and no overlap of vehicles, and, hence, model validity is
18 limited to these assumptions. It is recommended that this model be validated using real-
19 world videos containing noises such as light variation, shadows, vibrations due to wind,
20 skewed views, lane changes, and/or trucks that obscure full view of vehicles.
21
22 Keywords: Matlab, Image Processing, Traffic Surveillance, Vehicle Detection, Vehicle
23 Tracking, Speed.
24
25
A. Al Kherret, A. Al Sobky, and R. Mousa 2

1 INTRODUCTION
2 The daily life of people encounters more problems as the population continuously
3 increases in urban area, and road traffic becomes more congested because of high demand
4 and less level of road capacity and infrastructure. Since the effects of these problems are
5 significant in daily life, it is important to seek efficient solutions to reduce congestion and
6 provide secure transportation system.
7 In recent years, much research has been performed for developing real time traffic
8 monitoring systems for managing the traffic flow of roadways, prevention of accidents,
9 providing secure transportation, etc. Within these works, one aim is to realize different
10 applications such as estimation of vehicle speeds on the roadways, determination of traffic
11 intensity and if necessary, to direct the vehicles to less dense roads, manage the timing of
12 traffic lights automatically, etc. (1-4).
13 The common method to obtain information on traffic flow is by utilizing buried
14 induction loops. Although this existing technique is not affected by weather and light
15 conditions, it suffers from high installation and maintenance costs (5,6).
16 In order to overcome this limitation, vehicle tracking using image processing
17 techniques has been adopted for traffic monitoring system to yield the traffic parameters
18 including queue detection, incident detection, lane changes, vehicle classification, vehicle
19 counting and vehicle speed (5-9).
20 A more reliable traffic flow modeling and an improved understanding of drivers’
21 behavior can be attained since the vehicle tracking system can provide more individual
22 vehicle data such as spacing, velocity and acceleration (5).
23 The literature is abundant with researches that dealt with detection and tracking of
24 moving objects in video sequence, and numerous mathematical models have resulted out of
25 these studies. Parekh et al. (10) reported that a general subdivision of object detection
26 techniques can be made of three main categories, namely, (a) Background Subtraction, (b)
27 Temporal Differencing, and (c) Optical Flow. Similarly, the object tracking can be divided
28 into three main categories, Point tracking, Kernel tracking, and Silhouette tracking.
29 In object detection techniques, Background Modeling (Background Subtraction) is
30 used to detect moving objects in an image by taking the variations between the current image
31 and the reference background image in a pixel-by-pixel fashion. The background subtraction
32 method uses a simple algorithm. However, it is very sensitive to changes in the external
33 environment. Similarly, Temporal Differencing method is used to calculate the absolute
34 differences between two consecutive images to extract moving regions and obtain a threshold
35 function to determine changes. The temporal differencing has a strong adaptability for a
36 variety of dynamic environments, but its method of calculation is generally difficult to
37 achieve complete outline of moving object. The Optical Flow method uses the optical flow
38 distribution characteristics of moving objects over time in an image sequence. Flow
39 computation methods cannot be applied to video streams in real time because they are very
40 complex and very sensitive to noise (11, 12).
41 In object tracking manners, the Point tracking method is based on monitoring and
42 comparing the positions of different detected points from one frame to another. Kernel
43 tracking method tracks objects by calculating the motion of an object shape and its
44 appearance in successive frames. The Silhouette tracking method uses information inside the
45 silhouette's region in the form of edged maps to track the object using shape matching
46 approach (13, 14).
47 As previously mentioned, background subtraction methods are very sensitive to
48 changes in the scene. Also, this method requires a training period absent of foreground
49 objects and is too slow to be practical. Stauffer and Grimson (15) modeled each pixel in an
50 image sequence as a mixture of Gaussians and used an on-line approximation to update the
A. Al Kherret, A. Al Sobky, and R. Mousa 3

1 model. Then, the Gaussian distributions of the adaptive mixture model are evaluated to
2 determine which are most likely to result from a background process. Finally, each pixel is
3 classified based on whether the Gaussian distribution which represents it most effectively is
4 considered part of the background model. Kaewtrakulpong and Bowden (16) improved the
5 previous adaptive background mixture model by updating equations and utilized and
6 applying different equations at different phases to make the system learn faster, more
7 accurate, and adapt effectively to changing environments. However, Matlab Software (17)
8 adopted the previous two studies and presented a system object to detect foreground using
9 Gaussian Mixture Models (GMMs).
10 Nowadays, detection and tracking moving objects are becoming more essential to
11 traffic engineers since available systems such as video image processing (VIP) are
12 successfully used in traffic data collection and traffic surveillance. According to Martin et al.
13 (18), Klein et al. (19) , and Klein (20), all detector technologies and particular devices have
14 limitations, specializations, and individual capabilities. Among these technologies, only
15 microwave radar, active infrared, and VIP systems are capable of supporting multiple lane
16 and multiple detection zone applications. In comparison to all other technologies, VIP system
17 is considered the best in terms of installation, maintenance and portable improvement.
18 Moreover, this technology allows users to check visually the results by watching videos
19 previously recorded.
20 A VIP system typically consists of one or more cameras, a microprocessor-based
21 computer for digitizing and analyzing the imagery, and software for analyzing the imagery of
22 traffic stream to determine changes between successive frames and converting them into
23 traffic flow data (Leduc, (21) and Mimbela and Klein (22).
24 Several techniques of vehicle tracking system have been investigated for traffic
25 monitoring. The review of the literature revealed the lack of studies dealing with the impact
26 of vehicle detection zone (ROI) on the accuracy of detections and measured speeds of
27 individual vehicles. In fact, most of reviewed studies focused only on the vehicle speed as the
28 prime traffic data. (23-27).
29 It is, therefore, the objective of this research to collect traffic data of detected vehicles
30 and assess the impact of the size of ROI on the accuracy of such collected data. This paper
31 presents the development of a multiple-vehicle surveillance model based on the features of
32 Matlab programming language, especially the image processing toolbox. A Video-Based
33 Detection And Tracking Model called "VB-DATM" was developed in the course of this
34 research. The paper also summarizes the main findings of the model applications, features,
35 and limitations.
36
37 DEVELOPMENT OF THE PROPOSED MODEL
38 This section presents the efforts devoted in developing the proposed model. The
39 proposed model is developed using Matlab Software and consists of three sequential
40 modules, namely, Detection, Tracking, and Traffic Data Collection as outlined below. It
41 should be mentioned that other software such as Visual Basic and C Sharp can be used;
42 however, Matlab is used in this work because it has an image processing toolbox.
43  Detection Module: in this module, the moving vehicle is detected as it enters the ROI
44 and exact time and location are registered while vehicle is traveling in the ROI. This
45 is repeated in each frame until the vehicle leaves ROI. These steps are repeated for all
46 vehicles in the video clip.
47  Tracking Module: in this module, data of detected vehicles recorded in frames are
48 checked to segregate all frames belonging to each vehicle and storing them in a
49 separate sheet. This data is simply spatial and temporal data of vehicle trajectory
50 while traveling in the ROI. Each data sheet belongs to only one vehicle.
A. Al Kherret, A. Al Sobky, and R. Mousa 4

1  Traffic Data Collection Module: With the availability of spatial and temporal data
2 of each vehicle, traffic data such as flow, speed, headway, and possibly density can be
3 computed in this module.
4
5 The methodology executed in each module is discussed in some detail in the
6 following sections.
7
8 Vehicle Detection Methodology
9 Vehicle detection is the first step prior to performing more sophisticated tasks such as
10 tracking (17). In this paper, an interactive code was written to detect and track moving
11 vehicles in video sequence using foreground detection based on Gaussian Mixture Models.
12 The code for detection consists of three main parts; initialization, external functions, and
13 stream processing loop. These are elaborated in the following subsections.
14
15 Initialization
16 The initialization is made at the beginning of this module to:
17 1. Read the video from *.avi file,
18 2. Read and store the height and length of video frames and frame rate,
19 3. Display the first frame of the video clip,
20 4. Read the limits of the region of interest (ROI) and lane separators as interactively
21 defined by the user on the screen using the mouse.
22 5. Assign variables to store the coordinates of these limits and the length of the region in
23 pixel.
24 6. Read the length of the ROI in meter. This step is performed to create a Conversion
25 Factor which is used to convert dimensions in pixels to meters and vice versa.
26 7. Read the expected maximum speed (km/h). The Conversion Factor and the maximum
27 speed are used to calculate the maximum distance that a vehicle can travel in single
28 frame (step/frame).
29
30 External Functions
31 To facilitate the vehicle detection and tracking process, three main functions are
32 written as follows:
33 1. Checking whether the center of the bounding box around the detected vehicle is inside
34 the polygon of ROI (or detection area) of certain lane.
35 2. Calculating the travel distance between two given frames. The distance traveled by a
36 vehicle ( D) during two frames is calculated using Eq. 1:
37
38 (1)
𝐷= 𝑦2 − 𝑦1 2 + 𝑥2 − 𝑥1 2
39
40
41 Where (x1, y1) are the coordinates of the vehicle center in the first frame, and
42 (x2, y2) are the coordinates in the second frame.
43
44 3. Calculating the vehicle travel distance inside the ROI. If the position of a detected
45 vehicle is currently at Point P (xp, yp) and the start line (BC) of ROI is connecting
46 the two points B (xB , yB) and C (xC , yC), then the slope (m) of Line BC is given by
47 Eq. 2:
48
𝑦𝐵 − 𝑦𝐶
49 𝑚= (2)
50 𝑥𝐵 − 𝑥𝐶
A. Al Kherret, A. Al Sobky, and R. Mousa 5

1 The travel distance (TD) can be calculated as the perpendicular distance from the
2 vehicle position (P) to the start line of ROI as shown in Eq. 3 below.
3
4 𝑚 𝑥𝑝 − 𝑥𝐵 + 𝑦𝐵 − 𝑦𝑝 (3)
𝑇𝐷 =
5 𝑚2 +1
6
7
8 Stream Processing Loop
9 The main purpose of this loop is to detect vehicles in the input video. The processing
10 loop uses variables created in the initialization stage and external functions mentioned above.
11 The loop includes three stages. Stage 1 reads the input video frame and detects the
12 foreground. Foreground detection means converting the colored frame, as shown in Figure 1-
13 a, to a binary image (black and white image) with the same dimensions based on a
14 conversation threshold. Black areas refer to the fixed background of the scene whereas white
15 areas (blobs) refer to the moving objects, as shown in Figure 1-b. The foreground
16 segmentation process does not produce perfect moving objects and often includes undesirable
17 noise due to the use of improper conversation threshold. In Stage 2, the noise is removed
18 from the foreground image using special morphological filters and another proper binary
19 image is produced as shown in Figure 1-c.
20 Stage 3 begins by establishing the bounding box around every blob in the foreground
21 image and then determining the center coordinates of each box as shown in Fig. 1-d. The
22 external functions can be used to determine the travel lane and travel distance inside ROI.
23

a) Original video image c) Image after removing noise

d) Image after establishing boxes around


b) Image after foreground segmentation
detected vehicles

FIGURE 1 Steps executed in the vehicle detection process


24
25 Finally, the frame number, X-center, Y-center, travel distance, and lane number are
26 stored in “Frame-by-Frame” array. For simplicity, this frame is referred to as FBF Array.
27 Effective frames are only those frames of vehicles inside the ROI. The “FBF” Array is the
28 major output of the vehicle detection process. Table 1 shows an example of this output.
29
30
A. Al Kherret, A. Al Sobky, and R. Mousa 6

1 TABLE 1 An Example of Detection Data Stored in “FBF” Array


No. Frame No. X-Center Y-Center Lane No. TD
.. .. … … . …….
91 62 801.5921 273.6767 2 25.4358
92 63 737.9049 270.7861 2 88.8748
93 64 661.2954 273.7859 2 164.8223
94 64 777.1307 197.1886 1 42.2238
95 65 593.6962 273.1075 2 232.5244
96 65 701.0692 197.3018 1 117.8907
97 66 513.2786 273.9481 2 312.1738
98 66 625.7424 197.2828 1 193.5577
99 67 553.7843 197.2428 1 265.2422
100 68 481.0581 197.4910 1 336.9268
101 69 825.4619 349.5140 3 8.6478
102 70 753.7151 349.9878 3 80.3323
103 71 674.3733 349.4387 3 158.9861
104 72 601.5645 351.7578 3 231.8533
105 73 521.0824 350.6503 3 311.4092
106 87 802.1127 270.1045 2 24.1596
107 88 737.7146 269.0123 2 88.7813
.. .. … … . …….
2
3 The first column in this table gives a global serial number assigned to each detection
4 in "FBF" Array and repeated frame numbers mean records of multiple vehicles detected in
5 the same frame.
6
7 Vehicle Tracking Methodology
8 In its simplest form, the vehicle tracking aims to keep track of already detected
9 vehicles and isolate data of each vehicle. At the end of this process frames of the same
10 vehicle are stored in a separate sheet or array called "VEH" Array. The number of sheets in
11 this array is equal to the number of vehicles processed in the video, i.e., each page (or sheet)
12 is dedicated to only one vehicle. The flowchart in Figure 2 illustrates the main steps executed
13 during the tracking process. While in tracking process, a frame in question in “FBF” Array
14 belongs to certain vehicle in VEH Array if the following checks with last frame of that
15 vehicle (REF) are satisfied:
16  Frame numbers of frame in question and REF are not equal,
17  The distance between the two frame centers is less than the preset “Max-Step”,
18  The travel lane is the same for both frames, and
19  The travel distance in ROI of frame in question is less than that of “REF” frame.
20
21 An example of the “VEH” Array resulting for one vehicle is shown in Table 2, which
22 indicates that the vehicle was traveling in lane No. 2 and entered the ROI in Frame No. 62
23 and left it in Frame No. 66. The last column shows travel distance of this vehicle (in pixels),
24 measured from the start of ROI.
25
A. Al Kherret, A. Al Sobky, and R. Mousa 7

1
2 FIGURE 2 Flowchart depicting the logic of the proposed model in vehicle tracking
A. Al Kherret, A. Al Sobky, and R. Mousa 8

1 TABLE 2 Example of One Vehicle Tracking Data Stored in “VEH” Array


2
3 X-Center Y-Center Distance
No. Frame No. Lane No.
4 (pixels) (pixels) (pixels)
5 91 62 801.5921 273.6767 2 25.4358
6 92 63 737.9049 270.7861 2 88.8748
7
93 64 661.2954 273.7859 2 164.8223
8
9 95 65 593.6962 273.1075 2 232.5244
10 97 66 513.2786 273.9481 2 312.1738
11
12
13 Traffic Data Collection Module
14 This module utilizes the proposed model in acquiring traffic data from the detected
15 and tracked vehicles. Types of data that can be collected by the proposed model are
16 discussed in the following sections.
17
18 Calculation of Spot Speed in the ROI
19 Estimating a vehicle speed depends on the data stored in “VEH” Array for such
20 vehicle. The coordinates of the center point are used to measure the travel distance inside
21 ROI in pixels, then the conversion factor is used to convert this distance into meters.
22 Similarly, differences in the frames numbers determine the travel time inside ROI in terms of
23 frames. The frame rate of video is then used to convert the travel time into seconds. For
24 example, using Table 2, the total travel distance (TD) is computed as 288.3 pixels. Similarly,
25 the total travel time (TT) of this vehicle is 4 frames (Leaving frame – Entry frame). Using the
26 distance conversion factor of 0.022 (m/pixel) and frame rate of 10 frame/sec, the vehicle
27 speed can be calculated as:
28 288.3136 × 0.022
29 𝑉= = 15.9 𝑚/𝑠𝑒𝑐 or 57.1 km/h
4/10
30
31
32 Calculation of Headways in the ROI
33 The headway between two successive vehicles traveling in the same lane can be
34 determined since time of the entry frame to ROI is recorded for each vehicle. Referring to
35 Table 1, the first vehicle entered ROI in Lane no. 2 in Frame no. 62 and the next vehicle
36 entered the same lane in Frame 87. The headway can then be calculated using the video
37 frame rate 25/10 or 2.5 sec.
38
39 Calculations of Other Traffic Data
40 Other traffic data can be obtained. As such, vehicle count can be taken the same as the
41 number of detections or headways in each lane. This traffic count can be used to calculate the
42 traffic flow rate (Q) in vph. Average traffic speed (V) can also be computed from speeds of
43 individual vehicles measured in the ROI. The gaps between successive vehicles can also be
44 computed by multiplying the headway between each two vehicles by the speed of the lag
45 vehicle. The average traffic density (K) can be computed as Q/V in veh/km.
46
47 VALIDATION OF THE DEVELOPED MODEL
48 This section presents the validation of the proposed model using video clips generated
49 in VISSIM Software. The reasons for using simulation for validation include; (a) difficulty in
50 obtaining permits in Cairo City to record video films with the required specifications and
A. Al Kherret, A. Al Sobky, and R. Mousa 9

1 clarity, and (b) VISSIM can report the exact time and speed of each vehicle when it crosses
2 certain data collection station. This feature eliminates the possibility of human errors in case
3 data is extracted manually from played video clips.
4
5 Preparation of Video Clips for use in Validation
6 Mimbela and Klein (22) reported that higher mounting camera position allows for
7 better angle and wider view, covering all lanes on the road. On the contrary, lower mounting
8 heights would not provide effective images as some vehicles may hide part of other vehicles
9 from the scene. As a result, video image processing recognizes overlapped vehicles as single
10 objects. Due to this fact, camera location was selected to provide sufficient field of vision and
11 prevent overlapping of vehicles. The camera height was set to 30 m with 1 m lateral offset
12 from edge of road, and 65° pitch angle.
13 A 6-lane divided highway with 3.5 m lane width was created in VISSIM and traffic
14 was simulated for 330 sec. Figure 3 shows the layout of this road section and the directions
15 (Far or Near) with respect to the camera location. Lanes in each direction are labeled shoulder
16 lane, middle lane, and median lane.
17

18 FIGURE 3 Layout of road section considered in VISSIM for producing video clips
19
20 Before the start of simulation, a section of 30 m long was considered for data
21 collection. In particular, 13 lines were drawn across the 6 lanes at 2.5 m intervals. The total
22 distance between the first and last lines is 30 m. The intersection points of these lines with
23 each lane give 13 stations for data collection along each lane. This makes a total of 78 data
24 collection stations (or points) in the 6 lanes. The Numbering and arrangement of these
25 stations across the 6 lanes and lines is shown in Figure 4.
26 At the end of simulation, VISSIM creates two files. The first file is AVI format and
27 contains the video clip of simulated traffic motion and the second file is in text format and
28 contains speed and passing time of each vehicle at data collection points.
29
A. Al Kherret, A. Al Sobky, and R. Mousa 10

1
2
3
4
5 Far
6 direction
7
8
9
10
11
12 Near
13 direction
14
15
16
17 FIGURE 4 Locations of the 78 data collection points across the 6 lanes
18
19 Running the Developed Model for Data Collection
20 In Matlab environment, the developed model was utilized to analyze the video clip
21 (AVI file) for different lengths of ROI, namely, 5, 10, 15, 20, 25 and 30 m. For each ROI
22 length, the model was set up to detect, track, and collect traffic data for that ROI length.
23 Model data are then compared with actual values provided by VISSAM. As such, when the 5
24 m ROI is used, the model considers the ROI to be the length between the first and third lines
25 marked in the video clip. For comparing results of shoulder lane of Far direction, for
26 example, traffic data obtained from the model are compared with the data obtained from
27 VISSIM at Collection Points no. 1, 2, and 3. Similarly, when the 30 m ROI is considered, the
28 model data for the same lane are compared with VISSIM data collected at Points no. 1, 7, and
29 13, and so on.
30
31 Comparative Analysis of Model Results
32 The developed model was run 6 times to detect and track moving vehicles in the
33 video clip for 6 different lengths of region of interest (ROI). Results obtained from the model
34 are compared with their counterparts in VISSIM to check model accuracy as presented in the
35 following sections.
36
37 Comparison of Traffic Counts
38 The model succeeded to detect and track all vehicles simulated in the video clip for all
39 lanes and all ROI lengths. These counts were the same as actual counts reported by VISSIM
40 and, which were also easy to count manually in played video clip. As expected, the number
41 of vehicles counted in each lane is identical for all ROI lengths.
42
43 Comparison of Vehicles Speed
44 This comparison was established to check the model accuracy in estimating vehicle
45 speeds for all ROI lengths. This check was made in three steps. First, the check was made by
46 plotting the speed obtained from model versus the actual speed obtained from VISSIM. As an
47 example, Figure 5 depicts this comparison for the shoulder lane of the Near Direction and
48 ROI of 10 m. The figure clearly shows that model speeds are very close to actual speeds

49 (Refer to the 45 line in figure). This accuracy is applicable for all lanes and all ROI lengths.
A. Al Kherret, A. Al Sobky, and R. Mousa 11

60
Speed obtained from model (km/h)

55

50
Speed of individual vehicles
45- degree line

45
45 47 49 51 53 55 57 59
Actual speed (km/h)
1
2 FIGURE 5 Comparison of model speed accuracy
3
4 The second step of comparison was made by computing the mean and standard
5 deviation of the speeds obtained from model and VISSIM. The accuracy of the model
6 estimates was expressed as the ratio of the mean speed of model and mean speed of actual
7 values. Computed speed ratios for all traffic lanes and ROI lengths range between 96.7% and
8 99.5%, with higher ranges for Near direction lanes and ROI of 10 and 15. Similar ratios for
9 standard deviation were computed, and were all greater than 1.0. This means that the
10 developed model produces relatively higher variation in individual speeds, and this variation
11 is higher for Far direction lanes than for Near direction lanes. The minimum variation is
12 reported with ROI lengths of 10 and 15 m, where standard deviation ratios are close to 1.0.
13 The third step in comparison to conclude the model validation was to perform t-tests
14 on the two data sets for each ROI case. Before conducting this test, however, the
15 Kolmogorov-Smirnov test was performed on the data sets to check whether observations of
16 each data set are normally distributed. The test results confirmed that all data are normally
17 distributed. Results of the t-tests are shown in Table 3 for different lanes and ROI lengths.
18
19 TABLE 3 T-Test Results for Comparison of Model Speeds (P-value)
20
Near-Direction Far-Direction
ROI
Length Shoulder Shoulder Shoulder Shoulder Middle Median
Lane Lane Lane Lane Lane Lane
5m 0.049 0.108 0.004 0.008 0.005 0.002
10 m 0.534 0.499 0.470 0.170 0.136 0.159
15 m 0.431 0.351 0.324 0.163 0.131 0.363
20 m 0.021 0.063 0.017 0.032 0.007 0.036
25 m 0.086 0.083 0.299 0.058 0.002 0.033
30 m 0.117 0.011 0.018 0.000 0.001 0.000
21
A. Al Kherret, A. Al Sobky, and R. Mousa 12

1 Based on the results of the t-tests, it can be concluded that the model produces speeds
2 that are not significantly different from actual speeds for ROI lengths of 10 and 15 m, and
3 this is valid for all 6 lanes. It is interesting to note that although the model produces speeds
4 having average speed greater than 96.5% of actual mean speed for ROI of 5, 20, 25, and 30
5 m, the difference between the two means was significant at the 5% level.
6
7 Comparison of Measured Headways
8 Measuring the individual headways (or gaps) between successive vehicles is essential
9 because they indicate how vehicles are dispersed and whether they follow too close from
10 each other. It can also help detect the presence of queues on the road. Beside applications in
11 safety issues, the number of headways can be directly used to compute the traffic flow rate
12 (Q). With the average speed (V) and flow rate (Q) available, one can readily calculate the
13 average traffic density (K) as the subdivision of Q and V (or K = Q/V).
14 The model accuracy was also checked for optimum lengths of ROI, namely, 10 and
15 15 m. Figure 6 depicts a comparison of the model accuracy in measuring headways. The t-
16 test was also run on measured headways and results confirm the model validity. All test
17 results confirm that the differences between mean headway produced by the model and mean
18 actual headway are not significant at the 5% significance level. Furthermore, the t-test for
19 matched pairs also confirmed the same finding.

8
Headway obtained from model (sec)

2 Headways of individual vehicles


45-degree line

0
0 2 4 6 8
Actual headway (sec)

20
21 FIGURE 6 Comparison of model headway accuracy
22
23 MODEL PROCESSING TIME
24 The execution time of processing 20 fps video clips of resolution 1280×720 pixels
25 was about 1.48 sec/frame or 29.6 sec/sec for processing the 20 frames. The time taken to
26 detect and identify the foreground comprises about 92% of total execution time. Attempts
27 were made to minimize the total execution time while maintaining almost the same accuracy.
28 These included processing every other frame, which reduces the execution time by half (14.8
29 sec/sec). Attempts also included reducing image resolution to 640 x 360 pixels, which further
A. Al Kherret, A. Al Sobky, and R. Mousa 13

1 reduced the execution time by a factor of 0.206 (3.04 sec/sec). In order to match real-time
2 processing, the image was cropped to the ROI zone only. Cropping image means processing
3 the ROI only and neglecting the rest of the image. After cropping the image, the execution
4 time was reduced to 0.96 sec/sec when all 20 frames are processed. Since this execution time
5 is less than 1.0 sec/sec, the model is capable of processing real-time applications. T-tests
6 were performed to compare values of original data set with their counterparts after reducing
7 execution time (i.e., after reducing resolution & cropping image). Results confirmed that
8 there are no significant differences between the means of two data sets at the 5% significance
9 level.
10
11 CONCLUSIONS AND RECOMMENDATIONS
12 This paper presents a multiple-vehicle surveillance model, written in Matlab
13 programming language, for vehicle detection, tracking, and collection of traffic data. The
14 model was validated by processing video clips created in VISSIM. Based on the analysis
15 presented in this paper, it can be concluded that the proposed model is a valuable tool for
16 collecting essential traffic data such as speed, flow, and headways, which can save time and
17 resources. The model produces its best results with optimum ROI lengths, namely, 10 and 15
18 m. The model processes each second of video clip having 20 fps in 0.96 second. This rate
19 qualifies the developed model for real-time applications such as incident detection, detection
20 of queues, intelligent transportation system, etc. However, the model was validated using
21 ideal conditions in video clips of simulated traffic streams. Accordingly, the model
22 applications might be limited to such assumptions. It is recommended that model be validated
23 using real-life video clips containing noises such as lane changes, light variation, shadows,
24 vibration due to wind, skewed views, and/or trucks that obscure full view of vehicles.
25
26 ACKNOWLEDGMENT
27 This research is part of a Ph.D. research conducted in the Faculty of Engineering,
28 Cairo University, Egypt. Simulation modeling was performed using licensed VISSIM
29 Software in the Transportation Laboratory, Faculty of Engineering, Ain Shams University.
30
31 REFERENCES
32 1. Cathey, F.W.; Dailey, D.J. A novel technique to dynamically measure vehicle speed
33 using uncalibrated roadway cameras. In Proceedings of the IEEE Intelligent Vehicles
34 Symposium, Las Vegas, NV, USA, 6-8 June 2005; pp.777-782.
35 2. Grammatikopoulos, L.; Karras, G.; Petsa, E. Automatic estimation of vehicle speed
36 from uncalibrated video sequences. In Proceedings of the Int. Symposium on Modern
37 Technologies, Education and Professional Practice in Geodesy and Related Fields,
38 Sofia, Bulgaria, 3-4 November 2005; pp. 332-338.
39 3. Melo, J.; Naftel, A.; Bernardino, A.; Victor J.S. Viewpoint independent detection of
40 vehicle trajectories and lane geometry from uncalibrated traffic surveillance cameras.
41 In Proceedings of the International Conference on Image Analysis and Recognition,
42 Porto, Portugal, 29 September-1 October 2004; pp. 454-462.
43 4. Morris, B.; Trivedi, M. Improved vehicle classification in long traffic video by
44 cooperating tracker and classifier modules. In Proceedings of the IEEE International
45 Conference on Advanced Video and Signal Based Surveillance, Sydney, Australia,
46 22-24 November 2006.
47 5. B. Coifman, D. Beymer, P. McLauchlan and J. Malik, “A real-time computer vision
48 system for vehicle tracking and traffic surveillance,” Transportation Research Part C,
49 vol.6, no. 4, pp. 777-782,1998.
A. Al Kherret, A. Al Sobky, and R. Mousa 14

1 6. D. Bauer, A. N. Belbachir and N. Donath, et al., “Embedded Vehicle Speed


2 Estimation System Using an Asynchronous Temporal Contrast Vision Sensor,”
3 EURASIP J. on Embedded Systems, vol. 2007, Article ID 82174, 12 pages, 2007.
4 7. J. C. Tai, S. T. Tseng, C. P. Lin and K. T. Song, ”Real-time image tracking for
5 automatic traffic monitoring and enforcement applications,” Image Vis. Comput., vol.
6 22, pp. 485, Jun 2004.
7 8. D. J. Dailey, F. W. Cathey and S. Pumrin, “An algorithm to estimate mean traffic
8 speed using uncalibrated cameras,” IEEE Trans. On Intelligent Transportation
9 Systems, vol. 1, no. 2, pp. 98-107, June 2000.
10 9. Sheikh, K. and Abu-Bakar, S. Three-dimensional pose estimation from two-
11 dimensional monocular camera images for vehicle classification. Proc. of 6th WSEAS
12 International Conference on Circuits, Systems, Electronics, Control and Signal
13 Processing, Dec 2007, pp. 356-361.
14 10. Parekh, H.S., Thakore, D. G., and Jaliya, U. K. A Survey on Object Detection and
15 Tracking Methods. International Journal of Innovative Research in Computer and
16 Communication Engineering (IJIRCCE), Vol. 2, Issue 2, February 2014.
17 11. Athanesious, J., and Suresh, P. Systematic Survey on Object Tracking Methods in
18 Video. International Journal of Advanced Research in Computer Engineering &
19 Technology (IJARCET), Volume 1, Issue 8 October 2012, 242-247.
20 12. Kastrinaki, V., Zervakis, M., and Kalaitzakis, K. A survey of video processing
21 techniques for traffic applications. Image and Vision Computing 21 (2003), pp. 359–
22 381.
23 13. Yilmaz, A., Javed, O., and Shah, M. Object tracking: A survey. ACM Computing
24 Surveys, Vol. 38, No. 4, Article, pp. 266-280, December 2006.
25 14. Hu, W., Tan, T., Wang, L., and Maybank, S. A Survey on Visual Surveillance of
26 Object Motion and Behaviors. IEEE Transactions on Systems, Man, and
27 Cybernetics—Part C: Applications and Reviews, Vol. 34, No. 3, August 2004.
28 15. Stauffer, C. and Grimson, W. L. Adaptive Background Mixture Models for Real-Time
29 Tracking. Computer Vision and Pattern Recognition, IEEE Computer Society
30 Conference, Vol. 2 (06 August 1999), pp. 2246-252.
31 16. Kaewtrakulpong, P. and Bowden, R. An Improved Adaptive Background Mixture
32 Model for Realtime Tracking with Shadow Detection. In Proc. 2nd European
33 Workshop on Advanced Video Based Surveillance Systems, AVBS01, Video Based
34 Surveillance Systems: Computer Vision and Distributed Processing (September 2001)
35 17. MATLAB User’s Guide (2012). MathWorks. www.mathworks.com.
36 18. Martin, P., Feng Y., and Wang X. Detector Technology Evaluation. Publication UT-
37 03.30. Utah Department of Transportation, Salt Lake City, UT, (2003).
38 19. Klein, L. A., Mills, M. K., and Gibson, D. P. Traffic Detector Handbook. Third
39 Edition - Volume I. Turner-Fairbank Highway Research Center, McLean, VA,
40 (2006).
41 20. Klein, L. Sensor Technology and Data Requirements for ITS. Artech House, Boston,
42 (2001)
43 21. Leduc, G. Road Traffic Data: Collection Methods and Applications. Institute for
44 Prospective Technological Studies, (2008).
45 22. Mimbela, L. and Klein, L. A Summary of Vehicle Detection and Surveillance
46 Technologies Used in Intelligent Transportation Systems. FHWA Intelligent
47 Transportation Systems Program Office, (2007).
48 23. Rad, A. G., Dehghani, A., and Karim, M. R. Vehicle speed detection in video image
49 sequences using CVS method. International Journal of the Physical Sciences, Vol.
50 5(17), pp. 2555-2563.
A. Al Kherret, A. Al Sobky, and R. Mousa 15

1 24. Rahim, H. A., Sheikh, U. U., Ahmad, R. B., and Zain, A. S. Vehicle Velocity
2 Estimation for Traffic Surveillance System. World Academy of Science, Engineering
3 and Technology, Vol:4 2010-09-22. Pp. 686 - 689.
4 25. Grammatikopoulos, L., Karras, G., Petsa, E. Automatic Estimation of Vehicle Speed
5 from Uncalibrated Video Sequences. International Symposium on Modern
6 Technologies, Education and Professional Practice in Geodesy and Related Fields
7 Sofia, 03 – 04 November, 2005, Pp. 332-338.
8 26. Temiz, M. S, Kulur, S., Dogan, S. Real Time Speed Estimation from Monocular
9 Video. International Archives of the Photogrammetry, Remote Sensing and Spatial
10 Information Sciences, Volume XXXIX-B3, 2012. XXII ISPRS Congress, 25 August –
11 01 September 2012, Melbourne, Australia.
12 27. Dailey, D. J. and Li, L. Algorithm for Estimating Mean Traffic Speed with
13 Uncalibrated Cameras. In Transportation Research Record: Journal of the
14 Transportation Research Board, No. 1719, Transportation Data, Statistics, and
15 Information Technology. Transportation Research Board of the National Academies,
16 Washington, D.C., 2000, Pp. 27-32 .

View publication stats

You might also like