Sie sind auf Seite 1von 9

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

net/publication/265481813

VEHICLE DETECTION USING IMAGE PROCESSING FOR TRAFFIC CONTROL


AND SURVEILLANCE SYSTEM

Article

CITATIONS READS

2 4,630

2 authors, including:

Riza ATIQ Rahmat


Universiti Kebangsaan Malaysia
156 PUBLICATIONS   749 CITATIONS   

SEE PROFILE

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

IRPA Ministry of Science, Technology and Innovation, Malaysia View project

Predicting car drivers’ intention to use low cost airlines for intercity travel in Libya View project

All content following this page was uploaded by Riza ATIQ Rahmat on 01 June 2015.

The user has requested enhancement of the downloaded file.


VEHICLE DETECTION USING IMAGE
PROCESSING FOR TRAFFIC CONTROL
AND SURVEILLANCE SYSTEM

Riza Atiq bin O.K. Rahmat,


Assoc. Professor, Faculty of Engineering,
Universiti Kebangsaan Malaysia, 43600 Bangi, Malaysia.
Phone: 60-3-89296227, Fax: 60-3-89252546, e-mail: riza@eng.ukm.my

Kasmiran bin Jumari,


Assoc. Professor, Faculty of Engineering,
Universiti Kebangsaan Malaysia, 43600 Bangi, Malaysia.
Phone: 60-3-89296193, Fax: 60-3-89254675, e-mail:kbj@pkrisc.cc.ukm.my

SUMMARY
Surveillance cameras are normally installed at major road links and intersections in urban
area for observation by human operators. Instead of limiting the function of the cameras for
these purposes, the images from the cameras can be captured and analysed for further
decision making processes. This paper suggests image processing algorithms for traffic
counting, queue length, speed measurement and vehicle classification. Traffic counting
algorithm adopted in this study is carried out by observing changes in pixels values in the
middle of traffic lanes. The queue length measurement, vehicle classification and
determination of speed, a single line of pixels placed along a traffic lane are observed. The
pattern of these pixels values are used to measure the queue length, length of individual
vehicle and to detect the position of a particular vehicle within a short interval of time.

INTRODUCTION
Most traffic control systems in the world use point-based inductive loops as the sensor.
During normal condition where traffic flows are not exceeding approach road capacity, the
current traffic control systems are performing satisfactorily. However, during traffic
congestion periods, it is frequently observed that the queue length at approach roads in most
intersections become imbalance. This problem is partly due to the inability of the point-
based inductive loops to measure the queue length.

As a way of solving this problem, surveillance cameras have often been installed at major
intersections for observation and intervention by human operators. Instead of limiting the
usage of the camera for these purposes, the images from the camera can be analysed by
employing image processing technology. This paper suggests algorithms for traffic counting
and classification as well as queue length and speed measurement.

1
IMAGE PROCESSING
The basic components of the image processing system used in this study are video camera
which produces composite signals, image grabber to digitised the signals and a Windows
based computer. In this study, each video frame is digitised into 350 X 286 RGB (Red Green
Blue) picture elements or pixels. Each pixel is assigned an integer value for each colour
representing the light intensity. The value is between 0 for black and 255 for white (1).

Once stored in the memory, the image can be considered as an array of integer numbers.
Software can therefore be written to manipulate data to extract information for the image or
sequence of images, and thereby realise the image processing function (2).

Colour images were used in this study because it is easier and cheaper to get equipment for
colour images than that of the grey scale. At the same time it is easier to detect front and rear
edges of a high speed vehicle using colour images..

EXISTING IMAGE PROCESSING ALGORITHMS


FOR TRAFFIC DETECTION
Digitised video images usually contain enormous amount of data. A stream of more than 7
Mbytes of data per second will be transmitted by a typical 350 X 286 pixel RGB video
images at the rate of 15 frames per second (1). This amount of data is far too large for a
normal Pentium based computer to handle and therefore impossible to be carried out in real-
time. Since the traffic detection system must be capable of working in real time, data
reduction techniques are employed by processing the pixels only at the predefined area where
vehicles are visible in the image. In the case of the loop emulator developed by Rourke and
Bell (3), the algorithm processes only pixels in small defined windows, thereby reducing the
data to 1 / 1,500th of the original data.

For congestion and queuing detection, Rourke and Bell (2) and Versavel and Boucke (4) have
proposed an algorithm that analyse data from a window consisting of a single line of pixels
placed along a traffic lane. In the Rourke and Bell, the algorithm processes the data only once
every few seconds using the Fast Fourier Transformation.

Cypers et al., (5) have developed a queue detection system called Camera and Computer
Aided Traffic Sensor (CCATS) which process pixels in programmable windows within the
digitised image. Hoose (6) and Hoose et al., (7) developed an incident detection system for
highways and urban roads known as IMPACTS by analysing pixels in a number of cells
which divided up an image in a cycle of 1 to 5 seconds.

