SlideShare une entreprise Scribd logo
1  sur  65
Télécharger pour lire hors ligne
Registration Number:……..../2016
People’s Democratic Republic of Algeria
Ministry of Higher Education and Scientific Research
M’Hamed BOUGARA University – Boumerdes
Institute of Electrical and Electronic Engineering
Department of Electronics
Final Year Project Report Presented in Partial Fulfilment for
the Requirements of the Degree of
MASTER
In Electrical and Electronic Engineering
Option: Telecommunications
Title:
Presented by:
- BOUAICHA Abdenour
Supervisor:
Dr. KEROUH Fatma
Characterization of Vehicle Flow for
Intelligent Transportation Systems
II
To my beloved mother.
To my caring father.
To my brother and sister.
To all my family.
To all my friends.
To any one who ever helped me and stood by
me.
I dedicate this work.
III
Acknowledgments
All the praises and deepest gratitude go to Allah Almighty, the
Omnipotent and the Benevolent, Who has bestowed upon me the quest for
knowledge and granted unflinching determination to complete this work
successfully.
First and foremost, all my gratitude, thanks and appreciation to my family,
especially my parents, for being the reason I started here, and also for their
prayers, endurance and encouragements that made me able to cross the finish
line.
I offer my sincerest and deepest gratitude to my supervisor, Dr. Fatma
KEROUH, who supported me throughout my project with her advices, patience,
directing, guidance, and a lot of encouragement.
I would like to express my gratitude to Pr. Djamel Ziou from the University
of Sherbrooke, Canada, for his valuable guidance.
I would like also to express my gratitude to my neighbor Dr. Aissa BOUKHAR
from the University of Science and Technology Houari Boumediene (USTHB),
Algeria, for his advices, and encouragements.
I want to thank all professors of the institute, and the members of the jury
committee for their participation in the scientific evaluation of this work.
I also want to thank my friends and colleagues for sharing this experience
with me.
IV
Abstract
This project deals with real-time estimation of vehicle flow for intelligent
transportation systems. The purpose of the project is to build a complete intelligent system
that counts, classifies, and estimates the speed of vehicles using image processing techniques.
For the proposed system, the statistics of flow are estimated in real-time by analyzing video
acquired by a fixed camera placed at the roadside. The idea is that the user indicates the
region of interest, which is linear and crosses the road. Observations over this region form
time series used to detect, count, classify, and estimate the speed of vehicles. Tests performed
on real videos with different intrinsic characteristics prove the effectiveness of the proposed
real-time algorithm in terms of vehicles detection, counting, classification, and speed
estimation. They show the percentage accuracy of vehicle detection and counting over than
98%, and more than 92% for classification. The proposed approach has the advantage of
covering the problems of real-time execution, illumination variation, bad illumination,
multiple car occlusions, blur effect, and noise.
Key words: Image processing, intelligent transportation system, real-time, region of
interest, vehicle counting, vehicle classification, vehicle detection, vehicle speed estimation,
video analysis.
V
Table of contents
Table of contents
Dedication…………………………………………………………………………………….. II
Acknowledgement…………………………………………………………………………… III
Abstract……………………………………………………………………………………….IV
Contents………………………………………………………………………………………. V
List of figures……………………………………………………………………………….. VII
List of tables………………………………………………………………………………...VIII
Acronyms……………………………………………………………………………………..IX
General introduction…………………………………………………………………………... 1
Chapter I: A brief introduction to ITS and smart video surveillance…………………………..3
1.1 Introduction………………………………………………………………………3
1.2 Intelligent Transportation systems……………………………………………….3
1.2.1 Definition………………………………………………………………….. 3
1.2.2 The benefits of ITS………………………………………………………... 4
1.2.3 The major categories……………………………………………………….4
1.2.3.1 The advanced Traffic Management Systems………………………4
1.2.3.2 The advanced Travelers Information System……………………... 5
1.2.3.3 The commercial Vehicle Operations……………………………….5
1.2.3.4 The advanced Public Transportation Systems…………………….. 6
1.2.3.5 The advanced Vehicle Control Systems…………………………... 7
1.2.3.6 The advanced rural Transportation Systems……………………….7
1.3 Video Surveillance……………………………………………………………….7
1.3.1 History……………………………………………………………………...8
1.3.2 Applications……………………………………………………………….. 8
1.3.3 Benefits……………………………………………………………………. 9
1.3.4 Smart video surveillance…………………………………………………...9
1.4 Smart traffic surveillance………………………………………………………...9
1.5 Conclusion……………………………………………………………………... 10
VI
Table of contents
Chapter II: Related works on smart traffic surveillance………………………………………11
2.1 Introduction……………………………………………………………………..11
2.2 Related work…………………………………………………………………… 11
2.3 Discussion……………………………………………………………………… 15
2.4 Conclusion……………………………………………………………………... 15
Chapter III: Proposed Intelligent Transportation System……………………………………..16
3.1 Introduction……………………………………………………………………..16
3.2 Proposed ITS……………………………………………………………………16
3.2.1 Preprocessing stage……………………………………………………….17
3.2.2 Processing stage………………………………………………………….. 17
A. Vehicle detection and counting………………………………………..20
B. Vehicle detection and classification…………………………………...23
C. Vehicle detection and speed estimation………………………………. 24
3.3 Conclusion……………………………………………………………………... 27
Chapter IV: Experiments, Results, and discussion……………………………………………28
4.1 Introduction……………………………………………………………………..28
4.2 Experiments……………………………………………………………………. 28
4.3 Results and discussions…………………………………………………………31
4.3.1 Vehicle detection and counting…………………………………………...31
4.3.2 Vehicle detection and classification………………………………………33
4.3.3 Vehicle detection and speed estimation…………………………………..35
4.4 Summary………………………………………………………………………... 37
4.5 Analyzing the proposed ITS……………………………………………………. 39
4.5.1 The strengths of the approach…………………………………………….. 39
4.5.2 The weaknesses of the approach…………………………………………..39
4.6 Conclusion……………………………………………………………………… 40
General conclusion……………………………………………………………………………41
Appendices……………………………………………………………………………………...i
List of communications……………………………………………………………………... viii
References……………………………………………………………………………………. ix
VII
List of figures and tables
List of figures
Fig1: Data flow diagram of the system…………………………………………………...…...2
Fig1.1: ITS conceptual model………………………………………………………………... 3
Fig1.2: Traffic management center of Hampton city (USA)…………………………………..5
Fig1.3: Principle of geolocation based on GPS,GSM/GPRS………………………………….6
Fig 1.4: Bus view map area…………………………………………………………………… 6
Fig1.5: Surveillance camera…………………………………………………………………... 7
Fig1.6: The main part of CCTV system………………………………………………………. 7
Fig1.7: CCTV camera operating on traffic road……………………………………………...10
Fig3.1: Schematic flow of the proposed approach…………………………………………... 17
Fig3.2: Example of LBP descriptor applied on gray level image with different illumination.18
Fig3.3: Example of selected ROI on a frame……………………………………………….. 19
Fig3.4: Flow chart of the preprocessing stage………………………………………………..19
Fig3. 5: Time series of the absolute differences computed on the four frames of Fig 3. 3 The
green line is Th1 and the red one for Th2……………………………………………………………21
Fig3.6: The maximum noise Vs Th2 ………………………………………………………... 21
Fig3.7: Flow chart summarizes the detection and counting part……………………………..22
Fig3.8: Example frame for best ROI's selection……………………………………………...23
Fig3.9: Example frame for selectin ROI's far from camera…………………………………. 23
Fig3.10: Flow chart summarizes the vehicle detection and classification part……………… 24
Fig 3.11: The standard length of whit line……………………………………………………25
Fig3.12: Example frame of selecting two ROI for each lane for speed estimation…………..25
Fig3.13: Illustration of the problem of far lines……………………………………………... 26
Fig3.14: Flow chart summarizes the vehicle speed estimation part………………………….27
Fig4.1: Example of one frame from each test videos………………………………………...29
Fig 4.2: Example of illumination variation in test videos…………………………………… 29
Fig 4.3: Example of shadow and blur in test videos………………………………………….29
Fig4.4: Example of occlusion in test videos………………………………………………….30
Fig4.5: Example of effect of wind in test videos……………………………………………..30
Fig4.6: Examples of frames with selected ROI's from the test videos……………………….30
Fig 4.7: Example of final vehicle detection and counting system……………………………32
Fig 4.8: Example of final vehicle detection and classification system……………………….33
Fig 4.9: Example of selected lines for vehicle detection and speed estimation……………... 35
Fig 4.10: Example of final vehicle speed estimation…………………………………………36
Fig4.11: Example of final system for vehicle detection, counting, classification, and speed
estimation……………………………………………………………………………………..38
VIII
List of figures and tables
List of tables
Table2.1: Summary settings of presented related works……………………………………..14
Table4.1: Different settings of the four test video…………………………………………... 28
Table4.2: Results of applying the detection and counting algorithm on test videos…………32
Table4.3: Results of applying the detection and classification for tested videos…………….34
Table4.4: Results of applying the speed (km/h) estimation approach on second video…….. 36
Table4.5: Results of applying the speed estimation approach on third video………………..37
Table4.6: Results of applying the speed estimation approach for fourth video……………...37
Table4.7: Summary of the evaluation of the proposed ITS………………………………… 38
IX
Acronyms
Acronyms
APTS Advanced Public Transportation Systems.
ARTS Advanced Rural Transportation Systems.
ATIS Advanced Travelers Information Systems.
ATMS Advanced Traffic Management Systems.
AVCS Advanced Vehicle Control Systems.
CCF Counter of Consumed Frames.
CCTV Closed Circuit TeleVision.
CRASC Centre de Recherche en Anthropologie Sociale et Culturelle.
CVO Commercial Vehicle Operation.
Fig Figure.
FPS Frames per Second.
GPRS General Park Radio Service.
GPS Global Positioning Systems.
GSM Global System for Mobile communication network
GSS Generation Surveillance Systems.
ITS Intelligent Transportation Systems.
IVHS Intelligent Vehicle Highway Systems.
LBP Local Binary Pattern.
RADAR Radio Detection And Ranging.
ROI Region of Interest.
1
Introduction
Introduction
The increase of vehicle traffic causes many problems including traffic accidents,
traffic congestion, road degradation, and even emissions in terms of pollutants and
greenhouse gases. Thus, considerable efforts are made to develop technologies in
order to help the management of road traffic. The aim is to understand issues and
improve the security on roads. Two common classes can be distinguished, visual-based and
non-visual techniques. The visual-based techniques include the vision sensors. The non-visual
techniques include various sensors as RADAR. RADAR-based system is widely used to
detect, classify, and estimate the speed of vehicles. These systems work effectively but they
have some problems related to complexity and cost. These problems appear in the design and
the implementation because they need much more electronic devices and electrical power [1].
To avoid such problems, researchers use vision-based sensors (cameras) to develop a
complete system able to detect, count, classify, and estimate the speed of vehicles. This
system is called the Intelligent Transportation Systems (ITS). The effectiveness of vision-
based system depends on the software not on the sensor. However, this system is challenging
because of problems related on acquired videos such as blur effect [2], illumination variation,
bad illumination, occlusion, fixed camera, shadow, and noise.
Our purpose in this project is to develop a vision-based ITS. This last has to be able to
detect, count, classify, and estimate the instantaneous speed of the vehicles using image
processing techniques. The proposed approach has to consider some constraints as real-time
execution and also covering the problems related on the acquired videos problems cited
previously (illumination variation, noise…).
To fulfill the system requirements, the proposed idea turns on analyzing just a specific
region of interests (ROI). This ROI represents a line crosses the road. Observations over this
line are used to detect, count, classify, and estimate the speed of vehicles. Thus, instead of
analyzing the whole frames of the video, just a ROI is extracted and analyzed. Figure 1
summarizes the data flow diagram of our developed system. The process of vehicle detection,
counting, classification, and speed estimation is achieved while the vehicle passes through the
ROI. The proposed ITS has the advantage of being simple, easy to implement, real time, and
accurate.
This project is conducted as part of a national research project PNR entitled "Design
and implementation of a Geographic Information platform for the study and management of
Algerian cities" supported by the research center CRASC, Oran.
The rest of this report is organized in four chapters. In chapter 1, we present a brief
introduction on Intelligent Transportation Systems (ITS) and smart surveillance. Chapter 2
describes some recent related works on traffic surveillance systems. In chapter 3, we exhibit
the proposed ITS. The last chapter presents the achieved experiments and obtained results.
2
Introduction
The
surveillance
camera
Image
processing
techniques
Vehicle
detection
and counting
Vehicle
detection and
classification
Vehicle
detection and
speed
estimation
Fig1: Data flow diagram of the system
3
Chapter I: A brief introduction to ITS and smart video surveillance
Chapter I: A brief introduction to ITS and smart video
surveillance
1.1. Introduction
To have a good view for our research project, we are going in this chapter to introduce
briefly Intelligent Transportation Systems (ITS) and smart traffic surveillance. This chapter is
organized as follow: We talk about ITS in section 2. In section 3, we present the video
surveillance system. Smart traffic surveillance systems will be discussed in Section 4.
1.2. Intelligent Transportation Systems
The present section describes the ITS. The brief description includes the defining, the
benefits and the major categories of ITS.
1.2.1. Definition
It fact, building more roads to reduce traffic congestion is not always the easier and the
best solution. It is very expensive, while causing a considerable environment impact besides
requiring a large space. This is an important limitation within urban areas. Furthermore, it is
straightforward that the improvement of the transportation infrastructure is essential for
economic development. Hence, a compromise solution must be implemented. The difficulties
concerned with this subject motivate research community to center their attention in the area
of "Intelligent Transportation Systems".
An Intelligent Transportation System (ITS) is defined as a set of information technologies
applied to transportation infrastructure and vehicles to improve their performance [3].
Expending on this, then, ITS is an application that incorporates electronics, computer, and
communication technologies into vehicles and roadways to improve their performances [4].
The figure 1.1 represents an ITS conceptual model.
In some references and reports, you find that ITS also called Intelligent Vehicle Highway
Systems (IVHS) [5]. ITS has been developed since 1930s and it has been slowly creeping into
our lives. The major developments on ITS were made in Europe, the United State, Japan [6],
South Korea, and Singapore [7].
Fig1.1: ITS conceptual model [8]
4
Chapter I: A brief introduction to ITS and smart video surveillance
1.2.2. Benefits of ITS
ITS maximize the capacity of infrastructure, reducing the need to build additional
highway capacity. ITS also enable transportation agencies to collect the real time data needed
to measure and improve the performance of the transportation system, making the ITS the
centerpiece of efforts to reform surface transportation systems and hold providers accountable
for results [7]. Among the various benefits, we can talk about eight key classes:
 Increasing safety.
 Improving emergency response.
 Enhancing mobility and convenience.
 Improving interagency communications.
 Delivering environment benefits.
 Increasing travel information and trip enhancement.
 Reducing congestion.
 Increasing economic activities [5].
1.2.3. Major Categories of ITS
The six global major categories of ITS are [8]:
 Advanced Traffic Management Systems (ATMS).
 Advanced Travelers Information Systems (ATIS).
 Commercial Vehicle Operation (CVO).
 Advanced Public Transportation Systems (APTS).
 Advanced Vehicle Control Systems (AVCS).
 Advanced Rural Transportation Systems (ARTS).
Let's give a brief description for each category.
1.2.3.1. The Advanced Traffic Management Systems (ATMS)
The ATMS are fundamental part of intelligent transportation systems that are used to:
 Increase transportation system efficiency.
 Enhance mobility.
 Improve safety.
 Reduce fuel consumption.
 Increase economic productivity.
ATMS operate with a series of video and roadway loop detectors, variable message
signs, network signal and ramp meter timing schedules, including roadways incident control
strategies from one central location to respond to traffic conditions in real time [8]. ATMS
contains three main elements:
• Collection data team-monitoring traffic conditions.
• Support systems: cameras, sensors, semaphores, and electronic displays. Help
system operators to manage and control real time traffic.
5
Chapter I: A brief introduction to ITS and smart video surveillance
Fig1.2: Traffic management center of Hampton city (USA)[9]
• Real time traffic control systems: these systems use the information provided by
the two previous elements they can change semaphores, send messages to
electronic displays and control highway access [8].
This system is based on traffic surveillance system. We are going to talk about it later.
Figure1.2 represents the ATMS at the Hampton Roads, vehicle traffic management center
manages more than 800 lane miles of roadway.
1.2.3.2. The Advanced Travelers Information Systems (ATIS)
ATIS are systems that acquire, analyze, and present information to assist surface
transportation travels in moving from a starting point to their desired destination. These
systems include static and real-time information on traffic conditions, and schedules, road and
weather conditions, optimal routes, recommended speeds, lane restrictions and tourist
information. All these information are distributed from the traffic management center. The
ATIS distribute information using several communications technologies: wireless broadcast,
electronic data lines to remote terminals, and telephone advisory messages [10].
1.2.3.3. The Commercial Vehicle Operations (CVO)
CVO systems use different ITS technologies to increase safety and efficiency of
commercial vehicle and fleets [11]. CVO systems became useful for large and medium
companies that have commercial fleets, because they allow the management of all the
vehicles, while controlling speed and stopping-place times, besides fulfilling the destination
[8].
These systems would have a satellite navigation system (such as Global Positioning System
–GPS-) or Global System for Mobile communication/General Park Radio Service
(GSM/GPRS) systems, a small computer and a digital radio in each truck. For every few
minutes the computer transmits the truck location. The digital radio service forwards the data
to the central office of the trucking company [8].
6
Chapter I: A brief introduction to ITS and smart video surveillance
Fig1.3: Principle of geolocation based on GPS,GSM/GPRS [12]
A computer system in the central office manages the fleet in real time under control of a
team of dispatchers. In this way, the central office knows where its trucks are [8]. Figure1.3
represents principle of geolocation based on GPS,GSM/GPRS .
1.2.3.4. The Advanced Public Transportation Systems (APTS)
APTS use technologies from ATMS and ATIS to improve the operation and
efficiency of high occupation transport such as buses and trains, to improve the mass
transport service, allowing route information, travel schedules, costs, and real time
information about changes in transportation systems [8]. Through APTS, one can
control, plan, improve the services of a fleet, and foresee a more flexible service with
efficiency and safety to guarantee customers satisfaction and trip control costs.
The figure 1.4 represents the user interface of a bus location system
BUSVIEW where we can find the real time information of the buses location [13].
Fig 1.4: Bus view map area.[8]
7
Chapter I: A brief introduction to ITS and smart video surveillance
1.2.3.5. The Advanced Vehicle Control Systems (AVCS)
AVCS are the systems that join sensors, computers and control system to assist
and alert drivers or take part of vehicle driving [8]. The AVCS has the following main
purposes:
 Solve the urban congestion problems.
 Develop an accident free ground transportation system.
 Reduce the negative environmental impacts of transportation system levels [14].
1.2.3.6. The Advanced Rural Transportation Systems (ARTS)
ARTS are designed to solve the problems arising in rural zones. Rural area
roads have a unique set of attributes such as steep grades, blind corners, curves, few
navigational signs, mix of users, and few alternative routes. Some of the referred
systems used in the urban areas already begun to be implemented in rural areas, such
as ATMS, ATIS and APTS. The five goals of the ARTS are:
 Improve the safety and security of users of the rural transportation system.
 Enhance personnel mobility and accessibility to services, and enhance the
convenience and comfort of all users of the transportation system.
 Increase operational efficiency and productivity of the transportation system,
focusing on system providers.
 Enhance economic productivity of individuals, businesses and organizations.
 Reduce energy consumption and environmental costs and negative impacts [15].
As we have seen in this part: to build ITS, we require information, and this
information requires data which are generated by surveillance. In part two of this chapter, we
are going to talk about video surveillance system.
1.3 Video surveillance
Video Surveillance (also called Closed Circuit Television –CCTV-) is one of the
active research topics in Image Processing and computer vision. A video surveillance system
offers the possibility of visual surveillance while the observer is not directly on site.
Surveillance may be performed not only directly but may also be stored, evaluated, and
repeated as often as necessary [16].
Fig1.5: Surveillance camera[17] Fig1.6: The main part of CCTV system[18]
8
Chapter I: A brief introduction to ITS and smart video surveillance
In this section, we give brief description of CCTV surveillance system by talking about
the history, applications and benefits. Then we finish this section by talking about smart
surveillance systems.
1.3.1 History [19]
Video surveillance systems have long been in use to monitor security sensitive areas.
The history of video surveillance consists of three generation of systems, which are called
1GSS, 2GSS and 3GSS.
The first generation surveillance systems (1GSS, 1960-1980) were based on analog
sub systems for image acquisition, transmission and processing. They extended human eye in
spatial sense by transmitting the outputs of several cameras monitoring a set of sites to the
displays in a central control room. They had major drawbacks like requiring high bandwidth,
difficult archiving and retrieval of events due to large number of video tape requirements, and
difficult online event detection which only depended on human operators with limited
attention span.
The next generation surveillance systems (2GSS, 1980-2000) were hybrids in the
sense that they used both analog and digital sub systems to resolve some drawbacks of its
predecessors. They made use of the early advances in digital video processing methods that
provide assistance to the human operators by filtering out spurious events. Most of the work
during 2GSS is focused on real-time event detection.
The third generation surveillance systems (3GSS, 2000- ) provided end-to-end digital
systems. Image acquisition and processing at the sensor level, communication through mobile
and fixed heterogeneous broadband networks and image storage at the central servers benefit
from low cost digital infrastructure. Unlike previous generations, in 3GSS some parts of the
image processing is distributed towards the sensor level by the use of intelligent cameras that
are able to digitize and compress acquired analog image signals and perform image analysis
algorithms like motion and face detection with the help of their attached digital computing
components. The ultimate goal of 3GSS is to allow video data to be used for online alarm
generation to assist human operators and for offline inspection effectively. In order to achieve
this goal, 3GSS will provide smart systems that are able to generate real-time alarms defined
on complex events and handle distributed storage and content-based retrieval of video data.
1.3.2 Applications
A further field of application of video surveillance system is security technology:
 Verification of alarms (intrusion, hold-up, fire).
 Detection of criminal offences (theft, defalcation).
 Documentation of security relevant events.
 Monitoring of open-air grounds.
 Deterrence of offenders (arson, tamper, vandalism and hold-up).
 Localization of offenders (and tracing of movements of offender in the object).
 Diminishing of accident consequences (prompt intervention).
 Documentation of events.
