SlideShare a Scribd company logo
1 of 101
Introduction
TraVis: Web-Based
Vehicle Counter with
Traffic Congestion
Estimation Using
Computer Vision
Presented by:
Aguirre, Byron Franco
Alcantara, Jan Andre
Trinidad, John Ferdinand
Thesis adviser:
Dr. Joel P. Ilao
Outline
Introduction
Problem Statement
General Objectives
Specific Objectives
Project Scope and
Limitation
System Overview
System Implementation
Demo
Experiments
Conclusion
Problem Statement
Problem Statement
In the Philippines, many traffic cameras are being
installed where recorded traffic videos are monitored by
traffic personnel. However, these cameras might have
been recording videos 24/7 but the people who
monitor them might not be watching. The
“unmonitored” videos then become unused since a
traffic situation has already occurred in an area. With
this, a traffic monitoring system that makes
use of all recorded videos can provide
information to the public regarding the traffic situation in
an area.
Objectives
General Objective
• The aim of this study is to develop a
vision-based system for counting
vehicles and estimating traffic
congestion levels in road sections
installed with traffic surveillance cameras,
accessible through a web interface.
Specific Objectives
● gather traffic videos taken by roadside
traffic surveillance cameras;
● develop machine vision algorithms
for processing traffic videos that can:
o classify vehicles according to type;
o track and count the number of vehicles
seen;
Specific Objectives (cont.)
● generate graphs of traffic congestion
levels based on vehicle count statistics
estimated from traffic videos;
● design a suitable database for efficiently
storing traffic surveillance videos and
corresponding traffic statistics; and
● develop an interactive web interface for
accessing relevant data and information from
traffic surveillance videos;
Project Scope and Limitation
This study will count and classify vehicles
seen in a traffic surveillance camera’s
Field Of View via application of computer
vision techniques. The system that will be
developed can:
● identify and classify vehicles
● distinguish adjacent vehicles
Project Scope and Limitation
(cont.)
● estimate traffic congestion levels
based on vehicle counts
● allow users to view results using an
intuitive web interface
Project Scope and Limitation
(cont.)
● no hardware implementation of video
acquisition
● use traffic videos from Archer’s Eye
Project Scope and Limitation
(cont.)
● Factors affecting the quality of counting:
o low quality videos
o slow frame rates
o variations in lighting
o occlusion
Project Scope and Limitation
(cont.)
● Factors that are not considered
o Traffic at night
o Swerving vehicles
Project Scope and Limitation
(cont.)
● IP Cameras were used
● Videos obtained through ITS
● Video file: .mp4 at 6 FPS
Project Scope and Limitation
(cont.)
● Can detect:
Small
Vehicles
Medium
Vehicles
Large
Vehicles
Car SUV Truck
Sedan Jeep Bus
Van
Project Scope and Limitation
(cont.)
● Performance assessed by:
o Accuracy
● Against:
o Occlusion
o Number of vehicles present
System Overview
System Implementation
• Video Input
• Invocation of Matlab Instance
Video
Acquisition
Module
• Object Detection
• Vehicle Tracking
• Vehicle Classification
• Vehicle Counting
• Congestion Estimation
Vehicle
Detection
Module
Statistics
Generation
Module
Architectural Design
Architectural Design
● Video Acquisition
● Vehicle Detection
● Statistics Generation
Video Acquisition
Video
Acquisition
Flowchart
Architectural Design
● Video Acquisition
o Video Input
o Frame Extraction
● Vehicle Detection
● Statistics Generation
Video Input
The videos are stored locally and accessed
by the server via the URL passed when
the used has chosen a video.
Invoke Matlab process
After choosing a video to process, a java servlet
invokes a Matlab instance to process the video.
With the URL as the input, the servlet passes in
the value of the video directory.
Architectural Design
● Video Acquisition
o Video Input
o Frame Extraction
● Vehicle Detection
● Statistics Generation
Frame Extraction
The input video is converted into frames to prepare them
for processing in the Vehicle Detection module.
Architectural Design
● Video Acquisition
● Vehicle Detection
o Object Detection
o Tracking
o Classification
o Counting
o Congestion Estimate
● Statistics Generation
Vehicle Detection Module
Vehicle
Detection
Flowchart
Architectural Design
● Video Acquisition
● Vehicle Detection
o Object Detection
o Tracking
o Classification
o Counting
o Congestion Estimate
● Statistics Generation
Background Modeling and Object Detection Flowchart
• Initial background estimate(left)
• Road mask from selected camera location(right)
Gray-scale frames
Foreground objects after subtraction
Foreground mask via threshold
Foreground filtered with road mask
Foreground mask applied with morphological operations
Foreground applied with edge detection
Application of edge detection
Applying a threshold to the image with threshold of 300 pixels in
size.
Architectural Design
● Video Acquisition
● Vehicle Detection
o Object Detection
o Tracking
o Classification
o Counting
o Congestion Estimate
● Statistics Generation
Vehicle Tracking
Vehicle tracking is
performed by using the
Kalman Filter to estimate
the next locations of the
vehicles. Once a vehicle
is tracked, classification
and counting follows.
Green box = detected
Red box = predicted
• Why Kalman filter?
– Because of its consistent performance in the
previous researches referenced in this
project.
– The future states of the vehicles, represented
by their locations in the image are estimated
using the Kalman filter via their centroids.
“An object at rest will remain at rest unless an
external force acts upon it. An object in motion
will not change its velocity unless an external
force acts upon it.”
• Why Kalman filter?
– Because it makes use of Newton’s Law of
Motion, which is applicable to the project’s
objectives and scope.
Vehicle
Tracking
Flowchart
Architectural Design
● Video Acquisition
● Vehicle Detection
o Object Detection
o Tracking
o Classification
o Counting
o Congestion Estimate
● Statistics Generation
Vehicle Classification And Counting
Flowchart
Vehicle Classification
Once potential vehicles
are tracked, they will be
classified into different
types such as small,
medium and large
vehicles.
*The basis of the sizes (in pixels) of
the vehicle types were obtained
by getting the area properties of
the binary mask of a vehicle via
the Matlab function,
regionprops().
Types Sizes
carAreas.smallAreaMin 300
carAreas.smallAreaMax 800
carAreas.mediumAreaMin 801
carAreas.mediumAreaMax 5000
carAreas.largeAreaMin 5001
carAreas.largeAreaMax 45000
Architectural Design
● Video Acquisition
● Vehicle Detection
o Object Detection
o Tracking
o Classification
o Counting
o Congestion Estimate
● Statistics Generation
Vehicle Counting
When the detected vehicles are classified into their types,
the system will now count their number in preparation for
the traffic congestion estimation.
*A tracked vehicle’s count was done on its first detection in the scene.
Counts: Manual vs System
August 26, 2014
Manual Count System Count
Small Medium Large Small Medium Larg
e
0700-0800 130 191 14 267 354 21
0800-0900 167 210 17 280 372 19
0900-1000 365 287 22 252 289 23
1000-1100 309 241 21 268 227 18
1100-1200 330 288 17 277 271 15
August 25, 2014
Manual Count System Count
Small Medium Large Small Medium Larg
e
0700-0800 147 248 11 190 130 5
0800-0900 179 273 18 143 290 6
0900-1000 239 304 15 312 258 14
1000-1100 209 366 14 408 669 29
1100-1200 320 379 12 552 638 22
Counts: Manual vs System
(cont.)
One Time BG
Model
Frequent BG
Model
Manual Count
0600-0630 308 153 190
0630-0700 387 223 198
0700-0730 73 173 214
0730-0800 206 152 192
0800-0830 67 167 222
0830-0900 101 272 248
0900-0930 30 349 294
0930-1000 276 235 264
May 23, 2014, North Gate applying multiplying factor values
Manual Count Applying Mult Factor
Smal
l
Mediu
m
Larg
e
Smal
l
Mediu
m
Larg
e
0600-0700 71 70 24 109 108 46
0700-0800 131 142 18 202 219 35
0800-0900 131 121 35 202 189 67
0900-1000 133 134 45 205 206 86
1200-1300 142 145 47 219 223 90
Architectural Design
● Video Acquisition
● Vehicle Detection
o Object Detection
o Tracking
o Classification
o Counting
o Congestion Estimate
● Statistics Generation
Congestion Estimation
● Traffic congestion will be estimated by making use of
the number of vehicles per type that are present in the
scene and the number of vehicles that have passed in
the area in 5 minutes.
● Traffic congestion varies with time so the vehicle
counts and types per 5 minutes in the video will be used
to estimate the congestion.
Congestion Estimation (cont.)
Summarized statistics such as the counts of the
vehicles types, number of vehicles in the scene in five
minutes and the traffic congestion estimate are inserted
into the database after five minutes in the video has
passed.
Congestion Estimation (cont.)
Architectural Design
● Video Acquisition
● Vehicle Detection
● Statistics Generation
Statistics Generation Module
● Traffic data is summarized
● Insert into the database
● Access through the web application
Statistics Generation
Flowchart
Database
Relational
Model
Data Insertion
Insertion of data happens inside the Matlab process.
● ODBC/JDBC Connection must be ensured between
Matlab and database in order for them to communicate.
● After the connection, the data is immediately inserted
into the database every 5 minutes or (1800 frames).
Database Contents for Statistics Generation
Data Fetching and Displaying of Results
● Using TraVis’ web document, data is produced by the
system and then is stored into the database which is
shown into the web user interface.
● The data is fetched from the MySQL database through
the use of query statements which is then provided to
generate the graph using FusionCharts.
GUI
Demo
Experiments
● Actual program implementation
● Bounding Box Aspect Ratio Checking
● Vehicle Detection on Background Modeling
Scheme
● Accuracy of Vehicle Counting
Bounding Box Aspect Ratio Checking
System Output without Aspect Ratio Checking
Bounding Box Aspect Ratio Checking
System Output with Aspect Ratio Checking
Vehicle Detection on Background
Modeling Scheme
5th minute (frame
1800)
Background Models
1st minute (frame 1)
Vehicle Detection on Background
Modeling Scheme
0
50
100
150
200
250
300
350
400
450
One Time BG
Model
Frequent BG
Model
Manual Count
Pearson’s One
Time BG Model to
Manual Count
Pearson’s
Frequent BG
Model to Manual
Count
-0.51302 0.87499
Accuracy of Vehicle Counting
• Comparing of system and manual counts
• Use of multiplying factor
• 𝑴𝒖𝒍𝒕𝒊𝒑𝒍𝒚𝒊𝒏𝒈 𝑭𝒂𝒄𝒕𝒐𝒓 =
𝑆𝑦𝑠𝑡𝑒𝑚 𝐶𝑜𝑢𝑛𝑡
𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡
• Use of Pearson’s Correlation Coefficient
• Percentage Relative Error
Manual Counts
25-Aug-14 Manual
Count
26-Aug-14
Manual Count
23-May-14
Manual Count
Small Medium Large Total Small Medium Large Total Small Medium Large
0700-0800 147 248 11 406 0700-0800 130 191 14 335 0600-0700 71 70 24
0800-0900 179 273 18 470 0800-0900 167 210 17 394 0700-0800 131 142 18
0900-1000 239 304 15 558 0900-1000 365 287 22 674 0800-0900 131 121 35
1000-1100 209 366 14 589 1000-1100 309 241 21 571 0900-1000 133 134 45
1100-1200 320 379 12 711 1100-1200 330 288 17 635
1200-1300 297 420 14 731 1200-1300 320 352 21 693 1200-1300 142 145 47
1300-1400 293 488 12 793 1300-1400 302 276 24 602
1400-1500 268 462 16 746 1400-1500 362 292 23 677
1500-1600 274 413 19 706 1500-1600 333 280 18 631
1600-1700 303 429 14 746 1600-1700 272 249 21 542
1700-1800 326 461 18 805 1700-1800 258 245 14 517
System Counts
25-Aug-14 System Count 26-Aug-14 System Count 23-May-14 System Count
Small Medium Large Small Medium Large Small Medium Large
0700-0800 190 130 5 0700-0800 267 354 21 0600-0700 127 101 35
0800-0900 143 290 6 0800-0900 280 372 19 0700-0800 210 204 24
0900-1000 312 258 14 0900-1000 252 289 23 0800-0900 171 167 45
1000-1100 408 669 29 1000-1100 268 227 18 0900-1000 221 230 28
1100-1200 552 638 22 1100-1200 277 271 15
1200-1300 269 299 138 1200-1300 261 107 5 1200-1300 258 284 35
1300-1400 9 14 0 1300-1400 571 1122 191
1400-1500 172 135 131 1400-1500 856 985 156
1500-1600 868 864 316 1500-1600 587 733 228
1600-1700 841 662 119 1600-1700 1269 1285 271
1700-1800 358 505 332 1700-1800 503 718 299
Multiplying Factors
25-Aug-14
Multiplying
Factors
26-Aug-14
Multiplying
Factors
23-May-14
Multiplying
factors
Small Medium Large Small Medium Large Small Medium Large
0700-0800 1.292517007 0.524194 0.454545455 0700-0800 2.053846 1.853403 1.5 0600-0700 1.788732 1.442857 1.458333
0800-0900 0.798882682 1.062271 0.333333333 0800-0900 1.676647 1.771429 1.117647059 0700-0800 1.603053 1.43662 1.333333
0900-1000 1.305439331 0.848684 0.933333333 0900-1000 0.690411 1.006969 1.045454545 0800-0900 1.305344 1.380165 1.285714
1000-1100 1.95215311 1.827869 2.071428571 1000-1100 0.867314 0.941909 0.857142857 0900-1000 1.661654 1.716418 0.622222
1100-1200 1.725 1.683377 1.833333333 1100-1200 0.839394 0.940972 0.882352941 1200-1300 1.816901 1.958621 0.744681
Average 1.414798426 1.189279 1.125194805 Average 1.225522 1.302936 1.080519481
1200-1300 0.905723906 0.711905 9.857142857 1200-1300 0.815625 0.303977 0.238095238 Average 1.635137 1.586936 1.088857
1300-1400 0.030716724 0.028689 0 1300-1400 1.890728 4.065217 7.958333333
1400-1500 0.641791045 0.292208 8.1875 1400-1500 2.364641 3.373288 6.782608696
1500-1600 3.167883212 2.09201 16.63157895 1500-1600 1.762763 2.617857 12.66666667
1600-1700 2.775577558 1.543124 8.5 1600-1700 4.665441 5.160643 12.9047619
1700-1800 1.098159509 1.095445 18.44444444 1700-1800 1.949612 2.930612 21.35714286
Average 1.436641992 0.960563 10.27011104 Average 2.241468 3.075266 10.31793478
System Counts with applied multiplying factors
25-Aug-14
System Counts
with applied
multiplying
factors
26-Aug-14
System Counts
with applied
multiplying
factors
23-May-14
System Counts
with applied
multiplying
factors
Small Medium Large Small Medium Large Small Medium Large
0700-0800 134.2947 109.3099268 4.443675 0700-0800 217.8662864 271.694 19.4351 0600-0700 77.669334 63.64465 32.14380425
0800-0900 101.0745 243.8452212 5.33241 0800-0900 228.4740082 285.509 17.58413 0700-0800 128.4296074 128.5496 22.04146577
0900-1000 220.5261 216.9381623 12.44229 0900-1000 205.6266074 221.8067 21.28606 0800-0900 104.5783946 105.2342 41.32774832
1000-1100 288.3803 562.5257 25.77331 1000-1100 218.682265 174.2219 16.65865 0900-1000 135.1568726 144.9334 25.7150434
1100-1200 390.1616 536.4594867 19.55217 1100-1200 226.0260724 207.9918 13.88221
1200-1300 187.2422 311.2757295 13.43705 1200-1300 116.4415229 34.79374 0.484593 1200-1300 157.7849462 178.9612 32.14380425
1300-1400 6.264609 14.57478332 0 1300-1400 254.7437149 364.8465 18.51146
1400-1500 119.7236 140.5425534 12.75546 1400-1500 381.8925044 320.2975 15.1193
1500-1600 604.1867 899.472342 30.7689 1500-1600 261.8818926 238.3534 22.09745
1600-1700 585.3929 689.1790398 11.58702 1600-1700 566.146715 417.8501 26.26495
1700-1800 249.1922 525.7332554 32.32682 1700-1800 224.4064599 233.4758 28.97867
0
100
200
300
400
500
600
700
800
900
1000
0700-08000800-09000900-10001000-11001100-12001200-13001300-14001400-15001500-16001600-17001700-1800
August 25 Small Count
Manual
Count
System
Count
System
count with
applied
multiplying
factors
0
100
200
300
400
500
600
700
800
900
1000
August 25 Medium Count
Manual Count
System Count
System Counts
with applied
multiplying
factors
0
5
10
15
20
25
30
35
August 25 Large Count
Manual
Count
System
Count with
multiplying
factors
0
100
200
300
400
500
600
0700-08000800-09000900-10001000-11001100-12001200-13001300-14001400-15001500-16001600-17001700-1800
August 26 Small Count
Manual
Count
System
Counts with
applied
multiplying
factors
0
200
400
600
800
1000
1200
1400
0700-
0800
0800-
0900
0900-
1000
1000-
1100
1100-
1200
1200-
1300
1300-
1400
1400-
1500
1500-
1600
1600-
1700
1700-
1800
August 26 Medium Count
Manual
Count
System
Count
System
Counts with
applied
multiplying
factors
0
5
10
15
20
25
30
35
0700-08000800-09000900-10001000-11001100-12001200-13001300-14001400-15001500-16001600-17001700-1800
August 26 Large Count
Manual
Count
System
Counts with
applied
multiplying
factors
0
20
40
60
80
100
120
140
160
180
Counts May 23 Small Count
Manual Count
System Count after
applying multiplying
factors
0
20
40
60
80
100
120
140
160
180
200
0600-0700 0700-0800 0800-0900 0900-1000 1200-1300
Counts May 23 Medium Count
Manual Count
System Count after applying multiplying
factors
0
5
10
15
20
25
30
35
40
45
50
0600-0700 0700-0800 0800-0900 0900-1000 1200-1300
AxisTitle May 23 Large Count
Manual Count
System Count
System Count after applying multiplying
factors
Pearson’s Correlation Coefficient
It is a measure of how well related the sets
of data are.
● High correlation: .5 to 1.0
● Medium correlation: .3 to .5
● Low correlation: .1 to .3
Pearson's Correlation Coefficient
System Count to
Manual Count
System Count with Multiplying
Factors to Manual Count
Aug 25 2014 0.532330547 0.665698685
Aug 26 2014 0.532337468 0.712235061
May 23 2014 0.962154466 0.955987229
Average 0.675607493 0.777973658
Percentage Relative Error
• Relative error is the measure of mean
absolute error to the mean value of the
measured dataset
• 𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 𝑅𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝐸𝑟𝑟𝑜𝑟 =
𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝐸𝑟𝑟𝑜𝑟
𝑇𝑟𝑢𝑒 𝑉𝑎𝑙𝑢𝑒
∗ 100
• 𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 𝑅𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝐸𝑟𝑟𝑜𝑟 =
𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡 −𝑆𝑦𝑠𝑡𝑒𝑚 𝐶𝑜𝑢𝑛𝑡
𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡
∗ 100
Percentage Relative Error
Date Time MCount SCount RelError %RelError
25-Aug 0700-0800 406 248.0483511 0.389043 38.90435
0800-0900 470 350.2521005 0.254783 25.47828
0900-1000 558 449.906567 0.193716 19.37158
1000-1100 589 876.6793188 -0.48842 -48.842
1100-1200 711 946.1732442 -0.33076 -33.0764
1200-1300 731 511.9549749 0.299651 29.96512
1300-1400 793 20.83939207 0.973721 97.37208
1400-1500 746 273.0216483 0.634019 63.40192
1500-1600 706 1534.427951 -1.17341 -117.341
1600-1700 746 1286.158946 -0.72407 -72.4074
1700-1800 805 807.2522873 -0.0028 -0.27979
Average 660.0909 664.0649801 0.002315 0.231519
Percentage Relative Error
Date Time MCount SCount RelError %RelError
26-Aug 0700-0800 335 508.9954 -0.51939 -51.9389
0800-0900 394 531.5671 -0.34916 -34.9155
0900-1000 674 448.7194 0.334244 33.42443
1000-1100 571 409.5628 0.282727 28.27272
1100-1200 635 447.9 0.294646 29.46456
1200-1300 693 151.7199 0.781068 78.1068
1300-1400 602 638.1017 -0.05997 -5.99696
1400-1500 677 717.3093 -0.05954 -5.95411
1500-1600 631 522.3327 0.172214 17.22144
1600-1700 542 1010.262 -0.86395 -86.3952
1700-1800 517 486.8609 0.058296 5.829616
Average 570.0909 533.9392 0.006472 0.647172
Percentage Relative Error
Date Time MCount SCount RelError %RelError
23-May 0600-0700 165 173.4578 -0.05126 -5.12593
0700-0800 291 279.0207 0.041166 4.116609
0800-0900 287 251.1404 0.124946 12.49464
0900-1000 312 305.8053 0.019855 1.985486
1200-1300 334 368.89 -0.10446 -10.4461
Average 277.8 275.6628 0.006049 0.604942
Percentage Relative Error
Date RelError %RelError
25-Aug 0.002315195 0.231519
26-Aug 0.00647172 0.647172
23-May 0.006049424 0.604942
Average 0.004945446 0.494545
Conclusion
• We developed a vision-based system for
counting vehicles and estimating traffic
congestion levels in road sections installed
with traffic surveillance cameras,
accessible through a web interface.
Conclusion
• Performance have been affected by the
following:
– Quality of video
– Background model
– Position of camera towards the road
– Detection of unwanted blobs/segmented
blobs
Conclusion
• System Counts has a .78 Correlation
Coefficient value
• It also has a 0.49 Percentage Relative
Error
Conclusion
• Gathered traffic videos from the Archer’s
Eye
• Developed Algorithms for Classification of
vehicles and track and count the number
of vehicles
• Generated Historical Graphs of Traffic
Congestion levels
Conclusion
• Designed a Database for storage of videos
and Traffic Statistics
• Developed an interactive Web interface
TraVis: Web-Based Vehicle Counter with
Traffic Congestion Estimation Using
Computer Vision
Presented by:
Aguirre, Byron Franco
Alcantara, Jan Andre
Trinidad, John Ferdinand
Adviser:
Dr. Joel P. Ilao