Michalopoulos et al., (8) have developed an automatic incident detection system through
video image processing by observing pixels on detection lines drawn across traffic lanes.
The detection lines exist only on the monitor and not in the pavement and they can be easily
removed or adjusted. Every time a vehicle passes through these lines, a detection signal in the
form of changes in pixels value, is generated which is similar to the signal produced by loop
detectors. Thus, the system with one camera can easily replace many loop detectors.
Currently the image processing based incident detection system is gaining acceptance as a
more effective tool than the conventional inductive loop detectors Michalopoulos et al., (9)

2
PROPOSED ALGORITHMS
Image processing in this study is developed for use as traffic control sensor to obtain
multilane traffic volume, queue length and down stream congestion that may obstruct traffic
flow exiting a particular approach. The algorithm must be sufficiently efficient for real time
processing by a Pentium based computer.

Traffic Volume Counting


For traffic counting, the algorithm adopted in this study is developed by observing a few
pixels for each traffic lane, which are considered as detectors as shown in Figure 1. The pixel
values will surge or shrink drastically every time a vehicle passes the detectors. A computer
programme is then written to count this surge or shrinkage.

300
A bright coloured
250
vehicle is passing
pixel value

200

150

100 A dark coloured


vehicle is passing
50
11
16
21
26
31
36
41
46
51
56
61
1
6

Time (second)

Figure 1: The location of the observed pixels and the fluctuation of a detection pixel value.

Queue Length Measurement


In the queue length measurement, pixels along a single line in the middle of a traffic lane are
observed. Pixels which are almost uniform in values correspond to the road surface and
hence no vehicle. On the other hand variation in pixel values indicates the presence of objects
of different colours. In the first step the algorithm uses this phenomena to determine whether
the image at the specific window is the road surface or vehicles. The decision is made that
vehicles occupy the road when the standard deviation of the pixel values is more than 30% of
the average value.

If the road is occupied by vehicles, the algorithm compares pixel values from two frames of 5
second intervals. The comparison is carried out segment by segment of 10 pixels long.
Assuming that an ordinary car will take about 6 meters of road length during queuing, the
pixels along the detector line can be calibrated with a simple trigonometry technique to get
the number of vehicles queuing in term of ‘passenger car units’.

3
Correlation between two sets of pixel values from two frames of the same segment is
calculated for every 5 seconds. If the correlation, R2, is more than 0.9 then the algorithm will
decide that a queue occurs in that particular segment. Figure 2 shows the comparison of two
frames of 5 seconds interval.

250

200

Pixel value
150

100
Almost identical pixel
50 patern
0
1 11 21 31 41 51 61 71
Distance (m)

250

200
Pixel value

150

100

50

0
1 11 21 31 41 51 61 71
Distance (m)

Figure 2: Comparison of pixel values from two frame of 5 seconds interval

Classification and Speed


Classification is carried out by measuring the vehicle length. First, a vehicle was detected
using the pixels value in the middle of the traffic lane as shown in Figure 3. The vehicle
length was measured using the pixels value along the parallel line and a simple trigonometry
calculation (1).

The speed is determined by detecting the front edge of a particular vehicle in two video
frames of known interval. The travel distance between two frames was measured using the
pixels value along a parallel line with the traffic flow in the middle of the traffic lane as
shown in Figure 4. Time interval between the two frames is 0.25 second and the calculated
travel distance is 5.9 meters. Therefore the speed is approximately 85 km/h.

4
300

250

Pixel Intensity
200

150

100
50 4.3 m
0
1 11 21 31 41 51 61 71 81
Distance (1 unit = 0.2 meter)

Figure 3: Classification of a Vehicle Based on Its Length.

5.9 m

Figure 4: Speed Measurement by comparing two frames of 0.25 second interval

5
EXPERIMENTAL RESULTS
The experiment for the traffic counting algorithm was carried out at Jalan Raja Laut
intersection with Jalan Isfahan, Kuala Lumpur. The result was compared with that of manual
counting. Assuming that manual counting is correct, in general the automatic counting is
very close to the manual counting. Statistical analysis shows that both counting are correlated
closely to each other with R2 = 0.995 during day time and R2 = 0.98 during night time.

Closer inspection reveals that the main reason for the error during the day time is due to
pedestrians passing through the detectors causing the detector pixels to fluctuate. Besides
that, vehicles of the same colour with that of the road surface, will not be detected.

It was noted that in the early morning or late afternoon when the sun is very low, the back
lighting effect reduces the clarity of the image especially for east-west direction. Steeper
camera angles can reduce this effect.

During the night, vehicle head lights, especially with high beam, occasionally caused the
camera to run out of focus. During this period of time, the detection became irrational. This
problem can be solved with higher camera position and steeper camera angle to avoid direct
light from the vehicle head lights. In this study the camera was positioned approximately 10
meters from the road surface at an angle of 35o from horizontal and it was found out to be
sufficient to avoid sun light and normal vehicle head light.