9
Chapter I: A brief introduction to ITS and smart video surveillance
 Interaction with access control systems.
1.3.3 Benefits
Among the different benefits we consider:
Availability: There was a time when the surveillance techniques were utilized only in
shopping centers and malls. Nowadays, you can notice closed-circuit televisions almost at any
place you visit, from a small store to homes and holy places. As a result, they guarantee
greater public security at a fraction of the cost.
Real-time monitoring: Traditionally big organizations have always had the benefits of video
surveillance manned by security professionals. In the past times, the events captured on video
were used to expose important information and work as proof after the event happened.
However, modern technologies let users to check and reply to alarms immediately.
1.3.4 Smart video Surveillance
Therefore, there is a need of a smart surveillance system for intelligent monitoring
that captures data in real time, transmits, processes, and understands the information related to
those monitored. The making of video surveillance systems ―smart‖ requires fast, reliable,
and robust algorithms for moving object detection, classification, tracking, and activity
analysis [19].
As we have seen in this part, video surveillance system has the benefits of security and
safety, and by making this system smart we can detect, count, classify and track the objects.
For the next part, we are going to talk about essential parts of this chapter.
1.4 Traffic surveillance system
Traffic surveillance is one of important issues in ITS for traffic monitoring. The key
goal of the traffic surveillance system is to estimate the desired traffic parameters through the
vehicle detection, tracking, counting, classification, plate number recognition, and speed
estimation. Figure 1.7 represents CCTV camera operating on traffic road.
Nowadays, there is an instant need for robust and reliable traffic surveillance system
to improve traffic control and management with the problem of urban congestion spreads.
10
Chapter I: A brief introduction to ITS and smart video surveillance
Fig1.7: CCTV camera operating on traffic road [20]
Currently there are two kinds of traffic surveillance technologies:
 The dominant technology is loop sensor detection; this technology is efficient for
vehicle speed and flow data collection. Although many detect devices such as closed
loop, supersonic and radar exist and widely used, the most important drawback of
these equipment is their limitation in measuring some important traffic parameters
and accurately assessing traffic condition. The first reason is that ―blind‖ type of
detection technology is employed. These sensors cannot provide full traffic scene
information.
 Another very popular technique is video monitoring system. The vision-based