More Related Content

What's hot

Vehicle Detection using Camera
Vehicle Detection using CameraVehicle Detection using Camera
Vehicle Detection using CameraShubham Agrahari
 
IRJET- Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...
IRJET-  	  Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...IRJET-  	  Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...
IRJET- Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...IRJET Journal
 
Machine vision based pedestrian detection and lane departure
Machine vision based pedestrian detection and lane departureMachine vision based pedestrian detection and lane departure
Machine vision based pedestrian detection and lane departureSanket Borhade
 
IRJET- Vehicle Number Plate Recognition System
IRJET- Vehicle Number Plate Recognition SystemIRJET- Vehicle Number Plate Recognition System
IRJET- Vehicle Number Plate Recognition SystemIRJET Journal
 
AutoSat Fleet Management System Overview
AutoSat Fleet Management System OverviewAutoSat Fleet Management System Overview
AutoSat Fleet Management System OverviewSeva Vanchikov
 
Traffic Jam Detection System by Ratul, Sadh, Shams
Traffic Jam Detection System by Ratul, Sadh, ShamsTraffic Jam Detection System by Ratul, Sadh, Shams
Traffic Jam Detection System by Ratul, Sadh, ShamsKhan Mostafa
 
IRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion Technique
IRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion TechniqueIRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion Technique
IRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion TechniqueIRJET Journal
 