Experiment for queue length measurements was carried out at the intersection of Jalan Sultan
Ismail with Jalan Tuanku Abdul Rahman, Kuala Lumpur. Comparison of the number of
vehicle queuing obtained automatically with manual counting for 20 cycles of the traffic light
shows both data are closely correlated to each other with R2 = 0.92 during day time and R2 =
0.80 during night time. Closer inspection of queues revealed that one or two very slow
moving vehicles at the distant end of the queues were recorded by the manual enumerator as
queue but the algorithm considered the vehicles as moving objects and therefore were not
part of the queues. Long vehicles such as buses and lorries are also a source of error. While
the enumerator counts such vehicle as one queued vehicle, the algorithm counts it as more
than one since it takes more than 6 meters of road space.

Experiment for classification and speed measurement were carried out at the North-South
Highway near Kajang Interchange. Classified volume counts obtained by the image
processing are compared with that of manual counts. Again both data are closely correlated
to each other with R2 = 0.99 during day time and R2 = 0.96 during night time. Most of the
error happened when the vehicles travel at the speed greater that 150km/hr, and when the
frame grabber rate is set at 8 frames/second, such vehicles sometimes cannot be detected.

Experiment to measure travel speed was carried out using a test car. Assuming the
speedometer is correct, the speeds of ten passes of various speeds measured by the image
processing were comparable with the speeds obtained from the speedometer. Coefficient of
determination (R2) between the two data sets are 0.99 during day time and 0.89 during night
time.

6
CONCLUSIONS
The image processing algorithms to obtain multilane traffic volumes and queue length using
a single camera at an intersection mentioned above are fast and efficient enough to be
executed by a Pentium based computer. A single camera with four algorithms (ie. traffic
volume, queue length, classification and speed measurement) can replace many inductive
loops, thus making wide area detection cost effective. For traffic control, the algorithms are
able to provide two more parameters in addition to the traffic volumes, namely, down stream
congestion and the queue length at approach roads, thus a more effective controller can be
developed.

During the experiment it is found out that the camera position is very crucial in getting
accurate data. Higher camera position and steeper camera angle are necessary to avoid direct
sun light and vehicles head light.

This study is carried out using Pentium II 400 based computer, multimedia video blaster as
the image grabber and colour CCTV camera. These equipment are readily available in the
market with relatively low priced. In addition, the computer is also used as the traffic
controller. There is another advantage when using a computer based system, in which they
can be easily networked for co-ordination between intersections as normally required in
Urban Traffic Control system.

Acknowledgement
The authors gratefully acknowledge Ministry of Science, Technology and Environment for
funding this research and Universiti Kebangsaan Malaysia for generous assistance
throughout this research project.

References
(1) R. A. Rahmat, K. Jumari, A. Hassan and H. Basri; “Image Processing for Traffic
Surveillance System”, To be presented at Second International Conference on
Advances in Strategic Technologies, Kuala Lumpur, August, 2000.

(2) A. Rourke and M.G..H. Bell; “Queue detection and Congestion Monitoring Using
Image Processing”; Traffic Engineering and Control; 32(9); London; 1991; 412 –
421.

(3) A. Rourke and M.G..H. Bell; “Application of low-cost image processing technology
in transport”; Proceeding of 5th World Conference on Transport Research;
Yokohama; 1989; 67-77.

(4) J. Versavel and B. Boucke; “Vedeo for Traffic Data & Incident Detection by
Traficon”; Proceding of 5th International Conference on Application of Advanced
Technologies in Transportation; California ; 1998; 33 – 40.

7
(5) L . Cypers, G. Kolancny, J. M. Poncelet, P. Vervenne, F. Lemaire and F. De Jaegere,
“CCATS. The image processing-based traffic sensor. Traffic Engineering & control
31(6); London; 1990; 371 – 375.

(6) N. Hoose; “IMPACTS: An image Analysis Tool for Motorway Surveillance”; Traffic
Engineering & control 33(3); London; 1992; 140 – 147.

(7) N. Hoose, M.A. Vicenci, and X. Zhang; “Incident Detection in Urban Roads Using
Computer Image Processing”; Traffic Engineering & control 33(4); London; 1992;
236 – 244.

(8) P. G. Michalopoulos, R. D. Jacobson, C. A. Anderson and T. B. DeBruycker;


“Automatic Incident Detection Through Video Image Processing”; Traffic
Engineering & control 34(2); London; 1993; 66 – 75.

(9) P. G. Michalopoulos and D. Panda; “Recent Advances in Implementation of Machine


Vision Technology in Freeway”. Proceding of 5th International Conference on
Application of Advanced Technologies in Transportation; California; 1998; 233 –
246.

View publication stats

Das könnte Ihnen auch gefallen