approach has the advantages of easy maintenance and high flexibility in traffic
monitoring and, thus, becomes one of the most popular techniques used in traffic
surveillance system.
Our purpose in this project is to build an ITS that counts, classifies and estimates the
instantaneous speed of vehicles using video monitoring system which is part of computer
vision field. We draw on your attention how does the system provide information about the
traffic?, The answer is easy: Vehicle counting gives data that helps to identify critical flow
time periods, determining the influence of large vehicles or pedestrians on vehicular traffic
flow. Vehicle classification are used to know the reason of congestion and air pollution.
Vehicle speed estimation gives data that helps to know the reason of congestion, traffic
accident, and road degradation. As we have seen in this part the smart traffic surveillance is
an important stage on ITS, because any ITS needs information, and information requires data
and data requires smart surveillance.
1.5 Conclusion
In this chapter, we have given a brief description of intelligent transportation systems
(ITS), video surveillance (CCTV) systems and smart traffic surveillance. Next chapter discuss
related works on smart traffic surveillance.
11
Chapter II: Related works on smart traffic surveillance
Chapter II: Related Works on smart traffic surveillance
2.1. Introduction
Many researchers have drawn attention on developing Intelligent Transportation
System (ITS) and specially the part of smart traffic surveillance [21-37]. The aim is to build a
complete system that detects, counts, classifies, and estimates speed of vehicles. Hence many
algorithms and methods have been developed. A brief survey of some recent related works on
smart traffic surveillance is presented in this chapter.
The existing works have been judged by four criteria. The first one is whether the proposed
system is complete or it considers just one task (counting, classification, speed estimation).
The second criterion is if the system is real-time or not. The third one is about considering
practical problems (illumination changing, noise…). The last criterion is the percentage of
accuracy. The present chapter is organized as follow, in the next section, we present some
related works on vision-based smart traffic surveillance. Discussion will follow in the last
section.
2.2. Related works
P. M. Daigavan et a.[21] have developed a non-real-time system that detects and
counts vehicles on highway by using background registration technique and segmentation by
using morphological operator. Tests over 120 frames with constant illumination provide
accuracy rate of 96%. Their algorithm cannot solve the problem of multiple car occlusion.
M .Liang et al. [22] built a real-time system that counts and classifies vehicles into
three categories; small, medium, and big the highway vehicles by applying a regression
analysis. The proposed algorithm was tested for 70 minutes of low quality videos including
severe occlusions provide accuracy rate of 87.82 % for counting and 78.68% for vehicle
classification. This approach has problems of background registration and shadows.
In [23], authors proposed a system that detect, count, and classify vehicles. Vehicle
counting is achieved by finding the centroid and the distance between the marked border and
the vehicle. Vehicles are classified into three categories; small, medium, and big. It is
performed by finding the area and applying a thresholding method. They have tested their
algorithm on five seconds video duration and have found a problem in vehicles counting
because of multiple vehicle occlusions. This approach provides accuracy rate of 91% for
counting and 78.68% for classification.
Harris-Stephen corner detector algorithm is used to count vehicles and estimate
vehicle speed, which is done by N. Chintalacheruvu et al. [24]. They have tested their
algorithm and have found the problem of shadow and multiple car occlusion. This real-time
approach provides accuracy rate of 88% for counting and 94.9% for speed estimation.
12
Chapter II: Related works on smart traffic surveillance
R. Javadzadeh et al. [25], have proposed a method to identify and count vehicles on
highways with low resolution on video by using background subtraction, Prewitt filter, and
various morphological operations. Their non-real-time approach showed the approximate
accuracy of 88% in vehicle detection and counting.
In [26], vehicle counting and classification is done. The author makes the hypothesis
that camera is placed at the center of the road. Background subtraction method and Kalman
filter are used to detect and track individual vehicles throughout the detection zone. The
classification is based on determining the area of vehicles, it is relies on a database to classify
the vehicle into five categories; motor cycle, cars, trucks, minibuses, and heavy trucks. This
method is tested on 3400 frames and it provided a high counting performance of 97%. The
problem of this method is in multiple car occlusions. This not real-time method provides
accuracy rate of 87.22% for vehicle classification that is resulted due to system confusion
between minibus and cars.
E. A. Mosabbeb et al. [27], have developed a non-real-time approach of vehicle
detection in high congestion, noisy, cluttered, snowy, rainy, scenes containing remarkable
shadows, bad illumination conditions, and occlusions. This algorithm use background
extraction after enhancing the image quality. Then, for each frame, background subtraction
and image filtering were applied. Mean and standard deviation matrices together with the
output of the background subtraction phase, have been fed into a mapping process to extract
the strong shadow regions. Then after the mapping process, each individual component in
binary image is considered as vehicle. Their proposed approach has achieved an average
accuracy of 94%. They have also developed an algorithm to define a region of interest (ROI)
which is a square where the road and vehicle are visible. This algorithm keeps the study in
ROI by selecting reference points, when the vehicle passes through the ROI, the points are
shifted, and the speed of vehicle is estimated as the speed of points.
In [28], the application is based on line sensor theory. C. Salvadori et al. have
developed background subtraction method based on background modeling techniques like
Gaussian Mixture Method and Single Metric Method. This real-time approach has been tested
by considering very high frame rate and very high speed of vehicles and gave accuracy rate of
93%.
M. C. Narhe et al. [29], have used background registration, background subtraction,
and the Scale Invariant Feature Transform (SIFT) algorithm to count the vehicles according to
class. This non real-time approach has problem of varying illumination, and required database
to classify the vehicle into three categories; two wheelers, cars, and trucks.
In [30], the speed measurement is performed on binary image. It is calculated using
the position of the vehicle in each frame by finding the spot bounding, the center of gravity,
and using shrinking algorithm. This real-time proposed method is tested with five vehicles on
bad weather and illumination and strong shadow. It provided an accuracy rate of 99.04%.
13
Chapter II: Related works on smart traffic surveillance
In [31], the subtraction and binarization techniques by using bounding box method are
applied to estimate the speed and get the number of plate (registration number of vehicle).
The system worked at any weather and illumination conditions. It provided good results for
vehicle speed estimation and number of plate recognition.
S. Ranjit et al. [32] have applied the motion vector technique after the block extraction
and subtraction to estimate the speed measurement of the moving vehicle. This real-time
approach is tested on videos with very high frame rate (60 fps), and the distance between
camera and vehicle should be 0.51m. According the authors, this approach works well and
provides good results.
In [33], estimating the speed of vehicles was done. The speed is calculated from the
number of frames consumed by the object to pass by the scene by knowing the duration of
each frame. This real-time approach considered on invariant illumination and specifying the
captured distance. The approach has problem of vehicle detection.
S. Joshi [34] has determined the speed by fixing the real distance, then mapped into
image, and divided by travelled time of detected vehicle. He considered as constraints the
noise of camera, and change in illumination. According to the author, this non real-time
approach worked well.
H. Y. Lin et al. [35], have used deblurring algorithms, fixed the captured distance, and
frame rate (30fps) to estimate the speed. The experimented results have shown the estimated
speed accuracy within 95%.
R. Gokule et al. [36], have developed, to estimate the speed of the vehicle, an non
real-time algorithm that determines the centroid of each frame, and keep the processing in that
point by considering the speed of the centroid is the speed of vehicle. The experimental
results have shown the estimated speed accuracy within 92% with considering the change of
illumination, and the height of the camera is 10m.
N. A. Prasath et al. [37] have used a method that determines the speed of vehicles
using the distance travelled by the centroid to the frame rate of the video. The experimental
results on poor weather and strong shadow have shown that the estimated speed is within
small error of actual speed.
The table 2.1 summarizes the settings of all reviewed related works. We specify first the
aim of the proposed ITS including vehicles counting (count), classification (classif), and
speed estimation (speed). Then we attest if the approach is real-time or not (R). Finally we
specify the test conditions such as video duration (D), considered constraints (CC), and
percentage of accuracy (PA).
14
Chapter II: Related works on smart traffic surveillance
Table2.1: Summary settings of presented related works
Ref Count Classif Speed R.T D C.C P.A
[21] Y - - N 120 frames -Same light intensity
during daytime.
96%
[22] Y Y - Y 70minutes -Poor quality video.
-Severe occlusions.
-Low resolution
Count=87.82%.
Classif=78.68%
[23] Y Y - N 20 seconds -Not mentioned Count=91%.
Classif=78.68%
[24] Y - Y Y Not
mentioned
-Not mentioned Count=88%.
Speed=94.9%
[25] Y - - N Not
mentioned
-Low resolution 88%.
[26] Y Y - N 3400
frames
-Camera placed at the
center of the road.
Count=97.37%.
Classif=87.22%
.
[27] Y - - N Not
mentioned
-Strong shadow.
-High congestion.
-Bad illumination.
-Occlusion.
93.94%
[28] Y - - N Not
mentioned
-Very high frame rate.
-Very high speed of
vehicles
93%
[29] Y Y - N Not
mentioned
-Invariant illumination.
-Require database
Good results
[30] - - Y N Test only
on 5
vehicles
-Bad weather.
-Darkness
-Shadows
99.04%
[31] - - Y N Not
mentioned
Any weather and
illumination condition.
Works well
[32] - - Y Y Not
mentioned
-Very high frame rate
(60fps).
-Distance between
camera and vehicle
should be 0.51m
Works well
[33] - - Y Y Not
mentioned
-Shadow removal
-Invariant illumination
-Specifying the
distance captured
Works well
[34] - - Y N Not
mentioned
-Camera noise
-Invariant illumination
Works well
[35] - - Y N Not
mentioned
-Blurred images
-Frame rate=30
-Specifying the
distance
95%
[36] - - Y N Not
mentioned
-Invariant illumination
-Foggy weather
-The height of captured
video is 10m.
92%
[37] - - Y N Not
mentioned
-Poor weather
-Shadows
-Specifying the
distance
Works well
15
Chapter II: Related works on smart traffic surveillance
2.3. Discussion
From the presented state of the art, different image processing techniques have been
used. For vehicle detection and counting, we notice that background registration and
subtraction, using morphological operators, and filtering are very used. However, these
methods has some disadvantages as complexity and the error of accuracy due to invariant
illumination, strong shadow, camera noise, poor weather, low resolution on video, problem of
the congestion, and multiple car occlusion. Moreover, for vehicle classification, we notice that
this task is much challenged because few works exist in this topic. The methods that are used
in recent works are background subtraction, filtering, and finding the area associated with
thresholding techniques. Tests proved that these methods have problems of vehicle detection
due to the problems related on detection and counting task. Finally, for vehicle speed
estimation we notice that this task is much challenged because there are many existing works
for this task but two techniques are only used. The first one is the extraction of the centroid
and the second is to fix the distance and time duration for passed vehicle. These presented
techniques on vehicle detection, counting, classification, and speed estimation are complex,
and most of them are not real-time.
Our work deals with vehicles detection, counting, classification, and speed estimation.
The proposed technique differs from all the presented techniques in the fact that it is real-time
and applied only to the region of interest (ROI) that represents a simple line crosses the road.
2.4. Conclusion
In this chapter, we discussed some related works on vehicle detection, counting,
classification, and speed estimation that are used in literature of smart traffic surveillance.
We explained the disadvantages of related works and problems that till exist. Next chapter,
the proposed ITS will be presented.
16
Chapter III: Proposed Intelligent Transportation System
Chapter III: Proposed Intelligent Transportation
System
3.1. Introduction
Many developed intelligent systems rely on vision-based sensors [21-37]. Image
processing plays a main part on this task. In our project, we deal with developing an ITS by
using a fixed camera placed on the road. The aim is to exploit acquired videos and use image
processing techniques to detect, count, classify, and estimate the instantaneous speed of
vehicles. This chapter is organized as follows: We explain with some details the proposed
ITS, and we conclude the chapter.
3.2. Proposed ITS
Unlike most existing image processing-based methods, that works on the entire image
[21-37], our approach instead is applied only on a region of interest (ROI) considered as a
simple line crossing the road. The idea is to consider only variations over this line to detect,
count, classify, and estimate the speed of vehicles. The considered ROI is provided by a
professional of road monitoring instead of estimated automatically. This semi-automatic
strategy is due to the fact that the definition of a ROI may not be estimated only from raw
data, but it requires knowledge external to the images such as maps. In practice, obstacles and
road intersections interest objects such as school and district need to be known or estimated
from images by using advanced object recognition systems. Note that, the professional of
road monitoring can provide a ROI for each road lane. It allows providing more detailed
statistics to improve the monitoring process and decision-making. Moreover, it relaxes the
constraints on the placement of ROI on the road lane such as avoiding the obstacles. About
the images, we used gray level images, which can be acquired by an off-the–shelf camera
operating in visible spectrum. The color is not required in this application, which makes faster
the proposed technique. Moreover, the ROI is enough for the detection, counting,
classification, and speed estimation of vehicles. Furthermore, to avoid illumination changing
problems, the local binary pattern (LBP) descriptor is used. In fact, it is known that this
descriptor is robust against illumination changing [38].
The proposed method consists of two main stages. The first one concerns the
preprocessing that includes reading the current frame, converting the color frame to gray
level, and finally applying the LBP descriptor. The second stage is about selecting and
analyzing the ROI to detect, count, classify, and estimate the speed of vehicles. The
implementation flow of proposed ITS is summarized on figure 3.1. Let's detail each stage.
17
Chapter III: Proposed Intelligent Transportation System
Start
i=1; count=0
The camera
is activated
Read frame i
Vehicles
passing the
ROI
count ++,
classification,
speed
estimation
i++
Yes
End
No
No
Yes
Apply LBP
Select the ROI
Fig3.1: Schematic flow of the proposed approach.
3.2.1 Preprocessing stage
Tests are achieved over frames as soon as they are acquired from the test video.
Motion is enough for the detection and the counting of vehicles, therefore color
information has no added value. Rather, it makes the task complex because vehicles
have different colors. Thus, gray level camera can be used. If a color camera is used
instead of gray level camera, the gray level image must be estimated from the RGB
color image. There exist several conversion rules depending on the information
needed such as luminance and brightness. Tests were performed on several
conversion rules including those of the estimation of Y of the Ycbcr and V of the
HSV color spaces. The conclusion is that the mean of three color bands (equ1) is the best
conversion rule for vehicle detection, counting, classification, and speed estimation.
18
Chapter III: Proposed Intelligent Transportation System
( ) ( ( ) ( ) ( )) ( )
Where ( ), ( ), and ( ) are respectively the pixel intensity of red R, green
G, and blue B color bands of the color RGB color space.
The LBP is extracted from the gray level image. We use the algorithm proposed in
[38]. An example of LBP descriptor applied on gray level frame is presented in figure3.2.
This figure3.2 contains three same images with variant illumination. It shows that the LBP
images are robust to illumination variation.
We recall that the ROI represents a line crosses the road. In the case that a road is
composed of different lanes, different lines are required. Each one placed on a lane and
shifted from each others to avoid occlusion and take into account the practical requirements.
Figure3.3 depicts an example of selected ROI. As illustrated, the lines composing the ROI are
not collinear in order to provide more flexibility to the user and to reduce counting mistakes
such as the vehicle straddling two lanes. Thus, vehicle detection is achieved over each lane
separately. A flow that summarizes the first stage steps is presented on figure3.4.
Fig3.2: Example of LBP descriptor applied on gray level image with different illumination.
19
Chapter III: Proposed Intelligent Transportation System
a) Original frame b) Selected ROI's(black line)
Fig3.3: Example of selected ROI on a frame.
Start
The camera
is activated
Convert the
color image to
grey level image
End
Apply LBP
Read new
frame
Select the ROI
No
Yes
Fig3.4: Flow chart of the preprocessing stage.
20
Chapter III: Proposed Intelligent Transportation System
3.2.2 Processing stage
The proposed ITS processing part includes three main steps. First vehicles
detection and counting, second vehicles detection and classification, and third vehicles
detection and speed estimation. Let’s detail each step.
A. Vehicles detection and counting [39]
Let’s assume that the reference lines have been recorded before. A reference line is
a list of pixels of the original image on which this line is placed. An image of the road
is acquired and displayed on the screen, and then the user draws those lines by using a
mouse or a stylus. The pixels on the line are recorded and used for change detection.
Recording the reference line and using it during the same session of vehicle detection
and counting allows having close illumination conditions. When a vehicle crosses the
reference line, a change of the gray level is observed. It follows that, detecting
vehicles is equivalent to making a decision about the change of gray level on the
reference line. To do that, for each observed line, the global absolute differences
between this observed line and its corresponding reference line is computed. Figure3.5
shows an example of the time series of the absolute differences over frames of the four
considered ROI’s of figure 3.3. Small peaks appear in the obtained plots. Noise and
change in illumination may be the causes. These undesirable phenomena may affect
the detection accuracy.
To alleviate this drawback, adaptive thresholding is implemented. We conduct
several experimentations in order to find an estimation rule of the used thresholds. We
propose the use of two thresholds. The first one 𝑇ℎ1 is used to detect the frame when
the vehicle starts crossing the road (the green line on the figure3.5). The second one
𝑇ℎ2 when the vehicle leaves the ROI (the red line on the figure3.5). These thresholds
need more explanations. 𝑇ℎ2 is a function of 𝑇ℎ1.
The later depends on the video noise (the illumination change is considered as
semantic noise). One can estimate the noise and define the 𝑇ℎ1 computation rule.
From figure3.6, we can notice that the maximum noise is close the second adaptive
thresold Th2. One can estimate the noise to define the 𝑇ℎ1 computation rule.
However, the definition of a useful rule is not easy because the noise estimator may be
highly biased. Thanks to the fact that the ratio of the peak due to noise and the peak
due to vehicles is low, the frame rate per second (FPS) of a video can be used instead.
Indeed, we expect that the noise is high when the FPS is high for the off-the-shelf
cameras. In other words, 𝑇ℎ1 depends also on the used camera. More precisely,
experimentations show that the following estimation rules of the thresholds are useful:
𝑇ℎ (2)
𝑇ℎ 𝑇ℎ (3)
21
Chapter III: Proposed Intelligent Transportation System
a)Line1. b) Line2.
c)Line3. d)Line4
Fig3. 5: Time series of the absolute differences computed on the four frames of Fig 3. 3 The
green line is Th1 and the red one for Th2.
Fig3.6: The maximum noise Vs Th2
The parameter k depends on the used camera. This parameter is the same for cameras
having close signal to noise ratio. Consequently, fixing the parameter k can be performed one,
which means that the proposed approach is easy to reproduce. Tests show that the parameter k
holds value of 1.618. The thresholding operation is summarized as follow. Let us consider the
reference ROI (𝑟𝑒𝑓). We select for each current frame the ROI (𝑓𝑟i). The average of the
absolute difference D is computed as follows.
∑ |𝑟𝑒𝑓( ) 𝑓𝑟( )| (4)
22
Chapter III: Proposed Intelligent Transportation System
N stands for the length of the ROI. The vehicle is detected while D is greater than the
threshold 𝑇ℎ1 and it is counted if D is decreased less than 𝑇ℎ2. Figure 3.7 summarizes the
flow chart of the second stage.
The question now is how to select the best position of ROI's?
In fact, the ROI were selected to assure best results in terms of vehicle detection.
Many tests have been carried out to choose the best position of ROI. Results have shown that
the best position of the ROI has to satisfy three conditions. The first one is that the selected
ROI has to be fixed at the middle of the road. Second, it has to be inside the lane. Third, their
lengths have to be not too short or too long. If one condition is not satisfied, a problem of
vehicle detection may occur. Figure3.8 depicts an example of a frame that contains ROI that
satisfy the three conditions for a best vehicles detection. Fixing the ROI far from camera have
shown problem of multiple car occlusion, or missing vehicle (no detection). Figure3.9
illustrates an example of a frame that contains ROI far from the camera. It shows that if we
select the ROI far from the camera, and the problem of occlusion may occur because vehicles
are too close in that position.
Start
Read the
reference
frame
Read
frame i
Preprocessing
Compute D
i++
The camera
is activated
D >= Th1
&&
D < Th2
Yes
No
count++End
Preprocessing
Yes
No
Fig3.7: Flow chart summarizing the detection and counting part.
23
Chapter III: Proposed Intelligent Transportation System
Fig3.8: Example frame for best ROI's selection.
Fig3.9: Example frame for selecting ROI's far from camera.
B. Vehicles detection and classification
We recall that we keep the study on the ROI, which is a line crosses the road. Our
proposed approach for classification relies on counting the number of frames consumed by a
vehicle passing through the ROI. Only two categories are considered small and big. This is
due the fact that the considered ROI is not sufficient to discriminate between other classes.
The proposed idea is summarized as follows. When a vehicle starts passing the ROI, the
Counter of Consumed Frames (CCF) starts counting until the vehicle finish passing the ROI.
The counter is saved and compared to an experimental threshold in order to classify the
vehicle. Many experiments have been achieved to fix that threshold. We found that the
threshold 𝑇ℎ (eq5) depends also to the frame rate of the camera (FPS).
𝑇ℎ (5)
More formally, the vehicle is classified as follow. While CCF is less than 𝑇ℎ , the
vehicle is classified as small. Otherwise, it is classified as big vehicle. Figure 3.10
summarizes vehicles classification stage.
24
Chapter III: Proposed Intelligent Transportation System
Start
Read the
reference
frame
Preprocessing
Read
frame i
Preprocessing
Compute DD >= Th2
i++
The camera
is activated
CCF++
The vehicle
detected and
counted
CCF < Th3
Big vehicle
Small vehicle
Yes
No
No
Yes
No
YesEnd
Yes
No
Fig3.10: Flow chart summarizing the vehicle detection and classification part.
C. Vehicle detection and speed estimation
The proposed approach for vehicles speed estimation relies on the detection and
counting part. The idea is simple and effective. It relies on counting the number of
consumed frames by a vehicle (CCFspd) while passing between two ROI selected on
same lane. Let's explain in more details. We select two ROI in each lane. The two ROI
of same lane are separated with small known distance (d). This distance should be
known previously by the user or should be deduced by using the standard length of
white lane. Figure3.11 corresponds to the international standard length of white lines.
25
Chapter III: Proposed Intelligent Transportation System
Fig 3.11: The standard length of whit line.
Fig3.12: Example frame of selecting two ROI for each lane for speed estimation.
Figure3.12 shows an example of selecting two ROI on each lane for speed
estimation. We could know the separated distance between two-selected ROI's by
using the given information from figure3.11. Accordingly, white lines on figurer 3.12
corresponds to "T3" in figure 3.11. Thus, the distance between two consecutive white
lines is fixed to 1.33m. Hence, if we place our two ROI there, the distance is easily
deduced.
The speed is defined as a distance over time. Having the distance, the aim now
is to deduce the time that a vehicle spends to cross that distance. To achieve that, the
idea is summarized as follows. After the vehicle is detected from ROI1 (black line in
figure 3.12), the counter of consumed frames between two regions ( ) start
counting until the vehicle is detected in the ROI2 (the green line in figure 3.12).
Having the number of frames (CCFspd), and the number of frames per second, which
is an intrinsic characteristic of a camera (fps), the time T is easily deduced as follow.
𝑇
𝑓𝑟
( )
26
Chapter III: Proposed Intelligent Transportation System
Hence the estimated speed ( ) is:
( )
(7)
Where:
is the estimated speed of the vehicle (Km/h).
is the distance between the two selected ROI's by the user (m).
𝑇 is time consumed by a vehicle to pass between the two ROI.
is a constant that represents the ratio of one hour converted in the second over one
kilometer converted in the meter (3600/1000).
Note that the small distance is chosen to compute the instantaneous speed.
Furthermore, that may avoid some problems when vehicles are far from each other. In
fact, in this case, while the first vehicle is not yet passing through the second ROI the
other vehicle may pass through the first one. Thus the frame counting will be
confused. Figure3.13 illustrates an example of such problem. The flow chart of the
task of vehicle speed estimation is shown in figure 3.14.
a) No vehicles passing the ROI's. b) Problem of vehicles closed to each other.
Fig3.13: Illustration of the problem of far lines.
27
Chapter III: Proposed Intelligent Transportation System
Start
Preprocessing
Read
framei
Preprocessing
Thecamera
isactivated
Count1++
Count2++
Count1
Count2
Calculate the
speed
End
Enter the
distance
between
ROI
(distance)
Readthe
reference
frame
Vehicle
detectedin
ROI1
Vehicle
detectedin
ROI2
No
Yes
CCFspd++
i++
Yes
No
No
Yes
Yes
No
Fig3.14: Flow chart summarizing the vehicle speed estimation part.
3.3. Conclusion
In this chapter, a complete ITS is proposed. It includes vehicles detection,
counting, classification, and speed estimation. Proposed approaches are presented in
details. The next chapter will be dedicated to experiments and tests part in order to
validate of our system.
28
Chapter IV: Experiments, Results and Discussion
Chapter IV: Experiments, Results and Discussion
4.1. Introduction
We are going in this chapter to evaluate the performance of the proposed ITS by
achieving tests on four real videos having different intrinsic proprieties and acquired in
real situations. This chapter is organized as follow. In section4.2, we present the test
videos. Results and discussions will be exhibited in section4.3. In section4.4, we analyze
our proposed approach by discussing its strengths and weaknesses. Finally, we conclude
the chapter.
4.2. Experiments
In order to evaluate the performance of our proposed ITS, we perform tests on four
different videos. Figures 4.1 show one example frame of each video. Those videos have
different settings summarized on table 4.1.
Considered videos are acquired in real situations. Thus, they contain some real
problems as illumination variation, shadow, noise, blur, occlusion, and vibration of
camera due to the wind. Figures 4.2 and 4.3, 4.4 (a) and (b), 4.5 (a) and (b) depict an
example of illumination changing, shadow, blur, occlusion, and vibration of camera due to
the wind respectively.
We recall that, the user indicates the ROI, which is linear and crosses the road. As we
have said previously, the ROI must be in the middle, inside of the lane, and its length must
not be not too short or too long. Figures 4.6 (a), (b), (c), and (d) show an example frame
for each considered video that contains selected ROI that fulfill all the requirements.
Table4.1: Different settings of the four test video.
The video settings Video1 Video2 Video3 Video4
Frame rate 14.999 25 30 30
Number of frames 500 750 878 1071
Duration 33.34 30 29.70 36.13
Height 240 240 720 720
Width 320 320 1280 1280
29
Chapter IV: Experiments, Results and Discussion
a). The first test video b). The second test video
c). The third test video. d). The fourth test video.
Fig4.1: Example of one frame from each test videos.
Fig 4.2: Example of illumination variation in test videos.
Fig 4.3: Example of shadow and blur in test videos.
30
Chapter IV: Experiments, Results and Discussion
a) Without selected ROI. b) With selected ROI.
Fig4.4: Example of occlusion in test videos.
a). Without the effect of wind b). With the effect of wind
Fig4.5: Example of effect of wind in test videos.
a). The first video b). The second video.
c). The third video d). The fourth video.
Fig4.6: Examples of frames with selected ROI's from the test videos.
31
Chapter IV: Experiments, Results and Discussion
The first video has problem of bad illumination, and noise. The second video has
problems of illumination changing, and occlusion. For the third and fourth videos,
they have problems of strongest shadow, blur, and vibration of camera due to wind.
We consider all these problems (noise, shadow, occlusion…) to attest our proposed
approach.
4.3. Results and discussion
In this section, we apply the proposed algorithms on four test videos. Obtained
results will be presented and discussed. For vehicle counting and classification, having
the ground truth, the evaluation is achieved in terms of percentage of accuracy.
However, for speed estimation, the ground truth is not available so the evaluation is
performed subjectively.
4.3.1. Vehicle detection and counting
We apply the proposed vehicle detection and counting technique on the four
considered videos. Figure4.7 (a), (b), (c), and (d) show an example of vehicle
detection and counting for videos 1, 2, 3, and 4, respectively.
Quantitative evaluation is tabulated on table4.2. It contains information about
ground truth (GT) and obtained results (OR) for each ROI of each video. In addition,
the counting accuracy of each video and the algorithm runtime to process each frame.
From the obtained results, we can attest that the proposed algorithm provides
encouraging results in terms of accuracy rate. In fact, for the first and second video,
the accuracy ratio is 100%.
We recall that these two videos contain some real problems as shadow, bad
illumination, noise, occlusion, illumination changing. Thus, we conclude that our
algorithm is robust against all these problems. For videos 3, and4, the algorithm is less
efficient. The accuracy ratio is 95.56% and 93.65%, respectively. This is due to the
vibration of the camera due to the wind. The global accuracy rate is 97.30%, which is
very acceptable. For executing time, the differences between obtained values are due
to the images size. Overall, we can attest that the algorithm is very speed even if it not
optimized yet.
From all the obtained results, we conclude that the proposed algorithm for
vehicle detection and counting provides very interesting results.
32
Chapter IV: Experiments, Results and Discussion
a) Video1. b)Video
c)Video3 d) Video4
Fig 4.7: Example of final vehicle detection and counting system.
Table4.2: Results of applying the detection and counting algorithm on test videos.
ROI Video1 Video2 Video3 Video4
GT OR GT OR GT OR GT OR
ROI1 13 13 13 13 5 6 4 4
ROI2 6 6 9 9 9 9 17 14
ROI3 12 12 8 8 15 14 20 15
ROI4 13 13 13 13 16 16 22 26
Total 44 44 43 43 45 43 63 59
Accuracy 100% 100% 95.56% 93.65%
Runtime of
one frame (s)
0.0702 0.0467 0.1747 0.1713
33
Chapter IV: Experiments, Results and Discussion
4.3.2. Vehicle detection and classification
We apply the proposed vehicle classification algorithm on the four considered video.
We recall that vehicles are classified into two classes small (S) and big (B). Figure4.8 shows
an example of vehicle detection and classification for video1, 2, 3, and 4 respectively.
Quantitative evaluation in terms of ground truth (S and B) and obtained results (RS and RB)
for each ROI of each video in addition to accuracy rate and execution time are summarized in
table4.3.
From the obtained results we can attest that the proposed algorithm provides
encouraging results in terms of accuracy rate.
In fact, for the first video, the accuracy ratio is 100%. We recall that this video
contains some real problems as shadow, bad illumination, and noise. Thus, we conclude that
our algorithm for vehicle classification is robust against all these problems.
For video2, we recall that is video contains some real problems as shadow,
illumination changing, occlusion, and noise. The accuracy ratio is 88.37%. Thus, our
algorithm is less efficient, this due to the following problems. For the ROI1, the big vehicle is
classified as small vehicle because some intensities turns around the noise intensities, this is
why some of consumed frames are not detected. In addition, the camera is not placed well,
this shows the big vehicle passes through a portion of the ROI. For the ROI2, the approach
shows that it is robust against to the occlusion. For the ROI3 and ROI4, the big vehicle is
detected as small vehicle because of the high speed of big vehicle. From these results, we can
attest that our approach is real-time. It is robust against to the illumination changing,
occlusion, noise, and shadow.
a)Video1 b)Video2
c)Video3 d)Video4
Fig 4.8: Example of final vehicle detection and classification system.
34
Chapter IV: Experiments, Results and Discussion
Table4.3: Results of applying the detection and classification for tested videos.
ROI Video1 Video2 Video3 Video4
S B RS RB S B RS RB S B RS RB S B RS RB
ROI1 13 0 13 0 12 1 13 0 5 0 5 1 4 0 4 0
ROI2 5 1 5 1 9 0 9 0 7 2 7 2 15 2 10 4
ROI3 12 0 12 0 7 1 8 0 15 0 14 0 19 1 12 3
ROI4 13 0 13 0 10 3 12 1 12 4 7 9 22 0 23 3
Accuracy
rate
100% 90.91% 88.88% 88.88%
Runtime
of one
frame (s)
0.0710 0.0463 0.1712 0.1737
For video3, we recall that is video contains some real problems as blur effect, noise,
vibration of camera due to the wind, and strong shadow. The accuracy ratio is 88.88%. The
algorithm is less efficient, due to the following problems. For the ROI1, the task of detection
and classification does not work well due to strong shadow, and the camera is not fixed well.
Furthermore, the day was windy. For the ROI2 and ROI3, the not detected vehicle passed in
small part of ROI. Overall, the task of classification works well. From this result, we can say
that our approach is real time. It is robust against bad illumination, blur, and noise.
For video4, we recall that this video contains some real problems as blur effect, noise,
the vibration of camera due to the wind, and strongest shadow. The accuracy ratio is 88.88%.
The algorithm is less efficient. The approach shows good results for vehicle detection and
classification. For the ROI2, ROI3, and ROI4. The approach does not show good results in
detection, and classification. These are due to problem of the vehicle passing through a small
portion of ROI, and to the wind, that affects the position of ROI. The varying of the ROI may
cause; problem in vehicle detection (missing or recount), and problem in detection of
consumed frames which occurs problem in vehicle classification. From these results, we attest
our approach is real-time. It is robust against to blur effect, noise. It has problem when the
vehicle passing through a portion of ROI, and the vibration of camera due to the wind.
The global accuracy rate is above 92%, which is acceptable. For executing time, the
differences between obtained values are due to the images size. Overall, we can attest that the
algorithm is very speed even if it not optimized yet.
From all the obtained results, we conclude that the proposed algorithm for vehicle
detection and classification provides interesting results.
35
Chapter IV: Experiments, Results and Discussion
4.3.3. Vehicle detection and speed estimation
We apply the proposed algorithm of vehicle speed estimation only on three
videos. Because the lanes on the first video are erased, so it is not possible to test it.
Figure4.9 (a), (b), and (c) depicts an example of selected ROI to estimate the speed of
vehicles for video2, 3, and 4 respectively. We notice that the selected ROI are between
two consecutive white lines so the distance estimation is easy to deduce from the
standard as explained on chapter 3. Figure 4.10 depicts the final system of vehicle
detection and speed estimation for video2, 3, and 4 respectively.
Quantitative evaluation is tabulated on tables 4.4, 4.5, and 4.6 respectively. It
contains information about ground truth (GT) and obtained results (OR) for each ROI
of videos 2, 3, and 4 respectively.
a)Video2 b)Video3
c)Video4.
Fig 4.9: Example of selected lines for vehicle detection and speed estimation.
36
Chapter IV: Experiments, Results and Discussion
a)Video2. b)Video3.
c)Video4.
Fig 4.10: Example of final vehicle speed estimation.
Table4.4: Results of applying the speed (km/h) estimation approach on second video.
The vehicle ROI1 ROI2 ROI3 ROI4
1 59.85 39.9 59.85 119.7
2 59.85 59.85 59.85 59.85
3 59.85 59.85 59.85 39.9
4 59.85 119.7 59.85 119.7
5 119.7 39.9 39.9 39.9
6 59.85 59.85 39.9 59.85
7 59.85 59.85 59.85 119.7
8 59.85 59.85 59.85 119.7
9 59.85 29.925 - 119.7
10 39.9 - - 119.7
11 39.9 - - 119.7
12 59.85 - - 119.7
13 59.85 - - 119.7
37
Chapter IV: Experiments, Results and Discussion
Table4.5: Results of applying the speed estimation approach on third video.
The
counter
ROI1 ROI2
1 39.91 39.9075
2 39.91 39.9075
3 53.21 35.4733
4 53.21 35.4733
5 53.21 35.4733
6 53.21 63.872
7 - 63.852
8 - 53.21
9 - 53.21
Table4.6: Results of applying the speed estimation approach for fourth video.
The
counter
ROI1
1 40.21
2 40.21
3 40.21
4 106.73
Due to using the international standard length of white line, we could test only two
lanes for video3 and only one lane for video4. Subjectively, we conclude that the best
approximation of speed is obtained when the frame rate of the camera is big enough.
4.4. Summary
This section summarizes all the work done in this chapter. We consider the tests are
applied only on the best selected ROI.
Tests of vehicle detection and counting show very interesting results compared to
those of related works presented in chapter2. The overall percentage accuracy of vehicle
detection and counting is 97.3%. Tests on vehicles classification provides a global
accuracy percentage of 92.42%, which is very promising. Furthermore, speed estimation
provides interesting results.
After these tests and results, we can say that our proposed ITS has the advantages of
covering the problems of real time execution, illumination invariant, bad illumination,
blur effect, multiple car occlusion, and noise. Moreover, any camera could be used, it
does not depend on special frame rate. The drawbacks like vehicle passing through a
portion of the ROI, the strongest shadow, and problem of not well fixed camera may
affect the approach giving less performance. Table4.11 summarizes all the results, the
running time, and percentage accuracy of each video.
38
Chapter IV: Experiments, Results and Discussion
Table4.11: Summary of the evaluation of the proposed ITS.
Video The task The running-time
of one frame
(seconds)
Percentage
accuracy
Count Classif Speed Count Classif
Video1 Y Y N 0.0782 100% 100%
Video2 Y Y Y 0.0938 100% 90.91%
Video3 Y Y Y 0.1901 95.56% 88.88%
Video4 Y Y Y 0.2031 93.85% 88.88%
Total - - - - 97.3% 92.42%
Figures 4.11 (a), (b), (c), and (d) show an example of final results of our complete
system that contains all tasks; vehicle detection, counting, classification, and speed
estimation.
a)Video1 b)Video2
c)Video3. d)Video4.
Fig4.11: Example of final system for vehicle detection, counting, classification, and
speed estimation.
39
Chapter IV: Experiments, Results and Discussion
4.5. Analyzing the proposed approach
In this section, we present the strengths and weaknesses of our proposed approach.
4.5.1 Strengths of the approach
For the strengths, we can say that our proposed method is, real-time, simple,
robust against noise, illumination changing, and occlusion. It does not require any
database. It can use any camera. Let's explain more.
 Real time: Unlike some the existing methods, our proposed approach is real-time
execution, because it relies on the ROI, which is a simple line, instead of the entire
image.
 Simple: Unlike existing methods using segmentation, filtering, edge detection,
morphological operators, extract the centroid… etc. Our method is simple. It use
only thresholding techniques.
 Robust against to the illumination changing: The proposed method uses LBP,
which is robust against to illumination changing.
 Robust against to the noise: Because proposed thresholds are related to frame
rate which is in relation with noise. So, the noise cannot affect the accuracy of the
system.
 Robust against to the occlusion: The ROI of each lane are separately selected.
This may avoid the problem of multiple car occlusion.
 No database needed: The vehicle classification task is simple; it relies on number
of frames consumed by vehicle when it passes through the ROI, so we did not
have to calculate the area of vehicles or use databases like some of existing
methods.
 Complete system: Unlike existing methods; our proposed method addresses four
tasks; vehicle detection, counting, classification, and speed estimation.
 Simple camera: Proposed approach deals with any camera which has high or less
