«Research Report Agreement T2695 Task 61 Single Loop Video Data IMPROVING TRUCK AND SPEED DATA USING PAIRED VIDEO AND SINGLE-LOOP SENSORS by Yinhai ...»
Agreement T2695 Task 61
Single Loop Video Data
IMPROVING TRUCK AND SPEED DATA
USING PAIRED VIDEO AND SINGLE-LOOP SENSORS
Yinhai Wang Nancy L. Nihan Ryan P. Avery Guohui Zhang
Assistant Professor Professor/Director Graduate Research Graduate Research
Transportation Northwest Assistant Assistant
Department of Civil and Environmental Engineering University of Washington Seattle, Washington 98195-2700 Washington State Transportation Center (TRAC) University of Washington, Box 354802 1107 NE 45th Street, Suite 535 Seattle, Washington 98105-4631 Washington State Department of Transportation Technical Monitor Ted Trepanier, State Traffic Engineer Sponsored by Washington State Transportation Commission Transportation Northwest (TransNow) Washington State Department of Transportation University of Washington Olympia, Washington 98504-7370 135 More Hall, Box 352700 Seattle, Washington 98195-2700 and in cooperation with U.S. Department of Transportation Federal Highway Administration December 2006
TECHNICAL REPORT STANDARD TITLE PAGE
2. GOVERNMENT ACCESSION NO. 3. RECIPIENT’S CATALOG NO.
4. TITLE AND SUBTITLE 5. REPORT DATE Improving Truck and Speed Data Using Paired Video and Single- December 2006 Loop Sensors 6. PERFORMING ORGANIZATION CODE
7. AUTHOR(S) 8. PERFORMING ORGANIZATION REPORT NO.
Yinhai Wang, Nancy Nihan, Ryan Avery, and Guohui Zhang TNW
9. PERFORMING ORGANIZATION NAME AND ADDRESS 10. WORK UNIT NO.
Washington State Transportation Center (TRAC) University of Washington, Box 354802 University District Building; 1107 NE 45th Street, Suite 535 11. CONTRACT GRANT NO.
Agreement T2695 Task 61 Seattle, Washin
Transportation Building, MS 47372 Olympia, Washington 98504-7372 14 Doug Brodin, Project Manager, 360-705-7972
15. SUPPLEMENTARY NOTES This study was conducted in cooperation with the University of Washington and the US Department of Transportation
16. ABSTRACT Real-time speed and truck data are important inputs for modern freeway traffic control and management systems. However, these data are not directly measurable by single-loop detectors.
Although dual-loop detectors provide speeds and classified vehicle volumes, there are too few of them on our current freeway systems to meet the practical needs of advanced traffic management systems. This makes it extremely desirable to develop appropriate algorithms to calculate speed and truck volume from single-loop outputs or from video data.
To obtain quality estimates of traffic speed and truck volume data, several algorithms were developed and implemented in this study. These algorithms are (1) a speed estimation algorithm based on the region growing mechanism and single-loop measurements; (2) a set of computer – vision-based algorithms for extracting background images from a video sequence, detecting the presence of vehicles, identifying and removing shadows, and calculating pixel-based vehicle lengths for classification; and (3) a speed estimation algorithm that uses paired video and singleloop sensor inputs. These algorithms were implemented in three distinct computer applications.
Field-collected video and loop detector data were used to test the algorithms.
Our test results indicated that quality speed and truck volume data can be estimated with the proposed algorithms by using single-loop data, video data, or both video and single-loop data. The Video-based Vehicle Detection and Classification (VVDC) system, based on the proposed video image processing algorithms, provides a cost-effective solution for automatic traffic data collection with surveillance video cameras. For locations with both video and singleloop sensors, speed estimates can be improved by combining video data with single-loop data.
17. KEY WORDS 18. DISTRIBUTION STATEMENT Trucks, Data Collection, Computer Vision, Loop Detectors, Vehicle Classification, Video Image Processing, Speed
19. SECURITY CLASSIF. (OF THIS REPORT) 20. SECURITY CLASSIF. (OF THIS PAGE) 21. NO. OF PAGES 22. PRICE
The contents of this report reflect the views of the authors, who are responsible for the facts and accuracy of the data presented herein. This document is disseminated through the Transportation Northwest (TransNow) Regional Center under the sponsorship of the U.S. Department of Transportation UTC Grant Program and through the Washington State Department of Transportation. The U.S. Government assumes no liability for the contents or use thereof. Sponsorship for the local match portion of this research project was provided by the Washington State Department of Transportation.
The contents do not necessarily reflect the views or policies of the U.S. Department of Transportation or Washington State Department of Transportation. This report does not constitute a standard, specification, or regulation.
Part I Research Background
1.1 RESEARCH BACKGROUND
1.2 PROBLEM STATEMENT
1.3 RESEARCH OBJECTIVE
2.0 STATE OF THE ART
2.1 ESTIMATING SPEED AND TRUCK VOLUMES USING SINGLE-LOOPMEASUREMENTS
2.2 VEHICLE DETECTION AND CLASSIFICATION USING VIDEO IMAGE PROCESSING..10Part II Speed and Bin-Volume Estimates Using Single-Loop Outputs
3.0 SINGLE LOOP ALGORITHM DESIGN
3.1 PROPERTIES OF VEHICLE LENGTH DISTRIBUTION
3.2 ALGORITHM DESIGN
3.3 ALGORITHM IMPLEMENTATION
4.0 SINGLE LOOP ALGORITHM TESTS
4.1 TEST SITES
4.2 TEST RESULTS AND DISCUSSION
4.3 SINGLE-LOOP ALGORITHM TEST SUMMARY
Part III Video Image Processing for Vehicle Detection and Classification
5.0 VIDEO RESEARCH APPROACH
5.1 BACKGROUND EXTRACTION
5.2 VEHICLE DETECTION
5.3 SHADOW REMOVAL
5.4 LENGTH-BASED CLASSIFICATION
6.0 DEVELOPMENT OF THE VIDEO-BASED VEHICLE DETECTION ANDCLASSIFICATION SYSTEM
6.1 SYSTEM ARCHITECTURE
6.2 LIVE VIDEO CAPTURE MODULE
6.3 USER INPUT MODULE
6.4 BACKGROUND EXTRACTION MODULE
6.5 VEHICLE DETECTION MODULE
6.6 SHADOW REMOVAL MODULE
6.7 VEHICLE CLASSIFICATION MODULE
7.0 VVDC SYSTEM TESTS AND DISCUSSION
7.1 TEST CONDITIONS AND DATA
7.2 OFFLINE TESTS
v 7.2.1 The I-5 Test Location
7.2.2 The SR 99 Test Location
7.3 ONLINE TEST
7.4 VVDC SYSTEM TEST SUMMARY
Part IV Paired Video and Single-Loop Sensors
8.0 PAIRED VIDEO AND SINGLE-LOOP SENSOR ALGORITHM
8.2 ALGORITHM DESIGN
9.0 SSYSTEM DEVELOPMENT FOR PAIRED VIDEO AND SINGLELOOP SENSORS
9.1 SYSTEM DESIGN
9.2 SYSTEM IMPLEMENTATION
10.0 TEST OF THE PAIRED VIDEO AND SINGLE-LOOP SYSTEM
10.1 TEST SITES AND DATA
10.2 TEST RESULTS AND DISCUSSION
10.3 TEST SUMMARY FOR THE PAIRED VL SYSTEM
11.0 CONCLUSIONS AND RECOMMENDATIONS
Figure 3-1: Length Distribution of Vehicles on Southbound I-5
Figure 3-2: SV and LV Length Distributions with Normal Distribution Curves..............19 Figure 3-3: Congestion Occupancy Threshold
Figure 3-4: Single-Loop Region Growing Algorithm Flowchart
Figure 3-5: Interval Groups after Region Growing
Figure 3-6: User Interface of the ST-Estimator System
Figure 3-7: Real-Time Data Window of the ST-Estimator System
Figure 3-8: ST-Estimator’s Program Settings Interface
Figure 4-1: Estimated vs. Actual Speeds for Region Growing and WSDOT Algorithms with Period Lengths of 3 and 5 Minutes on Lane 2 of SB I-5 at NE 145th St, May 17, 2005
Figure 5-1: An Example Video Scene and Its Background
Figure 5-2: The Components of the Virtual Detector
Figure 5-3: Otsu Method for Shadow Removal on a Bright Vehicle and a Dark Vehicle
Figure 5-4: Otsu Method for Shadow Removal with a Non-Uniform Cast Shadow.........45 Figure 5-5: A Successful Example of the Region Growing Shadow Removal Method....45 Figure 5-6: An Unsuccessful Example of the Region Growing Shadow Removal Method
Figure 5-7: Sample of Edge Imaging (Assuming the Bounding Box Includes the Entire Image)
Figure 5-8: An Example of a Detected Truck Before and After Shadow Removal..........50 Figure 6-1: Components of the VVDC System
Figure 6-2: Flow Chart of the VVDC System
Figure 6-3: The Main User Interface of the VVDC System
Figure 6-4: The Interactive Configuration Interface
Figure 6-6: Extracted Background Image
Figure 6-7: A Snapshot of the VVDC System When a Vehicle is Detected and Classified
Figure 6-8: Detection of Moving Blobs through Background Subtraction
Figure 6-9: A Step by Step Illustration of the Shadow Removal Process
Figure 7-1: Southbound I-5 Near the NE 145th Street Over-crossing
Figure 7-2: Northbound SR 99 Near the NE 41st Street Over-crossing
Figure 7-3: Live Video Display at the STAR Lab
Figure 7-4: Southbound I-5 Near the NE 92nd Street Over-crossing
Figure 7-5: A Truck Triggered Both Lane 1 and Lane 2 Detectors
Figure 7-6: A Lane-Changing Vehicle Missed by the VVDC System
Figure 7-7: A Misclassified Truck with a Color of the Bed Similar to the Background Color
Figure 7-8: One Vehicle Driving on the Shoulder Did Not Trigger the Detector.............74 Figure 7-9: A Lane-Changing Car Was Missed
Figure 7-10: A Gas Tank Was Misclassified Because of the Large Distance between the Two Containers
Figure 7-11: Truck Over-Count Due to Longitudinal Occlusion
Figure 8-1: Flow Chart of the Paired VL Sensor System
Figure 8-2: Schematic of the WSDOT Video Signal Communication System.................83 Figure 9-1: Flow Chart for the Paired VL System
Figure 9-2: The Time Synchronization module for Video and Loop Subsystems............92 Figure 9-3: A Snapshot of the Speed Estimation in a 20-Second Interval
Figure 10-1: A Snapshot of the Test Site for the Paired VL System
Figure 10-2: Comparison between the Observed Speeds and Estimated Speeds at Test Site I
viii Figure 10-3: Comparison between the Observed Speeds and Estimated Speeds at Test Site II
Table 1-1: WSDOT Dual-loop Length Classification
Table 3-1: Vehicle Length Distribution Statistics
Table 3-2: Vehicle Length Distribution Statistics by Lane Occupancy Level..................24 Table 4-1: Site Information and Interval Vehicle Volume Statistics
Table 4-2: Summary of Speed Estimation Results
Table 4-3: Summary of LV Volume Estimation
Table 7-1: Offline Test Results from the I-5 Test Location
Table 7-2: Error Cause Investigation for Offline Test at the I-5 Test Location................71 Table 7-3: Offline Test Results from the SR 99 Test Location
Table 7-4: Error Cause Investigation for the Offline Test on SR 99
Table 7-5: Results of the Online Test at Southbound I-5 Near the NE 92nd Streetcrossing
Table 7-6: Error Cause Investigation for the Online Test on Southbound I-5 Near the NE 92nd Street Over-crossing
Table 8-1: Processing Delay for Each Input Position
Table 10-1: Online Test Results from the Two Test Locations
Traffic speed and truck volume data are important variables for transportation planning, pavement design, traffic safety, traffic operations, and car emission controls.
However, these data are not directly measured by single-loop detectors, which are the most widely available type of sensor on roadway networks in the U.S. In order to obtain quality estimates of traffic speed and truck volume data from single-loop detectors and from video detectors, several algorithms were developed and tested in this study.
First, a new speed estimation algorithm that uses single-loop data was developed.
This algorithm applies the region growing mechanism commonly used in video image processing. This region growing algorithm, together with a vehicle classification algorithm based on the Nearest Neighbor Decision (NND) rule, was implemented in the single-loop Speed and Truck volume Estimator (ST-Estimator) for improved speed and truck volume data. Test results on the ST-Estimator indicated that the new speed algorithm achieved much better accuracy than the traditional algorithm used by most traffic management centers. By using the speed estimated with the new algorithm, long vehicle (LV) volumes can be estimated for vehicle classification purposes on the basis of the NND rule. LV volume errors estimated at three test locations in Seattle (the second lanes at station ES-167D, station ES-172R, and station ES-209D) were within 7.5 percent over a 24-hour period. The ST-Estimator test results indicated that the ST-Estimator can be employed to obtain reasonably accurate speed and LV volume estimates at single-loop stations.
Second, several computer –vision-based algorithms were developed or applied to extract the background image from a video sequence, detect the presence of vehicles,
These algorithms were implemented in the prototype Video-based Vehicle Detection and Classification (VVDC) system by using Microsoft Visual C#. As a plug and play system, the VVDC system is capable of processing live video signals in real time. The VVDC system can also be used to process digitized video images in the JPEG or BMP formats.