What's hot (11)

Mvs adas
Mvs adasMvs adas
Mvs adas
 
Vehicle Detection using Camera
Vehicle Detection using CameraVehicle Detection using Camera
Vehicle Detection using Camera
 
niyantra 2014
niyantra 2014niyantra 2014
niyantra 2014
 
Report NIYANTRA
Report NIYANTRAReport NIYANTRA
Report NIYANTRA
 
IRJET- Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...
IRJET-  	  Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...IRJET-  	  Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...
IRJET- Robust and Fast Detection of Moving Vechiles in Aerial Videos usin...
 
Machine vision based pedestrian detection and lane departure
Machine vision based pedestrian detection and lane departureMachine vision based pedestrian detection and lane departure
Machine vision based pedestrian detection and lane departure
 
IRJET- Vehicle Number Plate Recognition System
IRJET- Vehicle Number Plate Recognition SystemIRJET- Vehicle Number Plate Recognition System
IRJET- Vehicle Number Plate Recognition System
 
AutoSat Fleet Management System Overview
AutoSat Fleet Management System OverviewAutoSat Fleet Management System Overview
AutoSat Fleet Management System Overview
 
Final year project proposal
Final year project proposalFinal year project proposal
Final year project proposal
 
Traffic Jam Detection System by Ratul, Sadh, Shams
Traffic Jam Detection System by Ratul, Sadh, ShamsTraffic Jam Detection System by Ratul, Sadh, Shams
Traffic Jam Detection System by Ratul, Sadh, Shams
 
IRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion Technique
IRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion TechniqueIRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion Technique
IRJET- Video Based Traffic Sign Detection by Scale Based Frame Fusion Technique
 

Viewers also liked

Elmhurst TechNet Presentation - Durham 260815
Elmhurst TechNet Presentation - Durham 260815Elmhurst TechNet Presentation - Durham 260815
Elmhurst TechNet Presentation - Durham 260815Nicola Scott
 
Series-RioCommunitiesIncorporation-Dec2012-Jan2013
Series-RioCommunitiesIncorporation-Dec2012-Jan2013Series-RioCommunitiesIncorporation-Dec2012-Jan2013
Series-RioCommunitiesIncorporation-Dec2012-Jan2013Julia Dendinger
 