frame rate, captured high or low quality image, colored or gray level. Unlike some
existing methods that require very high frame rate, and need high quality images.
4.5.2. The weakness of the approach
For the weaknesses, tests prove that the approach has some limitations as a
problem of vehicle congestion, vehicle passing through a portion of ROI, and it
provides less performance when the camera is not well fixed or vibrates due to
wind for example.
 Vehicle congestion: In case of traffic congestion, the vehicle consumed
much frames when it passed through the ROI. This gives a problem in
classification.
40
Chapter IV: Experiments, Results and Discussion
 Vehicle passing through portion of ROI: In this case, the vehicle may
not be detected.
 Fixed camera: The approach provides less performance in case of not well
fixed camera. This may cause a problem in vehicle detection, and
classification. The system can miss the vehicle or recount it. Also it can
classify the big vehicle as small vehicle.
4.6 Conclusion
In this chapter, the proposed approach for ITS is presented. Interesting results
have been obtained for vehicle detection, counting, classification, and speed
estimation.
41
General Conclusion
General Conclusion
In this report, our aim was to develop a smart traffic surveillance system, which is
a main part of intelligent transportation systems. We started our work by giving a brief
presentation of intelligent transportation systems and the smart surveillance systems,
specifying the importance of smart traffic surveillance. Then, related works on smart
traffic surveillance including detection, counting, and speed estimation, have been
presented and discussed. We have found that common problems are related on
illumination, shadow, noise, occlusion, and the image quality. These reasons
motivated our work to propose an ITS. This last relies on selecting the region of
interest (ROI) which considered as a simple line crosses the road placed separately at
middle of each lane. Observations over the ROI are used to detect, count, classify, and
estimate the instantaneous speed of vehicles. This system has been tested on real
videos with various real constraints. Obtained results have been discussed in the la last
chapter. Accordingly, we found that the approach provided encouraging results. The
obtained accuracy ratio for vehicle detection, counting is over 97.3%, and 92.42% for
vehicles classification. The proposed approach has the advantage of covering the
problems of real-time, illumination variation, bad illumination, multiple car
occlusions, blur effect, and noise. However, the proposed approach provides less
performance when the camera is not well fixed or vibrates due to wind for example.
This fact, affects the ROI and they change their position. That may cause some
problems especially for vehicles detection. As perspectives and to continue this work,
we suggest to:
 Test the proposed system on long videos that contains more challenging
problems.
 Consider more classes in the classification step (small, medium, and big
vehicles).
 Acquire videos with ground truth to test deeply the speed estimation part.
 Plan to build android application.
i
Appendices
Appendix A
"The Local Binary Pattern "LBP [38]
Image visual descriptors describe the visual features of the content in image
(videos). They describe elementary characteristics such as the color, the shape, the
texture, or the motion.
Local Binary Pattern (LBP) is a type of image descriptors used for texture
analysis robust against illumination changing. The basic LBP is computed following
these steps:
 Divide the examined window into cells.
 Each pixel in a cell is compared to its neighbors. Follow the pixels along a circle
of a radius r.
 Select the center pixel as the threshold.
 If the threshold value is greater than the neighbor's value, it is replaced by "0"
otherwise, by "1". This gives digit binary number. It is called the pattern.
 Construct the weight matrix.
 Calculate the LBP coefficient by the sum of all weight that have value 1 in the
code pattern.
 Finally the histogram of all LBP values is used to characterize the texture of the
image.
Let’s explain more formally with the following example:
Consider we have the following cell of size 3*3:
The threshold is the center pixel (60). Any intensity less than 60 in a circle or
radius 1 takes value 0. Otherwise, it takes value 1. After the thresholding the cell is
being:
The pattern code =11110001 and the weight matrix is:
The LBP is calculated from the pattern code by summation of all weights
having value 1 as follow:
LBP=1+16+32+64+128=241.
ii
Appendices
Appendix B:
Image processing techniques:
Herein, we will present a brief explanation for each image processing technique used
in the presented state of the art related on smart traffic surveillance.
1. Image segmentation [40][41][42]:
In image processing and computer vision, image segmentation is the process of
partitioning a digital image into multiple segments. When we segment an image, we generally
separate the foreground (object) from background.
The purpose of image segmentation is to simplify and/or change the representation of an
image into something that is more meaningful and easier to analyze.
Image segmentation is applied in several applications: medical imaging, machine vision,
video surveillance, object detection, and tracking ...etc. There are many methods of image
segmentation: edge detection, thresholding, region growing, clustering, morphological
watersheds...etc.
i. Thresholding: is very used method in segmentation. The disadvantages of this
method are:
 The segmentation region might be smaller or larger than the needed
information
 The edges of segmented region might not be connected.
We will described later in more detail.
ii. Edge detection: is a set of mathematical methods, which aim to identify points in a
digital image at which the image brightness change sharply. This method has
problem with images that loss their edges, with noise, and boundary that are very
smooth. The disadvantages of this method are:
 The segmentation region might be smaller or larger than the actual.
 The edges of segmented region might not be connected.
We will describe later briefly the concept of edge detection.
iii. Morphological watersheds: Watershed algorithm is a mathematical
morphological method for image segmentation, based on region processing. The
principal objective of segmentation algorithms based on these concepts is to find
the watershed lines.
We will describe later briefly the concept of morphological image processing.
iv. Region growing: This approach of segmentation examines neighboring pixels of
initial ―seed points‖ and determines whether the pixel neighbors should be added
to the region or not. The process is iterated on, in the same manner as general data
clustering algorithms.
The disadvantages of this method are:
 The computation is consuming, no matter the time or power.
 Noise or variation of intensity may result in holes or over segmentation.
iii
Appendices
 It may not distinguish the shading of the real images.
All techniques of extraction the foreground and registration foreground are parts of
image segmentation.
2. Thresholding [43][44]
Thresholding is used to extract areas that correspond to significant structures in an
image and to focus analysis on these areas. The following equation shows the thresholding
method:
g(x,y)={
𝑓( ) 𝑓 𝑓( ) 𝑇
𝑓( ) 𝑓 𝑓( ) 𝑇
}……..(eq1)
Where f(x,y) is the image before the thresholding, g(x,y) is the image after the
thresholding , T is the threshold, and M and N are fixed values depend to the application
require. The threshold T may be fixed manually or automatically.
There are three types of thresholding algorithm:
 Global thresholding:
The threshold T depends only on the gray level image f(x, y) and the value of
threshold T solely relates to the character of pixels. Otsu's method and iterative
method are classified as global thresholding algorithm [42]
 Locally thresholding:
The threshold T depends only on the intensity of pixel p(x, y) and the intensities of
neighborhood pixels. Mean, median and med-grey methods are classified on locally
thresholding algorithm.
 Adaptive Thresholding:
The threshold T depends on the gray level image f (x, y) and the intensity of pixel
p (x, y), and the intensities of neighborhood pixels. Niblack and Savoula methods are
classified as adaptive thresholding algorithm [42].
Thresholding methods can be categorized into five groups according to the information
that the algorithm manipulates.
i. Histogram shape based method:
Histogram based thresholding is applied to obtain all possible uniform regions
in the image. It can be bimodal or unimodal or any shape.
Figure5.1: Histogram shape
iv
Appendices
In case of bimodal, the threshold could be selected in valley between two
peaks. But if the histogram is unimodal, it is difficult to select the threshold.
ii. Clustering based methods: the grey level samples are clustered into two parts as
background and foreground or alternately are modeled as a mixture of two
Gaussians.
iii. Entropy based methods: result in algorithms that use the entropy of the
foreground and background regions, the cross-entropy between the original and
binarized image, etc.
iv. Object attribute based methods: search a measure of similarly between the grey-
level and the binarized images, such as fuzzy shape similarity, edge coincidence,
etc.
v. Spatial methods: us higher-order probability distribution and/or correlation
between pixels.
3. Mathematical morphology [45]
It is also called morphological filtering, provides an effective tool for image
processing and computer vision. This methodology is widely used to decompose image, to
detect edge, to suppress noise, and also in shape representation. Morphological image
processing is nonlinear transformation that locally modifies the geometric features of images.
The common morphological operations are:
 Shrinking the foreground (erosion).
 Expanding the foreground (dilation).
 Removing holes in the foreground (closing).
 Removing stay foreground pixels in background (opening).
Let's A be an input image and B the structuring element. The structuring element B is
a binary image/mask that allows us to define arbitrary neighborhood structures.
Note that the binary image has only two values '0' or '1' so 'a' and 'b' have values '0' and '1'.
Grey level image has values from '0' to '2n
-1', so u,v,i,j belong to [0, 2n
-1]
1. Erosion/Dilation:
 Dilation: The dilation of A by B is denoted by A B.
For binary image: A B =U a ϵ A{b + a | b ϵ B}.
For grey level image: A B=max(I,j) ϵ H{A(u+i,v+j)+B(i,j)}
 Erosion: is the morphological dual of dilation. It is transformation that
combines two sets by using containment as its basis set. The erosion of A by B
is denoted by AϴB.
For binary image: AϴB={a| a + b ϵ A for every b ϵ B }.
For grey level image:AϴB=min(i,j) ϵ H{A(u+i,v+j)+B(i,j)}
Dilation has properties of commutative and associative. However erosion is
neither commutative nor associative.
Erosion can be computed as a dilation of the background:
AϴB= (A B)c
Same duality for dilation: A B =( AϴB)c
.
v
Appendices
2. Opening/Closing:
 Opening: The opening image of A by structuring element B is denoted by A◦B. Thus,
the opening of A by B is the erosion of A by B, followed by a dilation of the result by
B.
For binary image: A◦B = (AϴB) B.
For grey level image: A◦B = (AϴB) B.
 Closing: The closing image of A by structuring element B is denoted by A●B. Thus,
the closing of A by B is simply the dilation of A by B followed by the erosion of the
result by B.
For binary image: A●B =(A B) ϴ B.
For grey level image: A●B =(A B) ϴ B.
The opening and closing are duals of each other with respect to set
complementation and reflection. That is: (A ● B)c
=( Ac
◦ Ḃ)
3. The filtering [46]
In signal and image processing, a filter is a process that removes from a signal
some unwanted features. The defining features of filters being the complete or partial
suppression of some aspect of the signal. Most often, this means removing some
frequencies and not others in order to suppress interfering signals and reduce
background noise.
In signal and image processing, there are four types of filters:
 Low pass filter: is a filter that passes signals with a frequency lower than a
certain cutoff frequency (cutoff distance) and attenuates signals with
frequencies higher than the cutoff frequency.
 High pass filter: is a filter that passes signals with a frequency higher than a
certain cutoff frequency (cutoff distance) and attenuates signals with
frequencies lower than the cutoff frequency.
 Band reject filter: is a filter that passes most frequencies unaltered, but
attenuates those in a specific range to very low levels.
 Band pass filter: is filter that passes frequencies within a certain range and
rejects frequencies outside that range.
In image processing, the filtering categorizes into two domain:
 Spatial domain: the process in spatial domain is based on direct manipulation
of pixels of an image using a mask, which is a small 2D array in which the
value of the mask coefficient determines the nature of process.
 Frequency domain: the process in frequency domain is based on modifying the
Fourier transform of an image.
The disadvantages of applying filtering algorithm on video surveillance are:
 There is no general method for image filtering. Because doing any filtering
you must know the type of noise that you have.
 Doing filtering consumes much more time on video processing.
vi
Appendices
Kalman filter [47]: is an algorithm that uses a series of measurements
observed over time, containing statistical noise and other inaccuracies, and
produces an estimation of unknown variables that tend to be more precise than
those based on a single measurement alone.
4. Edge detection [48]
We have seen definition and disadvantages of using edge detection. In this
part, we give a brief explanation about how to detect edges.
The process of edge detection consists of three main steps:
 Noise reducing: due to the first and second derivative's great sensitivity to
noise, the use of image smoothing techniques before applying the edge
detection operator is strongly recommended.
 Detection of edge points: here local operators that respond strongly to
edges and weakly elsewhere are applied to the image, resulting in an output
image whose bright pixels are candidates to become edge points.
 Edge localization: here the edge detection results are post processed,
spurious pixels are removed, and broken edges are turned into meaningful
lines and boundaries.
Edges are detected by using mathematical operators. The simple edge detector
is using the gradient operator. We compute gradient vector at each pixel by
convolving image with horizontal and vertical derivative filters. Then we compute
gradient magnitude at each pixel and if the magnitude at a pixel exceeds a threshold
report a possible edge point and finally the direction of the edge at each pixel is
perpendicular to the gradient vector at each pixel. Other common operators are:
 Robert operator: in order to perform edge detection with the Roberts
operator we first convolve the original image, with the following two
kernels:
and
 Prewitt operator: is equivalent of using mean filter then the first
derivative. In order to perform edge detection with the Prewitt operator we
first convolve the original image, with the following two kernels:
and
 Sobel operator: is equivalent of using Gaussian filter then the first
derivative. In order to perform edge detection with the Sobel operator we
first convolve the original image, with the following two kernels:
and
We note that the Robert, Prewitt, and Sobel operators detect the horizontal and
vertical edges.
vii
Appendices
 Kirsch operator [49]: the Kirsch operator or Kirsch compass kernel is a
non-linear edge detector that finds the maximum edge strength, which is
the maximum value, found by the convolution of each mask with the
image. The Kirsch mask are defined as follow:
N=
As we have said before the edge magnitude is the maximum value found
by the convolution of each mask with image. Moreover, the edge direction is
defined by the mask that produces the maximum magnitude.
 Canny edge detector [50]: is an edge detection operator that uses a multi-
stage algorithm to detect a wide range of edges in images. The Process of
Canny edge detection algorithm can be broken down to 5 different steps:
o Smooth the image with Gaussian filter.
o Compute the gradient magnitude and orientation.
o Non-maximum suppression: can help to suppress all the gradient values
to 0 except the local maximal, which indicates location with the
sharpest change of intensity value. The algorithm for each pixel in the
gradient image is:
 Compare the edge strength of the current pixel with the edge
strength of the pixel in the positive and negative gradient
directions.
 If the edge strength of the current pixel is the largest compared
to the other pixels in the mask with the same direction, the
value will be preserved. Otherwise, the value will be
suppressed.
o Apply double threshold TH and TL(usually TH=2*TL) to determine
potential edges.
o Track edge by hysteresis: Finalize the detection of edges by
suppressing all the other edges that are weak and not connected to
strong edges.
 If the gradient at a pixel is above TH, declare it an edge pixel.
 If the gradient at pixel is TL, declare it an non edge pixel.
 If the gradient at a pixel is between TL and TH then declare it an
edge pixel if and only if it is connected to an edge pixel directly.
viii
List of Communications
List of Communications
F.Kerouh, D.Ziou, and A.Bouaicha: "Real-time vehicles detection and counting for intelligent
transportation systems". Accepted for oral presentation in Colloquium on Optimization and
Information Systems "COSI", (May2016).
ix
References
References
[1] S.Bhatkar, M.Shivalkar, B.Tandale, and P.S.Ooshi.:"Survey of various methods used for
speed calculation of a vehicle", International journal on Recent and Innovation Trends in
Computing and communication, Vol 3, issue3, pp 1558—1561, (March2013).
[2] F.Kerouh and A.Serir.:"An adaptive deblurring method based on Multiplicative
Multiresolution Decomposition". European workshop on vision and image processing.
pp88—93,(june 2013).
[3] A. D. Joseph, A. R. Beresford, J. Bacon, D. N. Cottingham, J. J. Davies, B. D. Jones,
Haitao Guo, Wei Guan, Yong Lin, Houbing Song , L. Iftode, S. Fuchs, B. Lamprecht, K.
Kyamakya, J. G. Fernandez, J. C. Yelmo Garcia, Y. S. Martin Garcia, J. de Gracia Santos, M.
Nimesh, Gang Pan, Zhaohui Wu, Qing Wu, Zhenyu Shan, Jie Sun, Jian Lu, Guoqing Yang,
M. K. Khan, Jiashu Zhang.: "Intelligent transportation systems". IEEE Pervasive Computing
Vol 5 N°4, pp63—67, (Decenmber 2006)
[4] H.Emami, M.Fathy, and K.Raahemifar.: " Real time vehicle make and model recognition
based on hierarchical classification". International Journal of Machine learning and
computing Vol 4 N°4, 142--145 (April 2014).
[5] I.Masaki.: ''Machine-vision systems for intelligent transportation system", IEEE intelligent
systems, Massachusetts Institute technology, pp 24—31, 1998.
[6] S.Ezell.: "Intelligent transportation systems". The information technology and innovation
foundation, (January 2010).
[7] M.Kumar and S.Albert.: "A Summary of Rural Intelligent Transportation Systems (ITS):
Benefits as applied to ODOT Region 1". Oregon Department of Transportation Region 1.
(April 2005).
[8] L.Figueiredo, I.Jesus, J.A.T.Machoda, J.R.Frerreira, and J.L.M.de Carvalho. :"Toward the
development of intelligent transportation systems". 2001 IEEE Intelligent Transportation
Systems Proceedings, pp1206—12011,(August 2001).
[9] http://www.roadtraffic-technology.com /contractors/traffic_man/transdyn/ transdyn2.html,
(june 3rd
2016)
[10] J.Noonan and O.Shearer.: "Intelligent transportation systems field operation cross-cutting
study Advanced Traveler Information systems ", Report No° FHWA-JPO-99-038, U.S.
Department of Transportation, (September 1998).
x
References
[11] P.Bahatia.: "ITS/Commercial Vehicle Operations". University of California
transportation center, (2003).
[12] http://www.always-on.eu/solutions.php?pid=4, (june 3rd
2016)
[13] R.F. Casey, L.N. Labell, L.Moniz, J.W. Royal, M.Sheehan, T.Sheehan, A. Brown1,
M.Foy, M.Zirker, C.L.Schweiger, B.Marks, B.Kaplan, and D.Parker.: "Advanced Public
Transportation Systems", U.S.A Department of Transportation TT050/U0197, (December
2000).
[14] A.H. Argyropoulos, M.Baker, S.A.Barsony, G.S.Bridgws, L.W.Darnes, P. Davies,
N.Emmott, P.Fancher, R.E.Fenton, T.Griest, T.Howell, R.Knipling, T.P.Kozlowski,
M.E.Krueger, R.C.Lavigne, W.A.leasure, M.Lill, B.Mc Call, L.Minor, M.Readunger,
C.Robirds, D.Savitt, D.Schmidtt, S.E.Shladover and J.Vostrez.:"Advanced Vehicle Control
Systems (AVCS)". U.S.A Department of Transportation, (March 1990).
[15] "Advanced Rural Transportation Systems (ARTS), Strategic Plan". U.S.A Department of
Transportation, (August1997).
[16] H.Kruegle.: "CCTV surveillance", Elsevier, second edition, (2007).
[17] https://www.itech-ny.com/blog/bid/277054/Can-I-Use-My-Security-Camera-Images-as-
Evidence-in-Court, (June 3rd
2016)
[18] H.A. Kurdi.: "Review of Closed Circuit Television (CCTV) Techniques for Vehicles
Traffic Management". International Journal of Computer Science & Information Technology
(IJCSIT) Vol 6, No 2, pp199—206, (April 2014).
[19] E.Komagal, A.Vinodhini, A.Srinivasan, B.Ekava.: Real time Background Subtraction
techniques for detection of moving objects in video surveillance system. Computing,
Communication and Applications (ICCCA), (February 2012).
[20]http://www.123rf.com/photo_29021394_cctv-camera-or-surveillance-operating-on-
traffic-road.html. (June 3rd
2016).
[21] P.M.Daigavan and P.R.Baja.: Real time vehicle detection and counting method for
unsupervised traffic video on highways, International Journal of Computer Science and
Network Security Vol 10, N°8, 112—117, (August 2010).
[22] M.liang, X.Huang, C.H.Chen, X.Chen, and A.Tokuta.: Counting and Classification of
Highway Vehicles by Regression Analysis. IEEE Transaction on Intelligent Transportation
System. Vol 16, N°.5, 2878—2888, (October 2015).
Final version_printed
Final version_printed
Final version_printed
Final version_printed

Contenu connexe

En vedette

ValueAddedTaxActCap476
ValueAddedTaxActCap476ValueAddedTaxActCap476
ValueAddedTaxActCap476
Lydia ndiema
 
satellite image processing
satellite image processingsatellite image processing
satellite image processing
avhadlaxmikant
 
Seminar report on captcha
Seminar report on captchaSeminar report on captcha
Seminar report on captcha
kunalkiit
 

En vedette (14)

Eric Eisenberg[1]
Eric Eisenberg[1]Eric Eisenberg[1]
Eric Eisenberg[1]
 
Ecocardiographic screening of rhd
Ecocardiographic screening of rhdEcocardiographic screening of rhd
Ecocardiographic screening of rhd
 
0319_HDRB1
0319_HDRB10319_HDRB1
0319_HDRB1
 
UC-X8FN7RDK
UC-X8FN7RDKUC-X8FN7RDK
UC-X8FN7RDK
 
PRELUDE trial - Summary & Results
PRELUDE trial - Summary & ResultsPRELUDE trial - Summary & Results
PRELUDE trial - Summary & Results
 
Ractopamine in Food - HK TCF 2016
Ractopamine in Food - HK TCF 2016Ractopamine in Food - HK TCF 2016
Ractopamine in Food - HK TCF 2016
 
ValueAddedTaxActCap476
ValueAddedTaxActCap476ValueAddedTaxActCap476
ValueAddedTaxActCap476
 
Microsoft power point Face recognition
Microsoft power point   Face recognitionMicrosoft power point   Face recognition
Microsoft power point Face recognition
 
Geoscience satellite image processing
Geoscience satellite image processingGeoscience satellite image processing
Geoscience satellite image processing
 
satellite image processing
satellite image processingsatellite image processing
satellite image processing
 
Satellite image Processing Seminar Report
Satellite image Processing Seminar ReportSatellite image Processing Seminar Report
Satellite image Processing Seminar Report
 
Phase Preserving Denoising of Images
Phase Preserving Denoising of ImagesPhase Preserving Denoising of Images
Phase Preserving Denoising of Images
 
Seminar report on captcha
Seminar report on captchaSeminar report on captcha
Seminar report on captcha
 
Ecocardiografía
EcocardiografíaEcocardiografía
Ecocardiografía
 

Similaire à Final version_printed

final-year-project-latest
final-year-project-latestfinal-year-project-latest
final-year-project-latest
Lasitha Konara
 
dissertation_hrncir_2016_final
dissertation_hrncir_2016_finaldissertation_hrncir_2016_final
dissertation_hrncir_2016_final
Jan Hrnčíř
 
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Artur Filipowicz
 
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
Ayuba Kwasako Danburam
 

Similaire à Final version_printed (20)

LC_Thesis_Final (1).pdf
LC_Thesis_Final (1).pdfLC_Thesis_Final (1).pdf
LC_Thesis_Final (1).pdf
 
Bike sharing android application
Bike sharing android applicationBike sharing android application
Bike sharing android application
 
final-year-project-latest
final-year-project-latestfinal-year-project-latest
final-year-project-latest
 
Vehicle to Vehicle Communication using Bluetooth and GPS.
Vehicle to Vehicle Communication using Bluetooth and GPS.Vehicle to Vehicle Communication using Bluetooth and GPS.
Vehicle to Vehicle Communication using Bluetooth and GPS.
 
Bast digital Marketing angency in shivagghan soraon prayagraj 212502
Bast digital Marketing angency in shivagghan soraon prayagraj 212502Bast digital Marketing angency in shivagghan soraon prayagraj 212502
Bast digital Marketing angency in shivagghan soraon prayagraj 212502
 
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
Smart Traffic Management System using Internet of Things (IoT)-btech-cse-04-0...
 
dissertation_hrncir_2016_final
dissertation_hrncir_2016_finaldissertation_hrncir_2016_final
dissertation_hrncir_2016_final
 
Project report on Eye tracking interpretation system
Project report on Eye tracking interpretation systemProject report on Eye tracking interpretation system
Project report on Eye tracking interpretation system
 
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
Virtual Environments as Driving Schools for Deep Learning Vision-Based Sensor...
 
Realtimesamplingofutilization
RealtimesamplingofutilizationRealtimesamplingofutilization
Realtimesamplingofutilization
 
Real-time monitoring and delay management of a transport information system
Real-time monitoring and delay management of a transport information systemReal-time monitoring and delay management of a transport information system
Real-time monitoring and delay management of a transport information system
 
final_report
final_reportfinal_report
final_report
 
Video Surveillance System
Video Surveillance SystemVideo Surveillance System
Video Surveillance System
 
Using gsm sim authentication in vp ns
Using gsm sim authentication in vp nsUsing gsm sim authentication in vp ns
Using gsm sim authentication in vp ns
 
Dual-Band Mobile Phone Jammer
Dual-Band Mobile Phone JammerDual-Band Mobile Phone Jammer
Dual-Band Mobile Phone Jammer
 
Distributed Mobile Graphics
Distributed Mobile GraphicsDistributed Mobile Graphics
Distributed Mobile Graphics
 
MSc_Thesis
MSc_ThesisMSc_Thesis
MSc_Thesis
 
Project Report Distance measurement system
Project Report Distance measurement systemProject Report Distance measurement system
Project Report Distance measurement system
 
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
DESIGN AND CONSTRUCTION OF A PERSON COUNTER WITH VOICE ALARM
 
Alinia_MSc_S2016
Alinia_MSc_S2016Alinia_MSc_S2016
Alinia_MSc_S2016
 