Security Hole #18 - Cryptolocker Ransomware
Security Hole #18 - Cryptolocker RansomwareSecurity Hole #18 - Cryptolocker Ransomware
Security Hole #18 - Cryptolocker RansomwareIgor Beliaiev
 
Campaign For Independence
Campaign For IndependenceCampaign For Independence
Campaign For IndependenceAkoSiGeraldo
 
II - Build Automation
II - Build AutomationII - Build Automation
II - Build AutomationWebF
 
Bachillerato de excelencia ies villa de valdemoro
Bachillerato de excelencia ies villa de valdemoroBachillerato de excelencia ies villa de valdemoro
Bachillerato de excelencia ies villa de valdemoroSantiago Alba Carrillo
 
Turtle Ranger at Shangri-La's Barr Al Jissah Resort & Spa
Turtle Ranger at Shangri-La's Barr Al Jissah Resort & SpaTurtle Ranger at Shangri-La's Barr Al Jissah Resort & Spa
Turtle Ranger at Shangri-La's Barr Al Jissah Resort & SpaLiju Cherian
 
Marine rubber fender
Marine rubber  fenderMarine rubber  fender
Marine rubber fenderStella Cheng
 
Make a successful holiday experience with about ephesus
Make a successful holiday experience with about ephesusMake a successful holiday experience with about ephesus
Make a successful holiday experience with about ephesusAbout Ephesus
 
4 Examples of How Postup Can Help Retailers & eCommerce
4 Examples of How Postup Can Help Retailers & eCommerce4 Examples of How Postup Can Help Retailers & eCommerce
4 Examples of How Postup Can Help Retailers & eCommercePostUp Digital
 

Viewers also liked (12)

Elmhurst TechNet Presentation - Durham 260815
Elmhurst TechNet Presentation - Durham 260815Elmhurst TechNet Presentation - Durham 260815
Elmhurst TechNet Presentation - Durham 260815
 
Series-RioCommunitiesIncorporation-Dec2012-Jan2013
Series-RioCommunitiesIncorporation-Dec2012-Jan2013Series-RioCommunitiesIncorporation-Dec2012-Jan2013
Series-RioCommunitiesIncorporation-Dec2012-Jan2013
 
Portfolio Petya M
Portfolio Petya MPortfolio Petya M
Portfolio Petya M
 
Security Hole #18 - Cryptolocker Ransomware
Security Hole #18 - Cryptolocker RansomwareSecurity Hole #18 - Cryptolocker Ransomware
Security Hole #18 - Cryptolocker Ransomware
 
Split pst pro
Split pst proSplit pst pro
Split pst pro
 
Campaign For Independence
Campaign For IndependenceCampaign For Independence
Campaign For Independence
 
II - Build Automation
II - Build AutomationII - Build Automation
II - Build Automation
 
Bachillerato de excelencia ies villa de valdemoro
Bachillerato de excelencia ies villa de valdemoroBachillerato de excelencia ies villa de valdemoro
Bachillerato de excelencia ies villa de valdemoro
 
Turtle Ranger at Shangri-La's Barr Al Jissah Resort & Spa
Turtle Ranger at Shangri-La's Barr Al Jissah Resort & SpaTurtle Ranger at Shangri-La's Barr Al Jissah Resort & Spa
Turtle Ranger at Shangri-La's Barr Al Jissah Resort & Spa
 
Marine rubber fender
Marine rubber  fenderMarine rubber  fender
Marine rubber fender
 
Make a successful holiday experience with about ephesus
Make a successful holiday experience with about ephesusMake a successful holiday experience with about ephesus
Make a successful holiday experience with about ephesus
 
4 Examples of How Postup Can Help Retailers & eCommerce
4 Examples of How Postup Can Help Retailers & eCommerce4 Examples of How Postup Can Help Retailers & eCommerce
4 Examples of How Postup Can Help Retailers & eCommerce
 

Similar to TraVis CTTHES3

Vehicle counting for traffic management
Vehicle counting for traffic management Vehicle counting for traffic management
Vehicle counting for traffic management ADEEBANADEEM
 
parking space counter [Autosaved] (2).pptx
parking space counter [Autosaved] (2).pptxparking space counter [Autosaved] (2).pptx
parking space counter [Autosaved] (2).pptxAlbertDaleSteyn
 
IRJET- Reckoning the Vehicle using MATLAB
IRJET- Reckoning the Vehicle using MATLABIRJET- Reckoning the Vehicle using MATLAB
IRJET- Reckoning the Vehicle using MATLABIRJET Journal
 
IRJET - Automatic License Plate Detection using Image Processing
IRJET - Automatic License Plate Detection using Image ProcessingIRJET - Automatic License Plate Detection using Image Processing
IRJET - Automatic License Plate Detection using Image ProcessingIRJET Journal
 
Automatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR CameraAutomatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR CameraIRJET Journal
 
Vigilance: Vehicle Detector and Tracker
Vigilance: Vehicle Detector and TrackerVigilance: Vehicle Detector and Tracker
Vigilance: Vehicle Detector and TrackerIRJET Journal
 
IRJET- Number Plate Extraction from Vehicle Front View Image using Image ...
IRJET-  	  Number Plate Extraction from Vehicle Front View Image using Image ...IRJET-  	  Number Plate Extraction from Vehicle Front View Image using Image ...
IRJET- Number Plate Extraction from Vehicle Front View Image using Image ...IRJET Journal
 
Project Proposal Project Proposal Project Proposal Project Proposal
Project Proposal  Project Proposal Project Proposal Project ProposalProject Proposal  Project Proposal Project Proposal Project Proposal
Project Proposal Project Proposal Project Proposal Project ProposalElanchezhiyanT
 
Smart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer VisionSmart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer VisionIRJET Journal
 
IRJET- Smart Traffic Control System using Image Processing
IRJET- Smart Traffic Control System using Image ProcessingIRJET- Smart Traffic Control System using Image Processing
IRJET- Smart Traffic Control System using Image ProcessingIRJET Journal
 
Presentation - Vision
Presentation - VisionPresentation - Vision
Presentation - VisionJaweria Khan
 
Prototyping presentation
Prototyping presentationPrototyping presentation
Prototyping presentationIbtihaj Uddin
 
Obstacle Detection and Collision Avoidance System
Obstacle Detection and Collision Avoidance SystemObstacle Detection and Collision Avoidance System
Obstacle Detection and Collision Avoidance SystemIRJET Journal
 
Automatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR CameraAutomatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR CameraIRJET Journal
 
Semi-Automated Car Surveillance System using Information Retrieval
Semi-Automated Car Surveillance System using Information RetrievalSemi-Automated Car Surveillance System using Information Retrieval
Semi-Automated Car Surveillance System using Information RetrievalTejashree Gharat
 
Ppt on image processing
Ppt on image processingPpt on image processing
Ppt on image processing9177547219
 
anpr-131210063016-phpapp01-160225080726 (3).pptx
anpr-131210063016-phpapp01-160225080726 (3).pptxanpr-131210063016-phpapp01-160225080726 (3).pptx
anpr-131210063016-phpapp01-160225080726 (3).pptxKaniskKumar3
 
Automatic Number Plate Recognition and IoT Based Vehicle Tracking
Automatic Number Plate Recognition and IoT Based Vehicle TrackingAutomatic Number Plate Recognition and IoT Based Vehicle Tracking
Automatic Number Plate Recognition and IoT Based Vehicle TrackingIRJET Journal
 

Similar to TraVis CTTHES3 (20)

Vehicle counting for traffic management
Vehicle counting for traffic management Vehicle counting for traffic management
Vehicle counting for traffic management
 
parking space counter [Autosaved] (2).pptx
parking space counter [Autosaved] (2).pptxparking space counter [Autosaved] (2).pptx
parking space counter [Autosaved] (2).pptx
 
IRJET- Reckoning the Vehicle using MATLAB
IRJET- Reckoning the Vehicle using MATLABIRJET- Reckoning the Vehicle using MATLAB
IRJET- Reckoning the Vehicle using MATLAB
 
IRJET - Automatic License Plate Detection using Image Processing
IRJET - Automatic License Plate Detection using Image ProcessingIRJET - Automatic License Plate Detection using Image Processing
IRJET - Automatic License Plate Detection using Image Processing
 
Automatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR CameraAutomatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR Camera
 
Vigilance: Vehicle Detector and Tracker
Vigilance: Vehicle Detector and TrackerVigilance: Vehicle Detector and Tracker
Vigilance: Vehicle Detector and Tracker
 
IRJET- Number Plate Extraction from Vehicle Front View Image using Image ...
IRJET-  	  Number Plate Extraction from Vehicle Front View Image using Image ...IRJET-  	  Number Plate Extraction from Vehicle Front View Image using Image ...
IRJET- Number Plate Extraction from Vehicle Front View Image using Image ...
 
Project Proposal Project Proposal Project Proposal Project Proposal
Project Proposal  Project Proposal Project Proposal Project ProposalProject Proposal  Project Proposal Project Proposal Project Proposal
Project Proposal Project Proposal Project Proposal Project Proposal
 
Smart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer VisionSmart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer Vision
 
IRJET- Smart Traffic Control System using Image Processing
IRJET- Smart Traffic Control System using Image ProcessingIRJET- Smart Traffic Control System using Image Processing
IRJET- Smart Traffic Control System using Image Processing
 
FINAL PPT ALL.pptx
FINAL PPT ALL.pptxFINAL PPT ALL.pptx
FINAL PPT ALL.pptx
 
Presentation - Vision
Presentation - VisionPresentation - Vision
Presentation - Vision
 
Prototyping presentation
Prototyping presentationPrototyping presentation
Prototyping presentation
 
Obstacle Detection and Collision Avoidance System
Obstacle Detection and Collision Avoidance SystemObstacle Detection and Collision Avoidance System
Obstacle Detection and Collision Avoidance System
 
Automatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR CameraAutomatic Fetching of Vehicle details using ANPR Camera
Automatic Fetching of Vehicle details using ANPR Camera
 
Semi-Automated Car Surveillance System using Information Retrieval
Semi-Automated Car Surveillance System using Information RetrievalSemi-Automated Car Surveillance System using Information Retrieval
Semi-Automated Car Surveillance System using Information Retrieval
 
Ppt on image processing
Ppt on image processingPpt on image processing
Ppt on image processing
 
anpr-131210063016-phpapp01-160225080726 (3).pptx
anpr-131210063016-phpapp01-160225080726 (3).pptxanpr-131210063016-phpapp01-160225080726 (3).pptx
anpr-131210063016-phpapp01-160225080726 (3).pptx
 
Self Driving Car
Self Driving CarSelf Driving Car
Self Driving Car
 
Automatic Number Plate Recognition and IoT Based Vehicle Tracking
Automatic Number Plate Recognition and IoT Based Vehicle TrackingAutomatic Number Plate Recognition and IoT Based Vehicle Tracking
Automatic Number Plate Recognition and IoT Based Vehicle Tracking
 