Final version_printed

  • 1. Registration Number:……..../2016 People’s Democratic Republic of Algeria Ministry of Higher Education and Scientific Research M’Hamed BOUGARA University – Boumerdes Institute of Electrical and Electronic Engineering Department of Electronics Final Year Project Report Presented in Partial Fulfilment for the Requirements of the Degree of MASTER In Electrical and Electronic Engineering Option: Telecommunications Title: Presented by: - BOUAICHA Abdenour Supervisor: Dr. KEROUH Fatma Characterization of Vehicle Flow for Intelligent Transportation Systems
  • 2.
  • 3. II To my beloved mother. To my caring father. To my brother and sister. To all my family. To all my friends. To any one who ever helped me and stood by me. I dedicate this work.
  • 4. III Acknowledgments All the praises and deepest gratitude go to Allah Almighty, the Omnipotent and the Benevolent, Who has bestowed upon me the quest for knowledge and granted unflinching determination to complete this work successfully. First and foremost, all my gratitude, thanks and appreciation to my family, especially my parents, for being the reason I started here, and also for their prayers, endurance and encouragements that made me able to cross the finish line. I offer my sincerest and deepest gratitude to my supervisor, Dr. Fatma KEROUH, who supported me throughout my project with her advices, patience, directing, guidance, and a lot of encouragement. I would like to express my gratitude to Pr. Djamel Ziou from the University of Sherbrooke, Canada, for his valuable guidance. I would like also to express my gratitude to my neighbor Dr. Aissa BOUKHAR from the University of Science and Technology Houari Boumediene (USTHB), Algeria, for his advices, and encouragements. I want to thank all professors of the institute, and the members of the jury committee for their participation in the scientific evaluation of this work. I also want to thank my friends and colleagues for sharing this experience with me.
  • 5. IV Abstract This project deals with real-time estimation of vehicle flow for intelligent transportation systems. The purpose of the project is to build a complete intelligent system that counts, classifies, and estimates the speed of vehicles using image processing techniques. For the proposed system, the statistics of flow are estimated in real-time by analyzing video acquired by a fixed camera placed at the roadside. The idea is that the user indicates the region of interest, which is linear and crosses the road. Observations over this region form time series used to detect, count, classify, and estimate the speed of vehicles. Tests performed on real videos with different intrinsic characteristics prove the effectiveness of the proposed real-time algorithm in terms of vehicles detection, counting, classification, and speed estimation. They show the percentage accuracy of vehicle detection and counting over than 98%, and more than 92% for classification. The proposed approach has the advantage of covering the problems of real-time execution, illumination variation, bad illumination, multiple car occlusions, blur effect, and noise. Key words: Image processing, intelligent transportation system, real-time, region of interest, vehicle counting, vehicle classification, vehicle detection, vehicle speed estimation, video analysis.
  • 6. V Table of contents Table of contents Dedication…………………………………………………………………………………….. II Acknowledgement…………………………………………………………………………… III Abstract……………………………………………………………………………………….IV Contents………………………………………………………………………………………. V List of figures……………………………………………………………………………….. VII List of tables………………………………………………………………………………...VIII Acronyms……………………………………………………………………………………..IX General introduction…………………………………………………………………………... 1 Chapter I: A brief introduction to ITS and smart video surveillance…………………………..3 1.1 Introduction………………………………………………………………………3 1.2 Intelligent Transportation systems……………………………………………….3 1.2.1 Definition………………………………………………………………….. 3 1.2.2 The benefits of ITS………………………………………………………... 4 1.2.3 The major categories……………………………………………………….4 1.2.3.1 The advanced Traffic Management Systems………………………4 1.2.3.2 The advanced Travelers Information System……………………... 5 1.2.3.3 The commercial Vehicle Operations……………………………….5 1.2.3.4 The advanced Public Transportation Systems…………………….. 6 1.2.3.5 The advanced Vehicle Control Systems…………………………... 7 1.2.3.6 The advanced rural Transportation Systems……………………….7 1.3 Video Surveillance……………………………………………………………….7 1.3.1 History……………………………………………………………………...8 1.3.2 Applications……………………………………………………………….. 8 1.3.3 Benefits……………………………………………………………………. 9 1.3.4 Smart video surveillance…………………………………………………...9 1.4 Smart traffic surveillance………………………………………………………...9 1.5 Conclusion……………………………………………………………………... 10
  • 7. VI Table of contents Chapter II: Related works on smart traffic surveillance………………………………………11 2.1 Introduction……………………………………………………………………..11 2.2 Related work…………………………………………………………………… 11 2.3 Discussion……………………………………………………………………… 15 2.4 Conclusion……………………………………………………………………... 15 Chapter III: Proposed Intelligent Transportation System……………………………………..16 3.1 Introduction……………………………………………………………………..16 3.2 Proposed ITS……………………………………………………………………16 3.2.1 Preprocessing stage……………………………………………………….17 3.2.2 Processing stage………………………………………………………….. 17 A. Vehicle detection and counting………………………………………..20 B. Vehicle detection and classification…………………………………...23 C. Vehicle detection and speed estimation………………………………. 24 3.3 Conclusion……………………………………………………………………... 27 Chapter IV: Experiments, Results, and discussion……………………………………………28 4.1 Introduction……………………………………………………………………..28 4.2 Experiments……………………………………………………………………. 28 4.3 Results and discussions…………………………………………………………31 4.3.1 Vehicle detection and counting…………………………………………...31 4.3.2 Vehicle detection and classification………………………………………33 4.3.3 Vehicle detection and speed estimation…………………………………..35 4.4 Summary………………………………………………………………………... 37 4.5 Analyzing the proposed ITS……………………………………………………. 39 4.5.1 The strengths of the approach…………………………………………….. 39 4.5.2 The weaknesses of the approach…………………………………………..39 4.6 Conclusion……………………………………………………………………… 40 General conclusion……………………………………………………………………………41 Appendices……………………………………………………………………………………...i List of communications……………………………………………………………………... viii References……………………………………………………………………………………. ix
  • 8. VII List of figures and tables List of figures Fig1: Data flow diagram of the system…………………………………………………...…...2 Fig1.1: ITS conceptual model………………………………………………………………... 3 Fig1.2: Traffic management center of Hampton city (USA)…………………………………..5 Fig1.3: Principle of geolocation based on GPS,GSM/GPRS………………………………….6 Fig 1.4: Bus view map area…………………………………………………………………… 6 Fig1.5: Surveillance camera…………………………………………………………………... 7 Fig1.6: The main part of CCTV system………………………………………………………. 7 Fig1.7: CCTV camera operating on traffic road……………………………………………...10 Fig3.1: Schematic flow of the proposed approach…………………………………………... 17 Fig3.2: Example of LBP descriptor applied on gray level image with different illumination.18 Fig3.3: Example of selected ROI on a frame……………………………………………….. 19 Fig3.4: Flow chart of the preprocessing stage………………………………………………..19 Fig3. 5: Time series of the absolute differences computed on the four frames of Fig 3. 3 The green line is Th1 and the red one for Th2……………………………………………………………21 Fig3.6: The maximum noise Vs Th2 ………………………………………………………... 21 Fig3.7: Flow chart summarizes the detection and counting part……………………………..22 Fig3.8: Example frame for best ROI's selection……………………………………………...23 Fig3.9: Example frame for selectin ROI's far from camera…………………………………. 23 Fig3.10: Flow chart summarizes the vehicle detection and classification part……………… 24 Fig 3.11: The standard length of whit line……………………………………………………25 Fig3.12: Example frame of selecting two ROI for each lane for speed estimation…………..25 Fig3.13: Illustration of the problem of far lines……………………………………………... 26 Fig3.14: Flow chart summarizes the vehicle speed estimation part………………………….27 Fig4.1: Example of one frame from each test videos………………………………………...29 Fig 4.2: Example of illumination variation in test videos…………………………………… 29 Fig 4.3: Example of shadow and blur in test videos………………………………………….29 Fig4.4: Example of occlusion in test videos………………………………………………….30 Fig4.5: Example of effect of wind in test videos……………………………………………..30 Fig4.6: Examples of frames with selected ROI's from the test videos……………………….30 Fig 4.7: Example of final vehicle detection and counting system……………………………32 Fig 4.8: Example of final vehicle detection and classification system……………………….33 Fig 4.9: Example of selected lines for vehicle detection and speed estimation……………... 35 Fig 4.10: Example of final vehicle speed estimation…………………………………………36 Fig4.11: Example of final system for vehicle detection, counting, classification, and speed estimation……………………………………………………………………………………..38
  • 9. VIII List of figures and tables List of tables Table2.1: Summary settings of presented related works……………………………………..14 Table4.1: Different settings of the four test video…………………………………………... 28 Table4.2: Results of applying the detection and counting algorithm on test videos…………32 Table4.3: Results of applying the detection and classification for tested videos…………….34 Table4.4: Results of applying the speed (km/h) estimation approach on second video…….. 36 Table4.5: Results of applying the speed estimation approach on third video………………..37 Table4.6: Results of applying the speed estimation approach for fourth video……………...37 Table4.7: Summary of the evaluation of the proposed ITS………………………………… 38
  • 10. IX Acronyms Acronyms APTS Advanced Public Transportation Systems. ARTS Advanced Rural Transportation Systems. ATIS Advanced Travelers Information Systems. ATMS Advanced Traffic Management Systems. AVCS Advanced Vehicle Control Systems. CCF Counter of Consumed Frames. CCTV Closed Circuit TeleVision. CRASC Centre de Recherche en Anthropologie Sociale et Culturelle. CVO Commercial Vehicle Operation. Fig Figure. FPS Frames per Second. GPRS General Park Radio Service. GPS Global Positioning Systems. GSM Global System for Mobile communication network GSS Generation Surveillance Systems. ITS Intelligent Transportation Systems. IVHS Intelligent Vehicle Highway Systems. LBP Local Binary Pattern. RADAR Radio Detection And Ranging. ROI Region of Interest.
  • 11. 1 Introduction Introduction The increase of vehicle traffic causes many problems including traffic accidents, traffic congestion, road degradation, and even emissions in terms of pollutants and greenhouse gases. Thus, considerable efforts are made to develop technologies in order to help the management of road traffic. The aim is to understand issues and improve the security on roads. Two common classes can be distinguished, visual-based and non-visual techniques. The visual-based techniques include the vision sensors. The non-visual techniques include various sensors as RADAR. RADAR-based system is widely used to detect, classify, and estimate the speed of vehicles. These systems work effectively but they have some problems related to complexity and cost. These problems appear in the design and the implementation because they need much more electronic devices and electrical power [1]. To avoid such problems, researchers use vision-based sensors (cameras) to develop a complete system able to detect, count, classify, and estimate the speed of vehicles. This system is called the Intelligent Transportation Systems (ITS). The effectiveness of vision- based system depends on the software not on the sensor. However, this system is challenging because of problems related on acquired videos such as blur effect [2], illumination variation, bad illumination, occlusion, fixed camera, shadow, and noise. Our purpose in this project is to develop a vision-based ITS. This last has to be able to detect, count, classify, and estimate the instantaneous speed of the vehicles using image processing techniques. The proposed approach has to consider some constraints as real-time execution and also covering the problems related on the acquired videos problems cited previously (illumination variation, noise…). To fulfill the system requirements, the proposed idea turns on analyzing just a specific region of interests (ROI). This ROI represents a line crosses the road. Observations over this line are used to detect, count, classify, and estimate the speed of vehicles. Thus, instead of analyzing the whole frames of the video, just a ROI is extracted and analyzed. Figure 1 summarizes the data flow diagram of our developed system. The process of vehicle detection, counting, classification, and speed estimation is achieved while the vehicle passes through the ROI. The proposed ITS has the advantage of being simple, easy to implement, real time, and accurate. This project is conducted as part of a national research project PNR entitled "Design and implementation of a Geographic Information platform for the study and management of Algerian cities" supported by the research center CRASC, Oran. The rest of this report is organized in four chapters. In chapter 1, we present a brief introduction on Intelligent Transportation Systems (ITS) and smart surveillance. Chapter 2 describes some recent related works on traffic surveillance systems. In chapter 3, we exhibit the proposed ITS. The last chapter presents the achieved experiments and obtained results.
  • 13. 3 Chapter I: A brief introduction to ITS and smart video surveillance Chapter I: A brief introduction to ITS and smart video surveillance 1.1. Introduction To have a good view for our research project, we are going in this chapter to introduce briefly Intelligent Transportation Systems (ITS) and smart traffic surveillance. This chapter is organized as follow: We talk about ITS in section 2. In section 3, we present the video surveillance system. Smart traffic surveillance systems will be discussed in Section 4. 1.2. Intelligent Transportation Systems The present section describes the ITS. The brief description includes the defining, the benefits and the major categories of ITS. 1.2.1. Definition It fact, building more roads to reduce traffic congestion is not always the easier and the best solution. It is very expensive, while causing a considerable environment impact besides requiring a large space. This is an important limitation within urban areas. Furthermore, it is straightforward that the improvement of the transportation infrastructure is essential for economic development. Hence, a compromise solution must be implemented. The difficulties concerned with this subject motivate research community to center their attention in the area of "Intelligent Transportation Systems". An Intelligent Transportation System (ITS) is defined as a set of information technologies applied to transportation infrastructure and vehicles to improve their performance [3]. Expending on this, then, ITS is an application that incorporates electronics, computer, and communication technologies into vehicles and roadways to improve their performances [4]. The figure 1.1 represents an ITS conceptual model. In some references and reports, you find that ITS also called Intelligent Vehicle Highway Systems (IVHS) [5]. ITS has been developed since 1930s and it has been slowly creeping into our lives. The major developments on ITS were made in Europe, the United State, Japan [6], South Korea, and Singapore [7]. Fig1.1: ITS conceptual model [8]
  • 14. 4 Chapter I: A brief introduction to ITS and smart video surveillance 1.2.2. Benefits of ITS ITS maximize the capacity of infrastructure, reducing the need to build additional highway capacity. ITS also enable transportation agencies to collect the real time data needed to measure and improve the performance of the transportation system, making the ITS the centerpiece of efforts to reform surface transportation systems and hold providers accountable for results [7]. Among the various benefits, we can talk about eight key classes:  Increasing safety.  Improving emergency response.  Enhancing mobility and convenience.  Improving interagency communications.  Delivering environment benefits.  Increasing travel information and trip enhancement.  Reducing congestion.  Increasing economic activities [5]. 1.2.3. Major Categories of ITS The six global major categories of ITS are [8]:  Advanced Traffic Management Systems (ATMS).  Advanced Travelers Information Systems (ATIS).  Commercial Vehicle Operation (CVO).  Advanced Public Transportation Systems (APTS).  Advanced Vehicle Control Systems (AVCS).  Advanced Rural Transportation Systems (ARTS). Let's give a brief description for each category. 1.2.3.1. The Advanced Traffic Management Systems (ATMS) The ATMS are fundamental part of intelligent transportation systems that are used to:  Increase transportation system efficiency.  Enhance mobility.  Improve safety.  Reduce fuel consumption.  Increase economic productivity. ATMS operate with a series of video and roadway loop detectors, variable message signs, network signal and ramp meter timing schedules, including roadways incident control strategies from one central location to respond to traffic conditions in real time [8]. ATMS contains three main elements: • Collection data team-monitoring traffic conditions. • Support systems: cameras, sensors, semaphores, and electronic displays. Help system operators to manage and control real time traffic.
  • 15. 5 Chapter I: A brief introduction to ITS and smart video surveillance Fig1.2: Traffic management center of Hampton city (USA)[9] • Real time traffic control systems: these systems use the information provided by the two previous elements they can change semaphores, send messages to electronic displays and control highway access [8]. This system is based on traffic surveillance system. We are going to talk about it later. Figure1.2 represents the ATMS at the Hampton Roads, vehicle traffic management center manages more than 800 lane miles of roadway. 1.2.3.2. The Advanced Travelers Information Systems (ATIS) ATIS are systems that acquire, analyze, and present information to assist surface transportation travels in moving from a starting point to their desired destination. These systems include static and real-time information on traffic conditions, and schedules, road and weather conditions, optimal routes, recommended speeds, lane restrictions and tourist information. All these information are distributed from the traffic management center. The ATIS distribute information using several communications technologies: wireless broadcast, electronic data lines to remote terminals, and telephone advisory messages [10]. 1.2.3.3. The Commercial Vehicle Operations (CVO) CVO systems use different ITS technologies to increase safety and efficiency of commercial vehicle and fleets [11]. CVO systems became useful for large and medium companies that have commercial fleets, because they allow the management of all the vehicles, while controlling speed and stopping-place times, besides fulfilling the destination [8]. These systems would have a satellite navigation system (such as Global Positioning System –GPS-) or Global System for Mobile communication/General Park Radio Service (GSM/GPRS) systems, a small computer and a digital radio in each truck. For every few minutes the computer transmits the truck location. The digital radio service forwards the data to the central office of the trucking company [8].
  • 16. 6 Chapter I: A brief introduction to ITS and smart video surveillance Fig1.3: Principle of geolocation based on GPS,GSM/GPRS [12] A computer system in the central office manages the fleet in real time under control of a team of dispatchers. In this way, the central office knows where its trucks are [8]. Figure1.3 represents principle of geolocation based on GPS,GSM/GPRS . 1.2.3.4. The Advanced Public Transportation Systems (APTS) APTS use technologies from ATMS and ATIS to improve the operation and efficiency of high occupation transport such as buses and trains, to improve the mass transport service, allowing route information, travel schedules, costs, and real time information about changes in transportation systems [8]. Through APTS, one can control, plan, improve the services of a fleet, and foresee a more flexible service with efficiency and safety to guarantee customers satisfaction and trip control costs. The figure 1.4 represents the user interface of a bus location system BUSVIEW where we can find the real time information of the buses location [13]. Fig 1.4: Bus view map area.[8]
  • 17. 7 Chapter I: A brief introduction to ITS and smart video surveillance 1.2.3.5. The Advanced Vehicle Control Systems (AVCS) AVCS are the systems that join sensors, computers and control system to assist and alert drivers or take part of vehicle driving [8]. The AVCS has the following main purposes:  Solve the urban congestion problems.  Develop an accident free ground transportation system.  Reduce the negative environmental impacts of transportation system levels [14]. 1.2.3.6. The Advanced Rural Transportation Systems (ARTS) ARTS are designed to solve the problems arising in rural zones. Rural area roads have a unique set of attributes such as steep grades, blind corners, curves, few navigational signs, mix of users, and few alternative routes. Some of the referred systems used in the urban areas already begun to be implemented in rural areas, such as ATMS, ATIS and APTS. The five goals of the ARTS are:  Improve the safety and security of users of the rural transportation system.  Enhance personnel mobility and accessibility to services, and enhance the convenience and comfort of all users of the transportation system.  Increase operational efficiency and productivity of the transportation system, focusing on system providers.  Enhance economic productivity of individuals, businesses and organizations.  Reduce energy consumption and environmental costs and negative impacts [15]. As we have seen in this part: to build ITS, we require information, and this information requires data which are generated by surveillance. In part two of this chapter, we are going to talk about video surveillance system. 1.3 Video surveillance Video Surveillance (also called Closed Circuit Television –CCTV-) is one of the active research topics in Image Processing and computer vision. A video surveillance system offers the possibility of visual surveillance while the observer is not directly on site. Surveillance may be performed not only directly but may also be stored, evaluated, and repeated as often as necessary [16]. Fig1.5: Surveillance camera[17] Fig1.6: The main part of CCTV system[18]
  • 18. 8 Chapter I: A brief introduction to ITS and smart video surveillance In this section, we give brief description of CCTV surveillance system by talking about the history, applications and benefits. Then we finish this section by talking about smart surveillance systems. 1.3.1 History [19] Video surveillance systems have long been in use to monitor security sensitive areas. The history of video surveillance consists of three generation of systems, which are called 1GSS, 2GSS and 3GSS. The first generation surveillance systems (1GSS, 1960-1980) were based on analog sub systems for image acquisition, transmission and processing. They extended human eye in spatial sense by transmitting the outputs of several cameras monitoring a set of sites to the displays in a central control room. They had major drawbacks like requiring high bandwidth, difficult archiving and retrieval of events due to large number of video tape requirements, and difficult online event detection which only depended on human operators with limited attention span. The next generation surveillance systems (2GSS, 1980-2000) were hybrids in the sense that they used both analog and digital sub systems to resolve some drawbacks of its predecessors. They made use of the early advances in digital video processing methods that provide assistance to the human operators by filtering out spurious events. Most of the work during 2GSS is focused on real-time event detection. The third generation surveillance systems (3GSS, 2000- ) provided end-to-end digital systems. Image acquisition and processing at the sensor level, communication through mobile and fixed heterogeneous broadband networks and image storage at the central servers benefit from low cost digital infrastructure. Unlike previous generations, in 3GSS some parts of the image processing is distributed towards the sensor level by the use of intelligent cameras that are able to digitize and compress acquired analog image signals and perform image analysis algorithms like motion and face detection with the help of their attached digital computing components. The ultimate goal of 3GSS is to allow video data to be used for online alarm generation to assist human operators and for offline inspection effectively. In order to achieve this goal, 3GSS will provide smart systems that are able to generate real-time alarms defined on complex events and handle distributed storage and content-based retrieval of video data. 1.3.2 Applications A further field of application of video surveillance system is security technology:  Verification of alarms (intrusion, hold-up, fire).  Detection of criminal offences (theft, defalcation).  Documentation of security relevant events.  Monitoring of open-air grounds.  Deterrence of offenders (arson, tamper, vandalism and hold-up).  Localization of offenders (and tracing of movements of offender in the object).  Diminishing of accident consequences (prompt intervention).  Documentation of events.
  • 19. 9 Chapter I: A brief introduction to ITS and smart video surveillance  Interaction with access control systems. 1.3.3 Benefits Among the different benefits we consider: Availability: There was a time when the surveillance techniques were utilized only in shopping centers and malls. Nowadays, you can notice closed-circuit televisions almost at any place you visit, from a small store to homes and holy places. As a result, they guarantee greater public security at a fraction of the cost. Real-time monitoring: Traditionally big organizations have always had the benefits of video surveillance manned by security professionals. In the past times, the events captured on video were used to expose important information and work as proof after the event happened. However, modern technologies let users to check and reply to alarms immediately. 1.3.4 Smart video Surveillance Therefore, there is a need of a smart surveillance system for intelligent monitoring that captures data in real time, transmits, processes, and understands the information related to those monitored. The making of video surveillance systems ―smart‖ requires fast, reliable, and robust algorithms for moving object detection, classification, tracking, and activity analysis [19]. As we have seen in this part, video surveillance system has the benefits of security and safety, and by making this system smart we can detect, count, classify and track the objects. For the next part, we are going to talk about essential parts of this chapter. 1.4 Traffic surveillance system Traffic surveillance is one of important issues in ITS for traffic monitoring. The key goal of the traffic surveillance system is to estimate the desired traffic parameters through the vehicle detection, tracking, counting, classification, plate number recognition, and speed estimation. Figure 1.7 represents CCTV camera operating on traffic road. Nowadays, there is an instant need for robust and reliable traffic surveillance system to improve traffic control and management with the problem of urban congestion spreads.
  • 20. 10 Chapter I: A brief introduction to ITS and smart video surveillance Fig1.7: CCTV camera operating on traffic road [20] Currently there are two kinds of traffic surveillance technologies:  The dominant technology is loop sensor detection; this technology is efficient for vehicle speed and flow data collection. Although many detect devices such as closed loop, supersonic and radar exist and widely used, the most important drawback of these equipment is their limitation in measuring some important traffic parameters and accurately assessing traffic condition. The first reason is that ―blind‖ type of detection technology is employed. These sensors cannot provide full traffic scene information.  Another very popular technique is video monitoring system. The vision-based approach has the advantages of easy maintenance and high flexibility in traffic monitoring and, thus, becomes one of the most popular techniques used in traffic surveillance system. Our purpose in this project is to build an ITS that counts, classifies and estimates the instantaneous speed of vehicles using video monitoring system which is part of computer vision field. We draw on your attention how does the system provide information about the traffic?, The answer is easy: Vehicle counting gives data that helps to identify critical flow time periods, determining the influence of large vehicles or pedestrians on vehicular traffic flow. Vehicle classification are used to know the reason of congestion and air pollution. Vehicle speed estimation gives data that helps to know the reason of congestion, traffic accident, and road degradation. As we have seen in this part the smart traffic surveillance is an important stage on ITS, because any ITS needs information, and information requires data and data requires smart surveillance. 1.5 Conclusion In this chapter, we have given a brief description of intelligent transportation systems (ITS), video surveillance (CCTV) systems and smart traffic surveillance. Next chapter discuss related works on smart traffic surveillance.
  • 21. 11 Chapter II: Related works on smart traffic surveillance Chapter II: Related Works on smart traffic surveillance 2.1. Introduction Many researchers have drawn attention on developing Intelligent Transportation System (ITS) and specially the part of smart traffic surveillance [21-37]. The aim is to build a complete system that detects, counts, classifies, and estimates speed of vehicles. Hence many algorithms and methods have been developed. A brief survey of some recent related works on smart traffic surveillance is presented in this chapter. The existing works have been judged by four criteria. The first one is whether the proposed system is complete or it considers just one task (counting, classification, speed estimation). The second criterion is if the system is real-time or not. The third one is about considering practical problems (illumination changing, noise…). The last criterion is the percentage of accuracy. The present chapter is organized as follow, in the next section, we present some related works on vision-based smart traffic surveillance. Discussion will follow in the last section. 2.2. Related works P. M. Daigavan et a.[21] have developed a non-real-time system that detects and counts vehicles on highway by using background registration technique and segmentation by using morphological operator. Tests over 120 frames with constant illumination provide accuracy rate of 96%. Their algorithm cannot solve the problem of multiple car occlusion. M .Liang et al. [22] built a real-time system that counts and classifies vehicles into three categories; small, medium, and big the highway vehicles by applying a regression analysis. The proposed algorithm was tested for 70 minutes of low quality videos including severe occlusions provide accuracy rate of 87.82 % for counting and 78.68% for vehicle classification. This approach has problems of background registration and shadows. In [23], authors proposed a system that detect, count, and classify vehicles. Vehicle counting is achieved by finding the centroid and the distance between the marked border and the vehicle. Vehicles are classified into three categories; small, medium, and big. It is performed by finding the area and applying a thresholding method. They have tested their algorithm on five seconds video duration and have found a problem in vehicles counting because of multiple vehicle occlusions. This approach provides accuracy rate of 91% for counting and 78.68% for classification. Harris-Stephen corner detector algorithm is used to count vehicles and estimate vehicle speed, which is done by N. Chintalacheruvu et al. [24]. They have tested their algorithm and have found the problem of shadow and multiple car occlusion. This real-time approach provides accuracy rate of 88% for counting and 94.9% for speed estimation.
  • 22. 12 Chapter II: Related works on smart traffic surveillance R. Javadzadeh et al. [25], have proposed a method to identify and count vehicles on highways with low resolution on video by using background subtraction, Prewitt filter, and various morphological operations. Their non-real-time approach showed the approximate accuracy of 88% in vehicle detection and counting. In [26], vehicle counting and classification is done. The author makes the hypothesis that camera is placed at the center of the road. Background subtraction method and Kalman filter are used to detect and track individual vehicles throughout the detection zone. The classification is based on determining the area of vehicles, it is relies on a database to classify the vehicle into five categories; motor cycle, cars, trucks, minibuses, and heavy trucks. This method is tested on 3400 frames and it provided a high counting performance of 97%. The problem of this method is in multiple car occlusions. This not real-time method provides accuracy rate of 87.22% for vehicle classification that is resulted due to system confusion between minibus and cars. E. A. Mosabbeb et al. [27], have developed a non-real-time approach of vehicle detection in high congestion, noisy, cluttered, snowy, rainy, scenes containing remarkable shadows, bad illumination conditions, and occlusions. This algorithm use background extraction after enhancing the image quality. Then, for each frame, background subtraction and image filtering were applied. Mean and standard deviation matrices together with the output of the background subtraction phase, have been fed into a mapping process to extract the strong shadow regions. Then after the mapping process, each individual component in binary image is considered as vehicle. Their proposed approach has achieved an average accuracy of 94%. They have also developed an algorithm to define a region of interest (ROI) which is a square where the road and vehicle are visible. This algorithm keeps the study in ROI by selecting reference points, when the vehicle passes through the ROI, the points are shifted, and the speed of vehicle is estimated as the speed of points. In [28], the application is based on line sensor theory. C. Salvadori et al. have developed background subtraction method based on background modeling techniques like Gaussian Mixture Method and Single Metric Method. This real-time approach has been tested by considering very high frame rate and very high speed of vehicles and gave accuracy rate of 93%. M. C. Narhe et al. [29], have used background registration, background subtraction, and the Scale Invariant Feature Transform (SIFT) algorithm to count the vehicles according to class. This non real-time approach has problem of varying illumination, and required database to classify the vehicle into three categories; two wheelers, cars, and trucks. In [30], the speed measurement is performed on binary image. It is calculated using the position of the vehicle in each frame by finding the spot bounding, the center of gravity, and using shrinking algorithm. This real-time proposed method is tested with five vehicles on bad weather and illumination and strong shadow. It provided an accuracy rate of 99.04%.
  • 23. 13 Chapter II: Related works on smart traffic surveillance In [31], the subtraction and binarization techniques by using bounding box method are applied to estimate the speed and get the number of plate (registration number of vehicle). The system worked at any weather and illumination conditions. It provided good results for vehicle speed estimation and number of plate recognition. S. Ranjit et al. [32] have applied the motion vector technique after the block extraction and subtraction to estimate the speed measurement of the moving vehicle. This real-time approach is tested on videos with very high frame rate (60 fps), and the distance between camera and vehicle should be 0.51m. According the authors, this approach works well and provides good results. In [33], estimating the speed of vehicles was done. The speed is calculated from the number of frames consumed by the object to pass by the scene by knowing the duration of each frame. This real-time approach considered on invariant illumination and specifying the captured distance. The approach has problem of vehicle detection. S. Joshi [34] has determined the speed by fixing the real distance, then mapped into image, and divided by travelled time of detected vehicle. He considered as constraints the noise of camera, and change in illumination. According to the author, this non real-time approach worked well. H. Y. Lin et al. [35], have used deblurring algorithms, fixed the captured distance, and frame rate (30fps) to estimate the speed. The experimented results have shown the estimated speed accuracy within 95%. R. Gokule et al. [36], have developed, to estimate the speed of the vehicle, an non real-time algorithm that determines the centroid of each frame, and keep the processing in that point by considering the speed of the centroid is the speed of vehicle. The experimental results have shown the estimated speed accuracy within 92% with considering the change of illumination, and the height of the camera is 10m. N. A. Prasath et al. [37] have used a method that determines the speed of vehicles using the distance travelled by the centroid to the frame rate of the video. The experimental results on poor weather and strong shadow have shown that the estimated speed is within small error of actual speed. The table 2.1 summarizes the settings of all reviewed related works. We specify first the aim of the proposed ITS including vehicles counting (count), classification (classif), and speed estimation (speed). Then we attest if the approach is real-time or not (R). Finally we specify the test conditions such as video duration (D), considered constraints (CC), and percentage of accuracy (PA).
  • 24. 14 Chapter II: Related works on smart traffic surveillance Table2.1: Summary settings of presented related works Ref Count Classif Speed R.T D C.C P.A [21] Y - - N 120 frames -Same light intensity during daytime. 96% [22] Y Y - Y 70minutes -Poor quality video. -Severe occlusions. -Low resolution Count=87.82%. Classif=78.68% [23] Y Y - N 20 seconds -Not mentioned Count=91%. Classif=78.68% [24] Y - Y Y Not mentioned -Not mentioned Count=88%. Speed=94.9% [25] Y - - N Not mentioned -Low resolution 88%. [26] Y Y - N 3400 frames -Camera placed at the center of the road. Count=97.37%. Classif=87.22% . [27] Y - - N Not mentioned -Strong shadow. -High congestion. -Bad illumination. -Occlusion. 93.94% [28] Y - - N Not mentioned -Very high frame rate. -Very high speed of vehicles 93% [29] Y Y - N Not mentioned -Invariant illumination. -Require database Good results [30] - - Y N Test only on 5 vehicles -Bad weather. -Darkness -Shadows 99.04% [31] - - Y N Not mentioned Any weather and illumination condition. Works well [32] - - Y Y Not mentioned -Very high frame rate (60fps). -Distance between camera and vehicle should be 0.51m Works well [33] - - Y Y Not mentioned -Shadow removal -Invariant illumination -Specifying the distance captured Works well [34] - - Y N Not mentioned -Camera noise -Invariant illumination Works well [35] - - Y N Not mentioned -Blurred images -Frame rate=30 -Specifying the distance 95% [36] - - Y N Not mentioned -Invariant illumination -Foggy weather -The height of captured video is 10m. 92% [37] - - Y N Not mentioned -Poor weather -Shadows -Specifying the distance Works well
  • 25. 15 Chapter II: Related works on smart traffic surveillance 2.3. Discussion From the presented state of the art, different image processing techniques have been used. For vehicle detection and counting, we notice that background registration and subtraction, using morphological operators, and filtering are very used. However, these methods has some disadvantages as complexity and the error of accuracy due to invariant illumination, strong shadow, camera noise, poor weather, low resolution on video, problem of the congestion, and multiple car occlusion. Moreover, for vehicle classification, we notice that this task is much challenged because few works exist in this topic. The methods that are used in recent works are background subtraction, filtering, and finding the area associated with thresholding techniques. Tests proved that these methods have problems of vehicle detection due to the problems related on detection and counting task. Finally, for vehicle speed estimation we notice that this task is much challenged because there are many existing works for this task but two techniques are only used. The first one is the extraction of the centroid and the second is to fix the distance and time duration for passed vehicle. These presented techniques on vehicle detection, counting, classification, and speed estimation are complex, and most of them are not real-time. Our work deals with vehicles detection, counting, classification, and speed estimation. The proposed technique differs from all the presented techniques in the fact that it is real-time and applied only to the region of interest (ROI) that represents a simple line crosses the road. 2.4. Conclusion In this chapter, we discussed some related works on vehicle detection, counting, classification, and speed estimation that are used in literature of smart traffic surveillance. We explained the disadvantages of related works and problems that till exist. Next chapter, the proposed ITS will be presented.
  • 26. 16 Chapter III: Proposed Intelligent Transportation System Chapter III: Proposed Intelligent Transportation System 3.1. Introduction Many developed intelligent systems rely on vision-based sensors [21-37]. Image processing plays a main part on this task. In our project, we deal with developing an ITS by using a fixed camera placed on the road. The aim is to exploit acquired videos and use image processing techniques to detect, count, classify, and estimate the instantaneous speed of vehicles. This chapter is organized as follows: We explain with some details the proposed ITS, and we conclude the chapter. 3.2. Proposed ITS Unlike most existing image processing-based methods, that works on the entire image [21-37], our approach instead is applied only on a region of interest (ROI) considered as a simple line crossing the road. The idea is to consider only variations over this line to detect, count, classify, and estimate the speed of vehicles. The considered ROI is provided by a professional of road monitoring instead of estimated automatically. This semi-automatic strategy is due to the fact that the definition of a ROI may not be estimated only from raw data, but it requires knowledge external to the images such as maps. In practice, obstacles and road intersections interest objects such as school and district need to be known or estimated from images by using advanced object recognition systems. Note that, the professional of road monitoring can provide a ROI for each road lane. It allows providing more detailed statistics to improve the monitoring process and decision-making. Moreover, it relaxes the constraints on the placement of ROI on the road lane such as avoiding the obstacles. About the images, we used gray level images, which can be acquired by an off-the–shelf camera operating in visible spectrum. The color is not required in this application, which makes faster the proposed technique. Moreover, the ROI is enough for the detection, counting, classification, and speed estimation of vehicles. Furthermore, to avoid illumination changing problems, the local binary pattern (LBP) descriptor is used. In fact, it is known that this descriptor is robust against illumination changing [38]. The proposed method consists of two main stages. The first one concerns the preprocessing that includes reading the current frame, converting the color frame to gray level, and finally applying the LBP descriptor. The second stage is about selecting and analyzing the ROI to detect, count, classify, and estimate the speed of vehicles. The implementation flow of proposed ITS is summarized on figure 3.1. Let's detail each stage.
  • 27. 17 Chapter III: Proposed Intelligent Transportation System Start i=1; count=0 The camera is activated Read frame i Vehicles passing the ROI count ++, classification, speed estimation i++ Yes End No No Yes Apply LBP Select the ROI Fig3.1: Schematic flow of the proposed approach. 3.2.1 Preprocessing stage Tests are achieved over frames as soon as they are acquired from the test video. Motion is enough for the detection and the counting of vehicles, therefore color information has no added value. Rather, it makes the task complex because vehicles have different colors. Thus, gray level camera can be used. If a color camera is used instead of gray level camera, the gray level image must be estimated from the RGB color image. There exist several conversion rules depending on the information needed such as luminance and brightness. Tests were performed on several conversion rules including those of the estimation of Y of the Ycbcr and V of the HSV color spaces. The conclusion is that the mean of three color bands (equ1) is the best conversion rule for vehicle detection, counting, classification, and speed estimation.
  • 28. 18 Chapter III: Proposed Intelligent Transportation System ( ) ( ( ) ( ) ( )) ( ) Where ( ), ( ), and ( ) are respectively the pixel intensity of red R, green G, and blue B color bands of the color RGB color space. The LBP is extracted from the gray level image. We use the algorithm proposed in [38]. An example of LBP descriptor applied on gray level frame is presented in figure3.2. This figure3.2 contains three same images with variant illumination. It shows that the LBP images are robust to illumination variation. We recall that the ROI represents a line crosses the road. In the case that a road is composed of different lanes, different lines are required. Each one placed on a lane and shifted from each others to avoid occlusion and take into account the practical requirements. Figure3.3 depicts an example of selected ROI. As illustrated, the lines composing the ROI are not collinear in order to provide more flexibility to the user and to reduce counting mistakes such as the vehicle straddling two lanes. Thus, vehicle detection is achieved over each lane separately. A flow that summarizes the first stage steps is presented on figure3.4. Fig3.2: Example of LBP descriptor applied on gray level image with different illumination.
  • 29. 19 Chapter III: Proposed Intelligent Transportation System a) Original frame b) Selected ROI's(black line) Fig3.3: Example of selected ROI on a frame. Start The camera is activated Convert the color image to grey level image End Apply LBP Read new frame Select the ROI No Yes Fig3.4: Flow chart of the preprocessing stage.
  • 30. 20 Chapter III: Proposed Intelligent Transportation System 3.2.2 Processing stage The proposed ITS processing part includes three main steps. First vehicles detection and counting, second vehicles detection and classification, and third vehicles detection and speed estimation. Let’s detail each step. A. Vehicles detection and counting [39] Let’s assume that the reference lines have been recorded before. A reference line is a list of pixels of the original image on which this line is placed. An image of the road is acquired and displayed on the screen, and then the user draws those lines by using a mouse or a stylus. The pixels on the line are recorded and used for change detection. Recording the reference line and using it during the same session of vehicle detection and counting allows having close illumination conditions. When a vehicle crosses the reference line, a change of the gray level is observed. It follows that, detecting vehicles is equivalent to making a decision about the change of gray level on the reference line. To do that, for each observed line, the global absolute differences between this observed line and its corresponding reference line is computed. Figure3.5 shows an example of the time series of the absolute differences over frames of the four considered ROI’s of figure 3.3. Small peaks appear in the obtained plots. Noise and change in illumination may be the causes. These undesirable phenomena may affect the detection accuracy. To alleviate this drawback, adaptive thresholding is implemented. We conduct several experimentations in order to find an estimation rule of the used thresholds. We propose the use of two thresholds. The first one 𝑇ℎ1 is used to detect the frame when the vehicle starts crossing the road (the green line on the figure3.5). The second one 𝑇ℎ2 when the vehicle leaves the ROI (the red line on the figure3.5). These thresholds need more explanations. 𝑇ℎ2 is a function of 𝑇ℎ1. The later depends on the video noise (the illumination change is considered as semantic noise). One can estimate the noise and define the 𝑇ℎ1 computation rule. From figure3.6, we can notice that the maximum noise is close the second adaptive thresold Th2. One can estimate the noise to define the 𝑇ℎ1 computation rule. However, the definition of a useful rule is not easy because the noise estimator may be highly biased. Thanks to the fact that the ratio of the peak due to noise and the peak due to vehicles is low, the frame rate per second (FPS) of a video can be used instead. Indeed, we expect that the noise is high when the FPS is high for the off-the-shelf cameras. In other words, 𝑇ℎ1 depends also on the used camera. More precisely, experimentations show that the following estimation rules of the thresholds are useful: 𝑇ℎ (2) 𝑇ℎ 𝑇ℎ (3)
  • 31. 21 Chapter III: Proposed Intelligent Transportation System a)Line1. b) Line2. c)Line3. d)Line4 Fig3. 5: Time series of the absolute differences computed on the four frames of Fig 3. 3 The green line is Th1 and the red one for Th2. Fig3.6: The maximum noise Vs Th2 The parameter k depends on the used camera. This parameter is the same for cameras having close signal to noise ratio. Consequently, fixing the parameter k can be performed one, which means that the proposed approach is easy to reproduce. Tests show that the parameter k holds value of 1.618. The thresholding operation is summarized as follow. Let us consider the reference ROI (𝑟𝑒𝑓). We select for each current frame the ROI (𝑓𝑟i). The average of the absolute difference D is computed as follows. ∑ |𝑟𝑒𝑓( ) 𝑓𝑟( )| (4)
  • 32. 22 Chapter III: Proposed Intelligent Transportation System N stands for the length of the ROI. The vehicle is detected while D is greater than the threshold 𝑇ℎ1 and it is counted if D is decreased less than 𝑇ℎ2. Figure 3.7 summarizes the flow chart of the second stage. The question now is how to select the best position of ROI's? In fact, the ROI were selected to assure best results in terms of vehicle detection. Many tests have been carried out to choose the best position of ROI. Results have shown that the best position of the ROI has to satisfy three conditions. The first one is that the selected ROI has to be fixed at the middle of the road. Second, it has to be inside the lane. Third, their lengths have to be not too short or too long. If one condition is not satisfied, a problem of vehicle detection may occur. Figure3.8 depicts an example of a frame that contains ROI that satisfy the three conditions for a best vehicles detection. Fixing the ROI far from camera have shown problem of multiple car occlusion, or missing vehicle (no detection). Figure3.9 illustrates an example of a frame that contains ROI far from the camera. It shows that if we select the ROI far from the camera, and the problem of occlusion may occur because vehicles are too close in that position. Start Read the reference frame Read frame i Preprocessing Compute D i++ The camera is activated D >= Th1 && D < Th2 Yes No count++End Preprocessing Yes No Fig3.7: Flow chart summarizing the detection and counting part.
  • 33. 23 Chapter III: Proposed Intelligent Transportation System Fig3.8: Example frame for best ROI's selection. Fig3.9: Example frame for selecting ROI's far from camera. B. Vehicles detection and classification We recall that we keep the study on the ROI, which is a line crosses the road. Our proposed approach for classification relies on counting the number of frames consumed by a vehicle passing through the ROI. Only two categories are considered small and big. This is due the fact that the considered ROI is not sufficient to discriminate between other classes. The proposed idea is summarized as follows. When a vehicle starts passing the ROI, the Counter of Consumed Frames (CCF) starts counting until the vehicle finish passing the ROI. The counter is saved and compared to an experimental threshold in order to classify the vehicle. Many experiments have been achieved to fix that threshold. We found that the threshold 𝑇ℎ (eq5) depends also to the frame rate of the camera (FPS). 𝑇ℎ (5) More formally, the vehicle is classified as follow. While CCF is less than 𝑇ℎ , the vehicle is classified as small. Otherwise, it is classified as big vehicle. Figure 3.10 summarizes vehicles classification stage.
  • 34. 24 Chapter III: Proposed Intelligent Transportation System Start Read the reference frame Preprocessing Read frame i Preprocessing Compute DD >= Th2 i++ The camera is activated CCF++ The vehicle detected and counted CCF < Th3 Big vehicle Small vehicle Yes No No Yes No YesEnd Yes No Fig3.10: Flow chart summarizing the vehicle detection and classification part. C. Vehicle detection and speed estimation The proposed approach for vehicles speed estimation relies on the detection and counting part. The idea is simple and effective. It relies on counting the number of consumed frames by a vehicle (CCFspd) while passing between two ROI selected on same lane. Let's explain in more details. We select two ROI in each lane. The two ROI of same lane are separated with small known distance (d). This distance should be known previously by the user or should be deduced by using the standard length of white lane. Figure3.11 corresponds to the international standard length of white lines.
  • 35. 25 Chapter III: Proposed Intelligent Transportation System Fig 3.11: The standard length of whit line. Fig3.12: Example frame of selecting two ROI for each lane for speed estimation. Figure3.12 shows an example of selecting two ROI on each lane for speed estimation. We could know the separated distance between two-selected ROI's by using the given information from figure3.11. Accordingly, white lines on figurer 3.12 corresponds to "T3" in figure 3.11. Thus, the distance between two consecutive white lines is fixed to 1.33m. Hence, if we place our two ROI there, the distance is easily deduced. The speed is defined as a distance over time. Having the distance, the aim now is to deduce the time that a vehicle spends to cross that distance. To achieve that, the idea is summarized as follows. After the vehicle is detected from ROI1 (black line in figure 3.12), the counter of consumed frames between two regions ( ) start counting until the vehicle is detected in the ROI2 (the green line in figure 3.12). Having the number of frames (CCFspd), and the number of frames per second, which is an intrinsic characteristic of a camera (fps), the time T is easily deduced as follow. 𝑇 𝑓𝑟 ( )
  • 36. 26 Chapter III: Proposed Intelligent Transportation System Hence the estimated speed ( ) is: ( ) (7) Where: is the estimated speed of the vehicle (Km/h). is the distance between the two selected ROI's by the user (m). 𝑇 is time consumed by a vehicle to pass between the two ROI. is a constant that represents the ratio of one hour converted in the second over one kilometer converted in the meter (3600/1000). Note that the small distance is chosen to compute the instantaneous speed. Furthermore, that may avoid some problems when vehicles are far from each other. In fact, in this case, while the first vehicle is not yet passing through the second ROI the other vehicle may pass through the first one. Thus the frame counting will be confused. Figure3.13 illustrates an example of such problem. The flow chart of the task of vehicle speed estimation is shown in figure 3.14. a) No vehicles passing the ROI's. b) Problem of vehicles closed to each other. Fig3.13: Illustration of the problem of far lines.
  • 37. 27 Chapter III: Proposed Intelligent Transportation System Start Preprocessing Read framei Preprocessing Thecamera isactivated Count1++ Count2++ Count1 Count2 Calculate the speed End Enter the distance between ROI (distance) Readthe reference frame Vehicle detectedin ROI1 Vehicle detectedin ROI2 No Yes CCFspd++ i++ Yes No No Yes Yes No Fig3.14: Flow chart summarizing the vehicle speed estimation part. 3.3. Conclusion In this chapter, a complete ITS is proposed. It includes vehicles detection, counting, classification, and speed estimation. Proposed approaches are presented in details. The next chapter will be dedicated to experiments and tests part in order to validate of our system.
  • 38. 28 Chapter IV: Experiments, Results and Discussion Chapter IV: Experiments, Results and Discussion 4.1. Introduction We are going in this chapter to evaluate the performance of the proposed ITS by achieving tests on four real videos having different intrinsic proprieties and acquired in real situations. This chapter is organized as follow. In section4.2, we present the test videos. Results and discussions will be exhibited in section4.3. In section4.4, we analyze our proposed approach by discussing its strengths and weaknesses. Finally, we conclude the chapter. 4.2. Experiments In order to evaluate the performance of our proposed ITS, we perform tests on four different videos. Figures 4.1 show one example frame of each video. Those videos have different settings summarized on table 4.1. Considered videos are acquired in real situations. Thus, they contain some real problems as illumination variation, shadow, noise, blur, occlusion, and vibration of camera due to the wind. Figures 4.2 and 4.3, 4.4 (a) and (b), 4.5 (a) and (b) depict an example of illumination changing, shadow, blur, occlusion, and vibration of camera due to the wind respectively. We recall that, the user indicates the ROI, which is linear and crosses the road. As we have said previously, the ROI must be in the middle, inside of the lane, and its length must not be not too short or too long. Figures 4.6 (a), (b), (c), and (d) show an example frame for each considered video that contains selected ROI that fulfill all the requirements. Table4.1: Different settings of the four test video. The video settings Video1 Video2 Video3 Video4 Frame rate 14.999 25 30 30 Number of frames 500 750 878 1071 Duration 33.34 30 29.70 36.13 Height 240 240 720 720 Width 320 320 1280 1280
  • 39. 29 Chapter IV: Experiments, Results and Discussion a). The first test video b). The second test video c). The third test video. d). The fourth test video. Fig4.1: Example of one frame from each test videos. Fig 4.2: Example of illumination variation in test videos. Fig 4.3: Example of shadow and blur in test videos.
  • 40. 30 Chapter IV: Experiments, Results and Discussion a) Without selected ROI. b) With selected ROI. Fig4.4: Example of occlusion in test videos. a). Without the effect of wind b). With the effect of wind Fig4.5: Example of effect of wind in test videos. a). The first video b). The second video. c). The third video d). The fourth video. Fig4.6: Examples of frames with selected ROI's from the test videos.
  • 41. 31 Chapter IV: Experiments, Results and Discussion The first video has problem of bad illumination, and noise. The second video has problems of illumination changing, and occlusion. For the third and fourth videos, they have problems of strongest shadow, blur, and vibration of camera due to wind. We consider all these problems (noise, shadow, occlusion…) to attest our proposed approach. 4.3. Results and discussion In this section, we apply the proposed algorithms on four test videos. Obtained results will be presented and discussed. For vehicle counting and classification, having the ground truth, the evaluation is achieved in terms of percentage of accuracy. However, for speed estimation, the ground truth is not available so the evaluation is performed subjectively. 4.3.1. Vehicle detection and counting We apply the proposed vehicle detection and counting technique on the four considered videos. Figure4.7 (a), (b), (c), and (d) show an example of vehicle detection and counting for videos 1, 2, 3, and 4, respectively. Quantitative evaluation is tabulated on table4.2. It contains information about ground truth (GT) and obtained results (OR) for each ROI of each video. In addition, the counting accuracy of each video and the algorithm runtime to process each frame. From the obtained results, we can attest that the proposed algorithm provides encouraging results in terms of accuracy rate. In fact, for the first and second video, the accuracy ratio is 100%. We recall that these two videos contain some real problems as shadow, bad illumination, noise, occlusion, illumination changing. Thus, we conclude that our algorithm is robust against all these problems. For videos 3, and4, the algorithm is less efficient. The accuracy ratio is 95.56% and 93.65%, respectively. This is due to the vibration of the camera due to the wind. The global accuracy rate is 97.30%, which is very acceptable. For executing time, the differences between obtained values are due to the images size. Overall, we can attest that the algorithm is very speed even if it not optimized yet. From all the obtained results, we conclude that the proposed algorithm for vehicle detection and counting provides very interesting results.
  • 42. 32 Chapter IV: Experiments, Results and Discussion a) Video1. b)Video c)Video3 d) Video4 Fig 4.7: Example of final vehicle detection and counting system. Table4.2: Results of applying the detection and counting algorithm on test videos. ROI Video1 Video2 Video3 Video4 GT OR GT OR GT OR GT OR ROI1 13 13 13 13 5 6 4 4 ROI2 6 6 9 9 9 9 17 14 ROI3 12 12 8 8 15 14 20 15 ROI4 13 13 13 13 16 16 22 26 Total 44 44 43 43 45 43 63 59 Accuracy 100% 100% 95.56% 93.65% Runtime of one frame (s) 0.0702 0.0467 0.1747 0.1713
  • 43. 33 Chapter IV: Experiments, Results and Discussion 4.3.2. Vehicle detection and classification We apply the proposed vehicle classification algorithm on the four considered video. We recall that vehicles are classified into two classes small (S) and big (B). Figure4.8 shows an example of vehicle detection and classification for video1, 2, 3, and 4 respectively. Quantitative evaluation in terms of ground truth (S and B) and obtained results (RS and RB) for each ROI of each video in addition to accuracy rate and execution time are summarized in table4.3. From the obtained results we can attest that the proposed algorithm provides encouraging results in terms of accuracy rate. In fact, for the first video, the accuracy ratio is 100%. We recall that this video contains some real problems as shadow, bad illumination, and noise. Thus, we conclude that our algorithm for vehicle classification is robust against all these problems. For video2, we recall that is video contains some real problems as shadow, illumination changing, occlusion, and noise. The accuracy ratio is 88.37%. Thus, our algorithm is less efficient, this due to the following problems. For the ROI1, the big vehicle is classified as small vehicle because some intensities turns around the noise intensities, this is why some of consumed frames are not detected. In addition, the camera is not placed well, this shows the big vehicle passes through a portion of the ROI. For the ROI2, the approach shows that it is robust against to the occlusion. For the ROI3 and ROI4, the big vehicle is detected as small vehicle because of the high speed of big vehicle. From these results, we can attest that our approach is real-time. It is robust against to the illumination changing, occlusion, noise, and shadow. a)Video1 b)Video2 c)Video3 d)Video4 Fig 4.8: Example of final vehicle detection and classification system.
  • 44. 34 Chapter IV: Experiments, Results and Discussion Table4.3: Results of applying the detection and classification for tested videos. ROI Video1 Video2 Video3 Video4 S B RS RB S B RS RB S B RS RB S B RS RB ROI1 13 0 13 0 12 1 13 0 5 0 5 1 4 0 4 0 ROI2 5 1 5 1 9 0 9 0 7 2 7 2 15 2 10 4 ROI3 12 0 12 0 7 1 8 0 15 0 14 0 19 1 12 3 ROI4 13 0 13 0 10 3 12 1 12 4 7 9 22 0 23 3 Accuracy rate 100% 90.91% 88.88% 88.88% Runtime of one frame (s) 0.0710 0.0463 0.1712 0.1737 For video3, we recall that is video contains some real problems as blur effect, noise, vibration of camera due to the wind, and strong shadow. The accuracy ratio is 88.88%. The algorithm is less efficient, due to the following problems. For the ROI1, the task of detection and classification does not work well due to strong shadow, and the camera is not fixed well. Furthermore, the day was windy. For the ROI2 and ROI3, the not detected vehicle passed in small part of ROI. Overall, the task of classification works well. From this result, we can say that our approach is real time. It is robust against bad illumination, blur, and noise. For video4, we recall that this video contains some real problems as blur effect, noise, the vibration of camera due to the wind, and strongest shadow. The accuracy ratio is 88.88%. The algorithm is less efficient. The approach shows good results for vehicle detection and classification. For the ROI2, ROI3, and ROI4. The approach does not show good results in detection, and classification. These are due to problem of the vehicle passing through a small portion of ROI, and to the wind, that affects the position of ROI. The varying of the ROI may cause; problem in vehicle detection (missing or recount), and problem in detection of consumed frames which occurs problem in vehicle classification. From these results, we attest our approach is real-time. It is robust against to blur effect, noise. It has problem when the vehicle passing through a portion of ROI, and the vibration of camera due to the wind. The global accuracy rate is above 92%, which is acceptable. For executing time, the differences between obtained values are due to the images size. Overall, we can attest that the algorithm is very speed even if it not optimized yet. From all the obtained results, we conclude that the proposed algorithm for vehicle detection and classification provides interesting results.
  • 45. 35 Chapter IV: Experiments, Results and Discussion 4.3.3. Vehicle detection and speed estimation We apply the proposed algorithm of vehicle speed estimation only on three videos. Because the lanes on the first video are erased, so it is not possible to test it. Figure4.9 (a), (b), and (c) depicts an example of selected ROI to estimate the speed of vehicles for video2, 3, and 4 respectively. We notice that the selected ROI are between two consecutive white lines so the distance estimation is easy to deduce from the standard as explained on chapter 3. Figure 4.10 depicts the final system of vehicle detection and speed estimation for video2, 3, and 4 respectively. Quantitative evaluation is tabulated on tables 4.4, 4.5, and 4.6 respectively. It contains information about ground truth (GT) and obtained results (OR) for each ROI of videos 2, 3, and 4 respectively. a)Video2 b)Video3 c)Video4. Fig 4.9: Example of selected lines for vehicle detection and speed estimation.
  • 46. 36 Chapter IV: Experiments, Results and Discussion a)Video2. b)Video3. c)Video4. Fig 4.10: Example of final vehicle speed estimation. Table4.4: Results of applying the speed (km/h) estimation approach on second video. The vehicle ROI1 ROI2 ROI3 ROI4 1 59.85 39.9 59.85 119.7 2 59.85 59.85 59.85 59.85 3 59.85 59.85 59.85 39.9 4 59.85 119.7 59.85 119.7 5 119.7 39.9 39.9 39.9 6 59.85 59.85 39.9 59.85 7 59.85 59.85 59.85 119.7 8 59.85 59.85 59.85 119.7 9 59.85 29.925 - 119.7 10 39.9 - - 119.7 11 39.9 - - 119.7 12 59.85 - - 119.7 13 59.85 - - 119.7
  • 47. 37 Chapter IV: Experiments, Results and Discussion Table4.5: Results of applying the speed estimation approach on third video. The counter ROI1 ROI2 1 39.91 39.9075 2 39.91 39.9075 3 53.21 35.4733 4 53.21 35.4733 5 53.21 35.4733 6 53.21 63.872 7 - 63.852 8 - 53.21 9 - 53.21 Table4.6: Results of applying the speed estimation approach for fourth video. The counter ROI1 1 40.21 2 40.21 3 40.21 4 106.73 Due to using the international standard length of white line, we could test only two lanes for video3 and only one lane for video4. Subjectively, we conclude that the best approximation of speed is obtained when the frame rate of the camera is big enough. 4.4. Summary This section summarizes all the work done in this chapter. We consider the tests are applied only on the best selected ROI. Tests of vehicle detection and counting show very interesting results compared to those of related works presented in chapter2. The overall percentage accuracy of vehicle detection and counting is 97.3%. Tests on vehicles classification provides a global accuracy percentage of 92.42%, which is very promising. Furthermore, speed estimation provides interesting results. After these tests and results, we can say that our proposed ITS has the advantages of covering the problems of real time execution, illumination invariant, bad illumination, blur effect, multiple car occlusion, and noise. Moreover, any camera could be used, it does not depend on special frame rate. The drawbacks like vehicle passing through a portion of the ROI, the strongest shadow, and problem of not well fixed camera may affect the approach giving less performance. Table4.11 summarizes all the results, the running time, and percentage accuracy of each video.
  • 48. 38 Chapter IV: Experiments, Results and Discussion Table4.11: Summary of the evaluation of the proposed ITS. Video The task The running-time of one frame (seconds) Percentage accuracy Count Classif Speed Count Classif Video1 Y Y N 0.0782 100% 100% Video2 Y Y Y 0.0938 100% 90.91% Video3 Y Y Y 0.1901 95.56% 88.88% Video4 Y Y Y 0.2031 93.85% 88.88% Total - - - - 97.3% 92.42% Figures 4.11 (a), (b), (c), and (d) show an example of final results of our complete system that contains all tasks; vehicle detection, counting, classification, and speed estimation. a)Video1 b)Video2 c)Video3. d)Video4. Fig4.11: Example of final system for vehicle detection, counting, classification, and speed estimation.
  • 49. 39 Chapter IV: Experiments, Results and Discussion 4.5. Analyzing the proposed approach In this section, we present the strengths and weaknesses of our proposed approach. 4.5.1 Strengths of the approach For the strengths, we can say that our proposed method is, real-time, simple, robust against noise, illumination changing, and occlusion. It does not require any database. It can use any camera. Let's explain more.  Real time: Unlike some the existing methods, our proposed approach is real-time execution, because it relies on the ROI, which is a simple line, instead of the entire image.  Simple: Unlike existing methods using segmentation, filtering, edge detection, morphological operators, extract the centroid… etc. Our method is simple. It use only thresholding techniques.  Robust against to the illumination changing: The proposed method uses LBP, which is robust against to illumination changing.  Robust against to the noise: Because proposed thresholds are related to frame rate which is in relation with noise. So, the noise cannot affect the accuracy of the system.  Robust against to the occlusion: The ROI of each lane are separately selected. This may avoid the problem of multiple car occlusion.  No database needed: The vehicle classification task is simple; it relies on number of frames consumed by vehicle when it passes through the ROI, so we did not have to calculate the area of vehicles or use databases like some of existing methods.  Complete system: Unlike existing methods; our proposed method addresses four tasks; vehicle detection, counting, classification, and speed estimation.  Simple camera: Proposed approach deals with any camera which has high or less frame rate, captured high or low quality image, colored or gray level. Unlike some existing methods that require very high frame rate, and need high quality images. 4.5.2. The weakness of the approach For the weaknesses, tests prove that the approach has some limitations as a problem of vehicle congestion, vehicle passing through a portion of ROI, and it provides less performance when the camera is not well fixed or vibrates due to wind for example.  Vehicle congestion: In case of traffic congestion, the vehicle consumed much frames when it passed through the ROI. This gives a problem in classification.
  • 50. 40 Chapter IV: Experiments, Results and Discussion  Vehicle passing through portion of ROI: In this case, the vehicle may not be detected.  Fixed camera: The approach provides less performance in case of not well fixed camera. This may cause a problem in vehicle detection, and classification. The system can miss the vehicle or recount it. Also it can classify the big vehicle as small vehicle. 4.6 Conclusion In this chapter, the proposed approach for ITS is presented. Interesting results have been obtained for vehicle detection, counting, classification, and speed estimation.
  • 51. 41 General Conclusion General Conclusion In this report, our aim was to develop a smart traffic surveillance system, which is a main part of intelligent transportation systems. We started our work by giving a brief presentation of intelligent transportation systems and the smart surveillance systems, specifying the importance of smart traffic surveillance. Then, related works on smart traffic surveillance including detection, counting, and speed estimation, have been presented and discussed. We have found that common problems are related on illumination, shadow, noise, occlusion, and the image quality. These reasons motivated our work to propose an ITS. This last relies on selecting the region of interest (ROI) which considered as a simple line crosses the road placed separately at middle of each lane. Observations over the ROI are used to detect, count, classify, and estimate the instantaneous speed of vehicles. This system has been tested on real videos with various real constraints. Obtained results have been discussed in the la last chapter. Accordingly, we found that the approach provided encouraging results. The obtained accuracy ratio for vehicle detection, counting is over 97.3%, and 92.42% for vehicles classification. The proposed approach has the advantage of covering the problems of real-time, illumination variation, bad illumination, multiple car occlusions, blur effect, and noise. However, the proposed approach provides less performance when the camera is not well fixed or vibrates due to wind for example. This fact, affects the ROI and they change their position. That may cause some problems especially for vehicles detection. As perspectives and to continue this work, we suggest to:  Test the proposed system on long videos that contains more challenging problems.  Consider more classes in the classification step (small, medium, and big vehicles).  Acquire videos with ground truth to test deeply the speed estimation part.  Plan to build android application.
  • 52. i Appendices Appendix A "The Local Binary Pattern "LBP [38] Image visual descriptors describe the visual features of the content in image (videos). They describe elementary characteristics such as the color, the shape, the texture, or the motion. Local Binary Pattern (LBP) is a type of image descriptors used for texture analysis robust against illumination changing. The basic LBP is computed following these steps:  Divide the examined window into cells.  Each pixel in a cell is compared to its neighbors. Follow the pixels along a circle of a radius r.  Select the center pixel as the threshold.  If the threshold value is greater than the neighbor's value, it is replaced by "0" otherwise, by "1". This gives digit binary number. It is called the pattern.  Construct the weight matrix.  Calculate the LBP coefficient by the sum of all weight that have value 1 in the code pattern.  Finally the histogram of all LBP values is used to characterize the texture of the image. Let’s explain more formally with the following example: Consider we have the following cell of size 3*3: The threshold is the center pixel (60). Any intensity less than 60 in a circle or radius 1 takes value 0. Otherwise, it takes value 1. After the thresholding the cell is being: The pattern code =11110001 and the weight matrix is: The LBP is calculated from the pattern code by summation of all weights having value 1 as follow: LBP=1+16+32+64+128=241.
  • 53. ii Appendices Appendix B: Image processing techniques: Herein, we will present a brief explanation for each image processing technique used in the presented state of the art related on smart traffic surveillance. 1. Image segmentation [40][41][42]: In image processing and computer vision, image segmentation is the process of partitioning a digital image into multiple segments. When we segment an image, we generally separate the foreground (object) from background. The purpose of image segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is applied in several applications: medical imaging, machine vision, video surveillance, object detection, and tracking ...etc. There are many methods of image segmentation: edge detection, thresholding, region growing, clustering, morphological watersheds...etc. i. Thresholding: is very used method in segmentation. The disadvantages of this method are:  The segmentation region might be smaller or larger than the needed information  The edges of segmented region might not be connected. We will described later in more detail. ii. Edge detection: is a set of mathematical methods, which aim to identify points in a digital image at which the image brightness change sharply. This method has problem with images that loss their edges, with noise, and boundary that are very smooth. The disadvantages of this method are:  The segmentation region might be smaller or larger than the actual.  The edges of segmented region might not be connected. We will describe later briefly the concept of edge detection. iii. Morphological watersheds: Watershed algorithm is a mathematical morphological method for image segmentation, based on region processing. The principal objective of segmentation algorithms based on these concepts is to find the watershed lines. We will describe later briefly the concept of morphological image processing. iv. Region growing: This approach of segmentation examines neighboring pixels of initial ―seed points‖ and determines whether the pixel neighbors should be added to the region or not. The process is iterated on, in the same manner as general data clustering algorithms. The disadvantages of this method are:  The computation is consuming, no matter the time or power.  Noise or variation of intensity may result in holes or over segmentation.
  • 54. iii Appendices  It may not distinguish the shading of the real images. All techniques of extraction the foreground and registration foreground are parts of image segmentation. 2. Thresholding [43][44] Thresholding is used to extract areas that correspond to significant structures in an image and to focus analysis on these areas. The following equation shows the thresholding method: g(x,y)={ 𝑓( ) 𝑓 𝑓( ) 𝑇 𝑓( ) 𝑓 𝑓( ) 𝑇 }……..(eq1) Where f(x,y) is the image before the thresholding, g(x,y) is the image after the thresholding , T is the threshold, and M and N are fixed values depend to the application require. The threshold T may be fixed manually or automatically. There are three types of thresholding algorithm:  Global thresholding: The threshold T depends only on the gray level image f(x, y) and the value of threshold T solely relates to the character of pixels. Otsu's method and iterative method are classified as global thresholding algorithm [42]  Locally thresholding: The threshold T depends only on the intensity of pixel p(x, y) and the intensities of neighborhood pixels. Mean, median and med-grey methods are classified on locally thresholding algorithm.  Adaptive Thresholding: The threshold T depends on the gray level image f (x, y) and the intensity of pixel p (x, y), and the intensities of neighborhood pixels. Niblack and Savoula methods are classified as adaptive thresholding algorithm [42]. Thresholding methods can be categorized into five groups according to the information that the algorithm manipulates. i. Histogram shape based method: Histogram based thresholding is applied to obtain all possible uniform regions in the image. It can be bimodal or unimodal or any shape. Figure5.1: Histogram shape
  • 55. iv Appendices In case of bimodal, the threshold could be selected in valley between two peaks. But if the histogram is unimodal, it is difficult to select the threshold. ii. Clustering based methods: the grey level samples are clustered into two parts as background and foreground or alternately are modeled as a mixture of two Gaussians. iii. Entropy based methods: result in algorithms that use the entropy of the foreground and background regions, the cross-entropy between the original and binarized image, etc. iv. Object attribute based methods: search a measure of similarly between the grey- level and the binarized images, such as fuzzy shape similarity, edge coincidence, etc. v. Spatial methods: us higher-order probability distribution and/or correlation between pixels. 3. Mathematical morphology [45] It is also called morphological filtering, provides an effective tool for image processing and computer vision. This methodology is widely used to decompose image, to detect edge, to suppress noise, and also in shape representation. Morphological image processing is nonlinear transformation that locally modifies the geometric features of images. The common morphological operations are:  Shrinking the foreground (erosion).  Expanding the foreground (dilation).  Removing holes in the foreground (closing).  Removing stay foreground pixels in background (opening). Let's A be an input image and B the structuring element. The structuring element B is a binary image/mask that allows us to define arbitrary neighborhood structures. Note that the binary image has only two values '0' or '1' so 'a' and 'b' have values '0' and '1'. Grey level image has values from '0' to '2n -1', so u,v,i,j belong to [0, 2n -1] 1. Erosion/Dilation:  Dilation: The dilation of A by B is denoted by A B. For binary image: A B =U a ϵ A{b + a | b ϵ B}. For grey level image: A B=max(I,j) ϵ H{A(u+i,v+j)+B(i,j)}  Erosion: is the morphological dual of dilation. It is transformation that combines two sets by using containment as its basis set. The erosion of A by B is denoted by AϴB. For binary image: AϴB={a| a + b ϵ A for every b ϵ B }. For grey level image:AϴB=min(i,j) ϵ H{A(u+i,v+j)+B(i,j)} Dilation has properties of commutative and associative. However erosion is neither commutative nor associative. Erosion can be computed as a dilation of the background: AϴB= (A B)c Same duality for dilation: A B =( AϴB)c .
  • 56. v Appendices 2. Opening/Closing:  Opening: The opening image of A by structuring element B is denoted by A◦B. Thus, the opening of A by B is the erosion of A by B, followed by a dilation of the result by B. For binary image: A◦B = (AϴB) B. For grey level image: A◦B = (AϴB) B.  Closing: The closing image of A by structuring element B is denoted by A●B. Thus, the closing of A by B is simply the dilation of A by B followed by the erosion of the result by B. For binary image: A●B =(A B) ϴ B. For grey level image: A●B =(A B) ϴ B. The opening and closing are duals of each other with respect to set complementation and reflection. That is: (A ● B)c =( Ac ◦ Ḃ) 3. The filtering [46] In signal and image processing, a filter is a process that removes from a signal some unwanted features. The defining features of filters being the complete or partial suppression of some aspect of the signal. Most often, this means removing some frequencies and not others in order to suppress interfering signals and reduce background noise. In signal and image processing, there are four types of filters:  Low pass filter: is a filter that passes signals with a frequency lower than a certain cutoff frequency (cutoff distance) and attenuates signals with frequencies higher than the cutoff frequency.  High pass filter: is a filter that passes signals with a frequency higher than a certain cutoff frequency (cutoff distance) and attenuates signals with frequencies lower than the cutoff frequency.  Band reject filter: is a filter that passes most frequencies unaltered, but attenuates those in a specific range to very low levels.  Band pass filter: is filter that passes frequencies within a certain range and rejects frequencies outside that range. In image processing, the filtering categorizes into two domain:  Spatial domain: the process in spatial domain is based on direct manipulation of pixels of an image using a mask, which is a small 2D array in which the value of the mask coefficient determines the nature of process.  Frequency domain: the process in frequency domain is based on modifying the Fourier transform of an image. The disadvantages of applying filtering algorithm on video surveillance are:  There is no general method for image filtering. Because doing any filtering you must know the type of noise that you have.  Doing filtering consumes much more time on video processing.
  • 57. vi Appendices Kalman filter [47]: is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces an estimation of unknown variables that tend to be more precise than those based on a single measurement alone. 4. Edge detection [48] We have seen definition and disadvantages of using edge detection. In this part, we give a brief explanation about how to detect edges. The process of edge detection consists of three main steps:  Noise reducing: due to the first and second derivative's great sensitivity to noise, the use of image smoothing techniques before applying the edge detection operator is strongly recommended.  Detection of edge points: here local operators that respond strongly to edges and weakly elsewhere are applied to the image, resulting in an output image whose bright pixels are candidates to become edge points.  Edge localization: here the edge detection results are post processed, spurious pixels are removed, and broken edges are turned into meaningful lines and boundaries. Edges are detected by using mathematical operators. The simple edge detector is using the gradient operator. We compute gradient vector at each pixel by convolving image with horizontal and vertical derivative filters. Then we compute gradient magnitude at each pixel and if the magnitude at a pixel exceeds a threshold report a possible edge point and finally the direction of the edge at each pixel is perpendicular to the gradient vector at each pixel. Other common operators are:  Robert operator: in order to perform edge detection with the Roberts operator we first convolve the original image, with the following two kernels: and  Prewitt operator: is equivalent of using mean filter then the first derivative. In order to perform edge detection with the Prewitt operator we first convolve the original image, with the following two kernels: and  Sobel operator: is equivalent of using Gaussian filter then the first derivative. In order to perform edge detection with the Sobel operator we first convolve the original image, with the following two kernels: and We note that the Robert, Prewitt, and Sobel operators detect the horizontal and vertical edges.
  • 58. vii Appendices  Kirsch operator [49]: the Kirsch operator or Kirsch compass kernel is a non-linear edge detector that finds the maximum edge strength, which is the maximum value, found by the convolution of each mask with the image. The Kirsch mask are defined as follow: N= As we have said before the edge magnitude is the maximum value found by the convolution of each mask with image. Moreover, the edge direction is defined by the mask that produces the maximum magnitude.  Canny edge detector [50]: is an edge detection operator that uses a multi- stage algorithm to detect a wide range of edges in images. The Process of Canny edge detection algorithm can be broken down to 5 different steps: o Smooth the image with Gaussian filter. o Compute the gradient magnitude and orientation. o Non-maximum suppression: can help to suppress all the gradient values to 0 except the local maximal, which indicates location with the sharpest change of intensity value. The algorithm for each pixel in the gradient image is:  Compare the edge strength of the current pixel with the edge strength of the pixel in the positive and negative gradient directions.  If the edge strength of the current pixel is the largest compared to the other pixels in the mask with the same direction, the value will be preserved. Otherwise, the value will be suppressed. o Apply double threshold TH and TL(usually TH=2*TL) to determine potential edges. o Track edge by hysteresis: Finalize the detection of edges by suppressing all the other edges that are weak and not connected to strong edges.  If the gradient at a pixel is above TH, declare it an edge pixel.  If the gradient at pixel is TL, declare it an non edge pixel.  If the gradient at a pixel is between TL and TH then declare it an edge pixel if and only if it is connected to an edge pixel directly.
  • 59. viii List of Communications List of Communications F.Kerouh, D.Ziou, and A.Bouaicha: "Real-time vehicles detection and counting for intelligent transportation systems". Accepted for oral presentation in Colloquium on Optimization and Information Systems "COSI", (May2016).
  • 60. ix References References [1] S.Bhatkar, M.Shivalkar, B.Tandale, and P.S.Ooshi.:"Survey of various methods used for speed calculation of a vehicle", International journal on Recent and Innovation Trends in Computing and communication, Vol 3, issue3, pp 1558—1561, (March2013). [2] F.Kerouh and A.Serir.:"An adaptive deblurring method based on Multiplicative Multiresolution Decomposition". European workshop on vision and image processing. pp88—93,(june 2013). [3] A. D. Joseph, A. R. Beresford, J. Bacon, D. N. Cottingham, J. J. Davies, B. D. Jones, Haitao Guo, Wei Guan, Yong Lin, Houbing Song , L. Iftode, S. Fuchs, B. Lamprecht, K. Kyamakya, J. G. Fernandez, J. C. Yelmo Garcia, Y. S. Martin Garcia, J. de Gracia Santos, M. Nimesh, Gang Pan, Zhaohui Wu, Qing Wu, Zhenyu Shan, Jie Sun, Jian Lu, Guoqing Yang, M. K. Khan, Jiashu Zhang.: "Intelligent transportation systems". IEEE Pervasive Computing Vol 5 N°4, pp63—67, (Decenmber 2006) [4] H.Emami, M.Fathy, and K.Raahemifar.: " Real time vehicle make and model recognition based on hierarchical classification". International Journal of Machine learning and computing Vol 4 N°4, 142--145 (April 2014). [5] I.Masaki.: ''Machine-vision systems for intelligent transportation system", IEEE intelligent systems, Massachusetts Institute technology, pp 24—31, 1998. [6] S.Ezell.: "Intelligent transportation systems". The information technology and innovation foundation, (January 2010). [7] M.Kumar and S.Albert.: "A Summary of Rural Intelligent Transportation Systems (ITS): Benefits as applied to ODOT Region 1". Oregon Department of Transportation Region 1. (April 2005). [8] L.Figueiredo, I.Jesus, J.A.T.Machoda, J.R.Frerreira, and J.L.M.de Carvalho. :"Toward the development of intelligent transportation systems". 2001 IEEE Intelligent Transportation Systems Proceedings, pp1206—12011,(August 2001). [9] http://www.roadtraffic-technology.com /contractors/traffic_man/transdyn/ transdyn2.html, (june 3rd 2016) [10] J.Noonan and O.Shearer.: "Intelligent transportation systems field operation cross-cutting study Advanced Traveler Information systems ", Report No° FHWA-JPO-99-038, U.S. Department of Transportation, (September 1998).
  • 61. x References [11] P.Bahatia.: "ITS/Commercial Vehicle Operations". University of California transportation center, (2003). [12] http://www.always-on.eu/solutions.php?pid=4, (june 3rd 2016) [13] R.F. Casey, L.N. Labell, L.Moniz, J.W. Royal, M.Sheehan, T.Sheehan, A. Brown1, M.Foy, M.Zirker, C.L.Schweiger, B.Marks, B.Kaplan, and D.Parker.: "Advanced Public Transportation Systems", U.S.A Department of Transportation TT050/U0197, (December 2000). [14] A.H. Argyropoulos, M.Baker, S.A.Barsony, G.S.Bridgws, L.W.Darnes, P. Davies, N.Emmott, P.Fancher, R.E.Fenton, T.Griest, T.Howell, R.Knipling, T.P.Kozlowski, M.E.Krueger, R.C.Lavigne, W.A.leasure, M.Lill, B.Mc Call, L.Minor, M.Readunger, C.Robirds, D.Savitt, D.Schmidtt, S.E.Shladover and J.Vostrez.:"Advanced Vehicle Control Systems (AVCS)". U.S.A Department of Transportation, (March 1990). [15] "Advanced Rural Transportation Systems (ARTS), Strategic Plan". U.S.A Department of Transportation, (August1997). [16] H.Kruegle.: "CCTV surveillance", Elsevier, second edition, (2007). [17] https://www.itech-ny.com/blog/bid/277054/Can-I-Use-My-Security-Camera-Images-as- Evidence-in-Court, (June 3rd 2016) [18] H.A. Kurdi.: "Review of Closed Circuit Television (CCTV) Techniques for Vehicles Traffic Management". International Journal of Computer Science & Information Technology (IJCSIT) Vol 6, No 2, pp199—206, (April 2014). [19] E.Komagal, A.Vinodhini, A.Srinivasan, B.Ekava.: Real time Background Subtraction techniques for detection of moving objects in video surveillance system. Computing, Communication and Applications (ICCCA), (February 2012). [20]http://www.123rf.com/photo_29021394_cctv-camera-or-surveillance-operating-on- traffic-road.html. (June 3rd 2016). [21] P.M.Daigavan and P.R.Baja.: Real time vehicle detection and counting method for unsupervised traffic video on highways, International Journal of Computer Science and Network Security Vol 10, N°8, 112—117, (August 2010). [22] M.liang, X.Huang, C.H.Chen, X.Chen, and A.Tokuta.: Counting and Classification of Highway Vehicles by Regression Analysis. IEEE Transaction on Intelligent Transportation System. Vol 16, N°.5, 2878—2888, (October 2015).