TraVis CTTHES3

  • 2. TraVis: Web-Based Vehicle Counter with Traffic Congestion Estimation Using Computer Vision Presented by: Aguirre, Byron Franco Alcantara, Jan Andre Trinidad, John Ferdinand Thesis adviser: Dr. Joel P. Ilao
  • 3. Outline Introduction Problem Statement General Objectives Specific Objectives Project Scope and Limitation System Overview System Implementation Demo Experiments Conclusion
  • 5. Problem Statement In the Philippines, many traffic cameras are being installed where recorded traffic videos are monitored by traffic personnel. However, these cameras might have been recording videos 24/7 but the people who monitor them might not be watching. The “unmonitored” videos then become unused since a traffic situation has already occurred in an area. With this, a traffic monitoring system that makes use of all recorded videos can provide information to the public regarding the traffic situation in an area.
  • 7. General Objective • The aim of this study is to develop a vision-based system for counting vehicles and estimating traffic congestion levels in road sections installed with traffic surveillance cameras, accessible through a web interface.
  • 8. Specific Objectives ● gather traffic videos taken by roadside traffic surveillance cameras; ● develop machine vision algorithms for processing traffic videos that can: o classify vehicles according to type; o track and count the number of vehicles seen;
  • 9. Specific Objectives (cont.) ● generate graphs of traffic congestion levels based on vehicle count statistics estimated from traffic videos; ● design a suitable database for efficiently storing traffic surveillance videos and corresponding traffic statistics; and ● develop an interactive web interface for accessing relevant data and information from traffic surveillance videos;
  • 10. Project Scope and Limitation This study will count and classify vehicles seen in a traffic surveillance camera’s Field Of View via application of computer vision techniques. The system that will be developed can: ● identify and classify vehicles ● distinguish adjacent vehicles
  • 11. Project Scope and Limitation (cont.) ● estimate traffic congestion levels based on vehicle counts ● allow users to view results using an intuitive web interface
  • 12. Project Scope and Limitation (cont.) ● no hardware implementation of video acquisition ● use traffic videos from Archer’s Eye
  • 13. Project Scope and Limitation (cont.) ● Factors affecting the quality of counting: o low quality videos o slow frame rates o variations in lighting o occlusion
  • 14. Project Scope and Limitation (cont.) ● Factors that are not considered o Traffic at night o Swerving vehicles
  • 15. Project Scope and Limitation (cont.) ● IP Cameras were used ● Videos obtained through ITS ● Video file: .mp4 at 6 FPS
  • 16. Project Scope and Limitation (cont.) ● Can detect: Small Vehicles Medium Vehicles Large Vehicles Car SUV Truck Sedan Jeep Bus Van
  • 17. Project Scope and Limitation (cont.) ● Performance assessed by: o Accuracy ● Against: o Occlusion o Number of vehicles present
  • 19. System Implementation • Video Input • Invocation of Matlab Instance Video Acquisition Module • Object Detection • Vehicle Tracking • Vehicle Classification • Vehicle Counting • Congestion Estimation Vehicle Detection Module Statistics Generation Module
  • 21. Architectural Design ● Video Acquisition ● Vehicle Detection ● Statistics Generation
  • 24. Architectural Design ● Video Acquisition o Video Input o Frame Extraction ● Vehicle Detection ● Statistics Generation
  • 25. Video Input The videos are stored locally and accessed by the server via the URL passed when the used has chosen a video.
  • 26.
  • 27. Invoke Matlab process After choosing a video to process, a java servlet invokes a Matlab instance to process the video. With the URL as the input, the servlet passes in the value of the video directory.
  • 28. Architectural Design ● Video Acquisition o Video Input o Frame Extraction ● Vehicle Detection ● Statistics Generation
  • 29. Frame Extraction The input video is converted into frames to prepare them for processing in the Vehicle Detection module.
  • 30. Architectural Design ● Video Acquisition ● Vehicle Detection o Object Detection o Tracking o Classification o Counting o Congestion Estimate ● Statistics Generation
  • 33. Architectural Design ● Video Acquisition ● Vehicle Detection o Object Detection o Tracking o Classification o Counting o Congestion Estimate ● Statistics Generation
  • 34. Background Modeling and Object Detection Flowchart
  • 35. • Initial background estimate(left) • Road mask from selected camera location(right)
  • 37. Foreground mask via threshold Foreground filtered with road mask
  • 38. Foreground mask applied with morphological operations Foreground applied with edge detection
  • 39. Application of edge detection
  • 40. Applying a threshold to the image with threshold of 300 pixels in size.
  • 41. Architectural Design ● Video Acquisition ● Vehicle Detection o Object Detection o Tracking o Classification o Counting o Congestion Estimate ● Statistics Generation
  • 42. Vehicle Tracking Vehicle tracking is performed by using the Kalman Filter to estimate the next locations of the vehicles. Once a vehicle is tracked, classification and counting follows. Green box = detected Red box = predicted
  • 43. • Why Kalman filter? – Because of its consistent performance in the previous researches referenced in this project. – The future states of the vehicles, represented by their locations in the image are estimated using the Kalman filter via their centroids.
  • 44. “An object at rest will remain at rest unless an external force acts upon it. An object in motion will not change its velocity unless an external force acts upon it.”
  • 45. • Why Kalman filter? – Because it makes use of Newton’s Law of Motion, which is applicable to the project’s objectives and scope.
  • 47.
  • 48.
  • 49. Architectural Design ● Video Acquisition ● Vehicle Detection o Object Detection o Tracking o Classification o Counting o Congestion Estimate ● Statistics Generation
  • 50. Vehicle Classification And Counting Flowchart
  • 51. Vehicle Classification Once potential vehicles are tracked, they will be classified into different types such as small, medium and large vehicles. *The basis of the sizes (in pixels) of the vehicle types were obtained by getting the area properties of the binary mask of a vehicle via the Matlab function, regionprops(). Types Sizes carAreas.smallAreaMin 300 carAreas.smallAreaMax 800 carAreas.mediumAreaMin 801 carAreas.mediumAreaMax 5000 carAreas.largeAreaMin 5001 carAreas.largeAreaMax 45000
  • 52. Architectural Design ● Video Acquisition ● Vehicle Detection o Object Detection o Tracking o Classification o Counting o Congestion Estimate ● Statistics Generation
  • 53. Vehicle Counting When the detected vehicles are classified into their types, the system will now count their number in preparation for the traffic congestion estimation. *A tracked vehicle’s count was done on its first detection in the scene.
  • 54. Counts: Manual vs System August 26, 2014 Manual Count System Count Small Medium Large Small Medium Larg e 0700-0800 130 191 14 267 354 21 0800-0900 167 210 17 280 372 19 0900-1000 365 287 22 252 289 23 1000-1100 309 241 21 268 227 18 1100-1200 330 288 17 277 271 15 August 25, 2014 Manual Count System Count Small Medium Large Small Medium Larg e 0700-0800 147 248 11 190 130 5 0800-0900 179 273 18 143 290 6 0900-1000 239 304 15 312 258 14 1000-1100 209 366 14 408 669 29 1100-1200 320 379 12 552 638 22
  • 55. Counts: Manual vs System (cont.) One Time BG Model Frequent BG Model Manual Count 0600-0630 308 153 190 0630-0700 387 223 198 0700-0730 73 173 214 0730-0800 206 152 192 0800-0830 67 167 222 0830-0900 101 272 248 0900-0930 30 349 294 0930-1000 276 235 264 May 23, 2014, North Gate applying multiplying factor values Manual Count Applying Mult Factor Smal l Mediu m Larg e Smal l Mediu m Larg e 0600-0700 71 70 24 109 108 46 0700-0800 131 142 18 202 219 35 0800-0900 131 121 35 202 189 67 0900-1000 133 134 45 205 206 86 1200-1300 142 145 47 219 223 90
  • 56. Architectural Design ● Video Acquisition ● Vehicle Detection o Object Detection o Tracking o Classification o Counting o Congestion Estimate ● Statistics Generation
  • 57. Congestion Estimation ● Traffic congestion will be estimated by making use of the number of vehicles per type that are present in the scene and the number of vehicles that have passed in the area in 5 minutes. ● Traffic congestion varies with time so the vehicle counts and types per 5 minutes in the video will be used to estimate the congestion.
  • 58. Congestion Estimation (cont.) Summarized statistics such as the counts of the vehicles types, number of vehicles in the scene in five minutes and the traffic congestion estimate are inserted into the database after five minutes in the video has passed.
  • 60. Architectural Design ● Video Acquisition ● Vehicle Detection ● Statistics Generation
  • 61. Statistics Generation Module ● Traffic data is summarized ● Insert into the database ● Access through the web application
  • 64. Data Insertion Insertion of data happens inside the Matlab process. ● ODBC/JDBC Connection must be ensured between Matlab and database in order for them to communicate. ● After the connection, the data is immediately inserted into the database every 5 minutes or (1800 frames).
  • 65. Database Contents for Statistics Generation
  • 66. Data Fetching and Displaying of Results ● Using TraVis’ web document, data is produced by the system and then is stored into the database which is shown into the web user interface. ● The data is fetched from the MySQL database through the use of query statements which is then provided to generate the graph using FusionCharts.
  • 67. GUI
  • 68. Demo
  • 69. Experiments ● Actual program implementation ● Bounding Box Aspect Ratio Checking ● Vehicle Detection on Background Modeling Scheme ● Accuracy of Vehicle Counting
  • 70. Bounding Box Aspect Ratio Checking System Output without Aspect Ratio Checking
  • 71. Bounding Box Aspect Ratio Checking System Output with Aspect Ratio Checking
  • 72. Vehicle Detection on Background Modeling Scheme
  • 73. 5th minute (frame 1800) Background Models 1st minute (frame 1)
  • 74. Vehicle Detection on Background Modeling Scheme 0 50 100 150 200 250 300 350 400 450 One Time BG Model Frequent BG Model Manual Count Pearson’s One Time BG Model to Manual Count Pearson’s Frequent BG Model to Manual Count -0.51302 0.87499
  • 75. Accuracy of Vehicle Counting • Comparing of system and manual counts • Use of multiplying factor • 𝑴𝒖𝒍𝒕𝒊𝒑𝒍𝒚𝒊𝒏𝒈 𝑭𝒂𝒄𝒕𝒐𝒓 = 𝑆𝑦𝑠𝑡𝑒𝑚 𝐶𝑜𝑢𝑛𝑡 𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡 • Use of Pearson’s Correlation Coefficient • Percentage Relative Error
  • 76. Manual Counts 25-Aug-14 Manual Count 26-Aug-14 Manual Count 23-May-14 Manual Count Small Medium Large Total Small Medium Large Total Small Medium Large 0700-0800 147 248 11 406 0700-0800 130 191 14 335 0600-0700 71 70 24 0800-0900 179 273 18 470 0800-0900 167 210 17 394 0700-0800 131 142 18 0900-1000 239 304 15 558 0900-1000 365 287 22 674 0800-0900 131 121 35 1000-1100 209 366 14 589 1000-1100 309 241 21 571 0900-1000 133 134 45 1100-1200 320 379 12 711 1100-1200 330 288 17 635 1200-1300 297 420 14 731 1200-1300 320 352 21 693 1200-1300 142 145 47 1300-1400 293 488 12 793 1300-1400 302 276 24 602 1400-1500 268 462 16 746 1400-1500 362 292 23 677 1500-1600 274 413 19 706 1500-1600 333 280 18 631 1600-1700 303 429 14 746 1600-1700 272 249 21 542 1700-1800 326 461 18 805 1700-1800 258 245 14 517
  • 77. System Counts 25-Aug-14 System Count 26-Aug-14 System Count 23-May-14 System Count Small Medium Large Small Medium Large Small Medium Large 0700-0800 190 130 5 0700-0800 267 354 21 0600-0700 127 101 35 0800-0900 143 290 6 0800-0900 280 372 19 0700-0800 210 204 24 0900-1000 312 258 14 0900-1000 252 289 23 0800-0900 171 167 45 1000-1100 408 669 29 1000-1100 268 227 18 0900-1000 221 230 28 1100-1200 552 638 22 1100-1200 277 271 15 1200-1300 269 299 138 1200-1300 261 107 5 1200-1300 258 284 35 1300-1400 9 14 0 1300-1400 571 1122 191 1400-1500 172 135 131 1400-1500 856 985 156 1500-1600 868 864 316 1500-1600 587 733 228 1600-1700 841 662 119 1600-1700 1269 1285 271 1700-1800 358 505 332 1700-1800 503 718 299
  • 78. Multiplying Factors 25-Aug-14 Multiplying Factors 26-Aug-14 Multiplying Factors 23-May-14 Multiplying factors Small Medium Large Small Medium Large Small Medium Large 0700-0800 1.292517007 0.524194 0.454545455 0700-0800 2.053846 1.853403 1.5 0600-0700 1.788732 1.442857 1.458333 0800-0900 0.798882682 1.062271 0.333333333 0800-0900 1.676647 1.771429 1.117647059 0700-0800 1.603053 1.43662 1.333333 0900-1000 1.305439331 0.848684 0.933333333 0900-1000 0.690411 1.006969 1.045454545 0800-0900 1.305344 1.380165 1.285714 1000-1100 1.95215311 1.827869 2.071428571 1000-1100 0.867314 0.941909 0.857142857 0900-1000 1.661654 1.716418 0.622222 1100-1200 1.725 1.683377 1.833333333 1100-1200 0.839394 0.940972 0.882352941 1200-1300 1.816901 1.958621 0.744681 Average 1.414798426 1.189279 1.125194805 Average 1.225522 1.302936 1.080519481 1200-1300 0.905723906 0.711905 9.857142857 1200-1300 0.815625 0.303977 0.238095238 Average 1.635137 1.586936 1.088857 1300-1400 0.030716724 0.028689 0 1300-1400 1.890728 4.065217 7.958333333 1400-1500 0.641791045 0.292208 8.1875 1400-1500 2.364641 3.373288 6.782608696 1500-1600 3.167883212 2.09201 16.63157895 1500-1600 1.762763 2.617857 12.66666667 1600-1700 2.775577558 1.543124 8.5 1600-1700 4.665441 5.160643 12.9047619 1700-1800 1.098159509 1.095445 18.44444444 1700-1800 1.949612 2.930612 21.35714286 Average 1.436641992 0.960563 10.27011104 Average 2.241468 3.075266 10.31793478
  • 79. System Counts with applied multiplying factors 25-Aug-14 System Counts with applied multiplying factors 26-Aug-14 System Counts with applied multiplying factors 23-May-14 System Counts with applied multiplying factors Small Medium Large Small Medium Large Small Medium Large 0700-0800 134.2947 109.3099268 4.443675 0700-0800 217.8662864 271.694 19.4351 0600-0700 77.669334 63.64465 32.14380425 0800-0900 101.0745 243.8452212 5.33241 0800-0900 228.4740082 285.509 17.58413 0700-0800 128.4296074 128.5496 22.04146577 0900-1000 220.5261 216.9381623 12.44229 0900-1000 205.6266074 221.8067 21.28606 0800-0900 104.5783946 105.2342 41.32774832 1000-1100 288.3803 562.5257 25.77331 1000-1100 218.682265 174.2219 16.65865 0900-1000 135.1568726 144.9334 25.7150434 1100-1200 390.1616 536.4594867 19.55217 1100-1200 226.0260724 207.9918 13.88221 1200-1300 187.2422 311.2757295 13.43705 1200-1300 116.4415229 34.79374 0.484593 1200-1300 157.7849462 178.9612 32.14380425 1300-1400 6.264609 14.57478332 0 1300-1400 254.7437149 364.8465 18.51146 1400-1500 119.7236 140.5425534 12.75546 1400-1500 381.8925044 320.2975 15.1193 1500-1600 604.1867 899.472342 30.7689 1500-1600 261.8818926 238.3534 22.09745 1600-1700 585.3929 689.1790398 11.58702 1600-1700 566.146715 417.8501 26.26495 1700-1800 249.1922 525.7332554 32.32682 1700-1800 224.4064599 233.4758 28.97867
  • 81. 0 100 200 300 400 500 600 700 800 900 1000 August 25 Medium Count Manual Count System Count System Counts with applied multiplying factors
  • 82. 0 5 10 15 20 25 30 35 August 25 Large Count Manual Count System Count with multiplying factors
  • 86. 0 20 40 60 80 100 120 140 160 180 Counts May 23 Small Count Manual Count System Count after applying multiplying factors
  • 87. 0 20 40 60 80 100 120 140 160 180 200 0600-0700 0700-0800 0800-0900 0900-1000 1200-1300 Counts May 23 Medium Count Manual Count System Count after applying multiplying factors
  • 88. 0 5 10 15 20 25 30 35 40 45 50 0600-0700 0700-0800 0800-0900 0900-1000 1200-1300 AxisTitle May 23 Large Count Manual Count System Count System Count after applying multiplying factors
  • 89. Pearson’s Correlation Coefficient It is a measure of how well related the sets of data are. ● High correlation: .5 to 1.0 ● Medium correlation: .3 to .5 ● Low correlation: .1 to .3
  • 90. Pearson's Correlation Coefficient System Count to Manual Count System Count with Multiplying Factors to Manual Count Aug 25 2014 0.532330547 0.665698685 Aug 26 2014 0.532337468 0.712235061 May 23 2014 0.962154466 0.955987229 Average 0.675607493 0.777973658
  • 91. Percentage Relative Error • Relative error is the measure of mean absolute error to the mean value of the measured dataset • 𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 𝑅𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝐸𝑟𝑟𝑜𝑟 = 𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝐸𝑟𝑟𝑜𝑟 𝑇𝑟𝑢𝑒 𝑉𝑎𝑙𝑢𝑒 ∗ 100 • 𝑃𝑒𝑟𝑐𝑒𝑛𝑡𝑎𝑔𝑒 𝑅𝑒𝑙𝑎𝑡𝑖𝑣𝑒 𝐸𝑟𝑟𝑜𝑟 = 𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡 −𝑆𝑦𝑠𝑡𝑒𝑚 𝐶𝑜𝑢𝑛𝑡 𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡 ∗ 100
  • 92. Percentage Relative Error Date Time MCount SCount RelError %RelError 25-Aug 0700-0800 406 248.0483511 0.389043 38.90435 0800-0900 470 350.2521005 0.254783 25.47828 0900-1000 558 449.906567 0.193716 19.37158 1000-1100 589 876.6793188 -0.48842 -48.842 1100-1200 711 946.1732442 -0.33076 -33.0764 1200-1300 731 511.9549749 0.299651 29.96512 1300-1400 793 20.83939207 0.973721 97.37208 1400-1500 746 273.0216483 0.634019 63.40192 1500-1600 706 1534.427951 -1.17341 -117.341 1600-1700 746 1286.158946 -0.72407 -72.4074 1700-1800 805 807.2522873 -0.0028 -0.27979 Average 660.0909 664.0649801 0.002315 0.231519
  • 93. Percentage Relative Error Date Time MCount SCount RelError %RelError 26-Aug 0700-0800 335 508.9954 -0.51939 -51.9389 0800-0900 394 531.5671 -0.34916 -34.9155 0900-1000 674 448.7194 0.334244 33.42443 1000-1100 571 409.5628 0.282727 28.27272 1100-1200 635 447.9 0.294646 29.46456 1200-1300 693 151.7199 0.781068 78.1068 1300-1400 602 638.1017 -0.05997 -5.99696 1400-1500 677 717.3093 -0.05954 -5.95411 1500-1600 631 522.3327 0.172214 17.22144 1600-1700 542 1010.262 -0.86395 -86.3952 1700-1800 517 486.8609 0.058296 5.829616 Average 570.0909 533.9392 0.006472 0.647172
  • 94. Percentage Relative Error Date Time MCount SCount RelError %RelError 23-May 0600-0700 165 173.4578 -0.05126 -5.12593 0700-0800 291 279.0207 0.041166 4.116609 0800-0900 287 251.1404 0.124946 12.49464 0900-1000 312 305.8053 0.019855 1.985486 1200-1300 334 368.89 -0.10446 -10.4461 Average 277.8 275.6628 0.006049 0.604942
  • 95. Percentage Relative Error Date RelError %RelError 25-Aug 0.002315195 0.231519 26-Aug 0.00647172 0.647172 23-May 0.006049424 0.604942 Average 0.004945446 0.494545
  • 96. Conclusion • We developed a vision-based system for counting vehicles and estimating traffic congestion levels in road sections installed with traffic surveillance cameras, accessible through a web interface.
  • 97. Conclusion • Performance have been affected by the following: – Quality of video – Background model – Position of camera towards the road – Detection of unwanted blobs/segmented blobs
  • 98. Conclusion • System Counts has a .78 Correlation Coefficient value • It also has a 0.49 Percentage Relative Error
  • 99. Conclusion • Gathered traffic videos from the Archer’s Eye • Developed Algorithms for Classification of vehicles and track and count the number of vehicles • Generated Historical Graphs of Traffic Congestion levels
  • 100. Conclusion • Designed a Database for storage of videos and Traffic Statistics • Developed an interactive Web interface
  • 101. TraVis: Web-Based Vehicle Counter with Traffic Congestion Estimation Using Computer Vision Presented by: Aguirre, Byron Franco Alcantara, Jan Andre Trinidad, John Ferdinand Adviser: Dr. Joel P. Ilao

Editor's Notes

  1. Hello Goodmorning panelists We are the group Travis and our Thesis is a Web-based vehicle counter with traffic congestion estimation using computer vision. I am,(names) And we are advised by Dr. Joel Ilao.
  2. This is the flow of the presentation. (wait few seconds)
  3. So for Problem that we would like to tackle,
  4. Nowadays, there are many traffic cameras being installed to monitor traffic. However, not all of them might have people watching all the time. These unmonitored videos become unused since the traffic situation changes in time. With that, a traffic monitoring system that makes use of all the recorded videos can provide information to the public regarding traffic situation.
  5. Here are our objectives to guide us in this project…
  6. For our general objective, we aim to develop a vision-based system for counting vehicles and estimating traffic congestion levels that would be accessible through a web interface.
  7. To develop our system, we came up with these specific objectives. First off, we have to gather traffic videos. Next would be the development of the machine vision algorithms for the processing the videos. These algorithms would classify vehicles according to type, count the number of vehicles and also track them.
  8. After that, we generate graphs of traffic congestion levels based on the data made from the algorithms. To store these traffic statistics, we will design a suitable database and to show these results, we will develop an interactive web interface.
  9. The scope of TraVis include: Ideitification and classification of vehicles Distinguishin adjacent vehicles in traffic
  10. Estimate traffic congestion levels based on vehicle counts Show the results to the users through a web application
  11. A limitation of our study is that we have no hardware implementation such as in video acquisition. Our traffic videos were acquired from Dlsu’s Archer’s Eye.
  12. We also considered the following that may affect the performance of our system.
  13. Traffic at night and swerving vehicles were not considered
  14. The IP cameras recorded videos at 6 FPS only, adding challenges when being processed for vehicle detection.
  15. <HIDDEN> The following is the training data used for the purpose of testing the system.
  16. In TraVis, vehicle classification is done through the following categories. (The types of vehicles are divided to the following. Small, Medium and Large. You can see in the table the distribution of the types of vehicles.)
  17. The performance of the system is assessed by the accuracy against occlusion and the number of vehicles present
  18. This is a diagram of our system overview. The users selects a video to process through the web application. The system then selects the videos to process and have their status inserted into the database. After generating the traffic statistics by Matlab instances, the data is stored again in the database. These data would be continually uploaded to the web application so as to have the feel of semi-real time.
  19. Our system implementation is divided into three modules: Video Acquisition, Vehicle Detection and Statistics Generation.
  20. Our system implementation is divided into three modules: Video Acquisition, Vehicle Detection and Statistics Generation.
  21. First is Video Acquisition..
  22. This shows the process of the Video Acquisition module. It starts with an input traffic video, followed by getting the frames before they are processed. (For our Video Acquisition module, this is a summary of the process of it.)
  23. In the video acquisition module, user selects a video, travis then checks if the video is available, if not flag the database whether it was processed already (in the past) or not. If not yet processed, it will invoke a Matlab instance in the backend of the system. The selected video would be processed. During the processing, it will check (frequently) if the video is finished or not. If it is, the results are displayed and if not, check if 5 minutes – in video time, has already passed and then insert the data in the database. After that return to processing the video until finished.
  24. This will cover further discussions of the sub-modules in the video acquisition. Starting with the video input sub-module…
  25. In travis, videos used were locally stored and accessed by the server through their file locations.
  26. These are the screens of the web application during the selection of videos.
  27. When the process button is clicked, a Matlab instance would be invoked.
  28. The next sub-module is Frame extraction…
  29. In this sub-module, video frames are extracted and processed one by one.
  30. The next module that we would discuss is the Vehicle Detection Module. This module covers majority, if not all, of the processing in TraVis.
  31. We begin with the frames as inputs. Then the object detection sub-module prepares the frames for vehicle tracking. Once the vehicles are tracked, they are classified according to the types mentioned earlier. Vehicle counts are done when vehicles have been classified. The estimation of traffic congestion level follows when necessary data are obtained such as the vehicle counts and the classifications. Once these data are gathered, they are inserted into the database to be displayed to the user. (We start with the flow of the vehicle detection. First, a sequence of images would undergo object detection algorithms. These potential vehicles are then tracked, classified and counted. After getting the counts, estimation of the congestion would be done and then all of the data would be inputted in the Travis Database.)
  32. This is a more detailed flow of the Vehicle detection module. When processing has started, an initial background model estimate is used to segment the foreground objects. We would then get object properties and assign vehicle IDs to these objects. To track these vehicles, Kalman Filter is used, which will be explained later. They are then classified according to their types and counted. Next is the estimation of traffic congestion. After that, the processing would be checked if the video is done or not. If it is the option to view the results would then be available and if it is not yet done, the previous values would be stored in the database again and the loop would repeat.
  33. The sub-modules in vehicle detection starts with the object detection….
  34. In this sub module, an initial background model is estimated. Using one of the most used vehicle detection technique, background subtraction is then performed throughout the frames of the video using the initial backgorund model. In TraVis, succeeding background modelling are done simultaneously as the video frames are traversed. Background update is done when five minutes in the video has occurred.
  35. <HIDDEN> For the Object detection, Background subtraction and area thresholding techniques were used. In background subtraction, a static background image is taken from the video to be the background model. This background model is used when extracting the foreground models. Area thresholding is used to take out unwanted blobs in the subtracted image and leave potential vehicles.
  36. The next slides would show the steps in Object detection. First, The initial background image is on the left and on the right is the use of ROI or Region of Interest. It is a road mask to limit the detection to the part of the road where vehicles pass through. The next slides will show pairs of images coming from two different frames.
  37. The images above are the gray-scale frames from the video. The images below show the effect of background subtraction.
  38. Thresholds are then used to the foreground to limit the blobs. Below as you can see, it is the Foreground filtered with road mask. You can see the difference from the images above that only in that region can blobs be seen.
  39. In the next set of images we can see the effect of morphological operations and edge detection. In the first set, erosion and dilation were used to highlight the blobs to be considered as vehicles. In the second set, Edge detection is also used to remove blobs that are intersecting with the background mask to remove extra blobs. (it may not be highlighted here)
  40. Here is an application of edge detection in this sub-module. Basically, the edges of vehicles are obtained, then dilation is performed to somehow connect the edges that have small gaps in them, and then filling in the object. (Here would be a better example of edge detection.)
  41. If you recall the previous pair of images, there are small remaining objects in the scene. In this slide, these small objects are filtered via area thresholding. The remaining objects are now the potential vehicles that will be tracked in the next sub module. (Here the application of threshold is used to…(explain jan))
  42. Vehicle tracking. In this sub module, potential vehicles will have their aspect ratios checked – only the ones with horizontal aspect ratios will be tracked. This is because in the current configuration of the cameras, vehicles appear as horizontal objects.
  43. In the image on the right you could see two boxes. The two boxes represent the two states of the kalman filter: the predicted (red) and the corrected (green). (The predicted one is the box for kalman filter’s prediction of the object while the green box is the detected (explain better jan)
  44. So why did we use kalman filter? It is not only because of its consistent performance in the papers referenced in travis, but since travis targets vehicles – whose motion is linear, and the kalman filter making use of the law of motion, we find it most utilized for this project.
  45. Include: Since vehicles, we follow Newtonian law of motion.
  46. Include: Since vehicles, we follow Newtonian law of motion.
  47. This is the vehicle tracking flowchart It starts with the segmented objects that we could refer to as blobs. These blobs have been applied with the morphological operations as mentioned in the previous sub module These blobs are limited via the region of interest also known as the road masks and area thresholding When the vehicles are inside the region of interest, and filtered according to their areas, properties such as the bounding box and centroid coordinates, and the areas are obtained The centroids are used by the kalman filter object to predict the next location of the vehicle To keep track of the vehicles detected, the hungarian algorithm is used together with the kalman filter. The hungarian algorithm finds the minimal values between the detected locations and the predicted locations To be further explained by jan….
  48. The next set of images shows the frame by frame tracking of the system in black and white and rgb images.
  49. You might wonder why on the top images even though there is a box there isn’t any vehicle there anymore. This is due to edge detection. We used edge detection to limit the counting of vehicles. There are times when the vehicles are at the edge of the image and the bounding box then merges the whole image with the vehicle making the bounding box as large as the whole image making it an error.
  50. Vehicle classification is the classification of the vehicles according to their types. These types are separated by the minimum and maximum sizes of the pixel areas of the blobs.
  51. Include traffic congestion formula
  52. Change the images – must be same frame numbers and same video used. Remove window of mac
  53. Change the images – must be same frame numbers and same video used. Remove window of mac
  54. CHANGE IMAGES
  55. In here is the graph comparing the differences of counts when it is manually done, through a one time background model and a frequently changing background model. Below is the comparison of the pearson’s correlation coefficient of the one time background model and a frequently changing background model. It shows how related each count is to the manual counts. And as you can see it has improved a lot from a negative to a coefficient near 1. It indicates that the frequently changing background model is the better choice.
  56. Relative error is the measure of mean absolute error to the mean value of the measured dataset Absolute error is used to identify the exact error in the dataset
  57. This shows us that there is a low percentage of error or uncertainty in our system.
  58. We were able to achieve our main goal of developing a vision-based system for counting vehicles and estimating traffic congestion levels in road sections installed with traffic surveillance cameras, that is accessible through a web interface.
  59. Although our performance have been affected by the following first off is the quality of the video, we thought that the videos of the Archer’s eye has a low quality because of the cameras used and of the framerate of the videos. Next is our problems with the background models, we used a background modelling scheme that updates every 5 minutes due to the changes in the settings of the camera and also the position of the camera towards the road because sometimes it moves. This sometimes has a problem when the traffic is really heavy and the background updated while there are too many vehicles. And also unwanted blobs of segmented blobs greatly affects our performance. First the unwanted blobs such as the people detected. Even though this is controlled with the use of the background masking or by using a region of interest and also with the use of aspect ratio there are still some instances of detections of these unwanted blobs. It maybe be because that a group of people walking in a group that makes the bounding box see that group as one object thus also making it into a potential vehicle blob. There are also problems with segmented blobs, this happens due to the morphological process used. Some pixels of the cars were removed. Some cars are then segmented into two or more blobs that either is detected into two vehicles or not even detected.
  60. Admist those problems, Our System Counts with the application of the multiplying factors has an average of .78 Correlation Coefficient value which is close to 1 that indicates that the values were highly correlated. It also has an average of 0.49 Percentage Relative Error which shows that the relative error of the values is low indicating the accuracy of the system amidst the aforementioned factors that affect the performance.
  61. We were able to gather traffic videos from the Archer’s Eye which covers our first specific objective. We were also able to develop machine vision Algorithms for processing the videos to classify the vehicles according to type and track and count the number of vehicles
  62. We were also able to design a suitable database for efficiently storing traffic surveillance videos and corresponding traffic statistics And lastly, we develop an interactive web interface for accessing relevant data and information from the traffic surveillance videos.