Vision Based Vehicle Speed Measurement S

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

Journal of Computer Applications (JCA)

ISSN: 0974-1925, Volume V, Issue 3, 2012

Vision-Based Vehicle Speed


Measurement System
Prakash.V a,*, Devi.P b,1

Abstract - Vision-based vehicle speed measurement time and space. Proposed system consists of 5 steps to
(VSM) is one of the most convenient methods available in estimate mean speeds:
intelligent transportation systems. A new algorithm for (1) Camera calibration from image to world co ordinate
estimating individual vehicle speed based on two transformation to generate velocity fields,
consecutive images captured from a traffic safety camera (2) Video stabilization to decrease unwanted camera
system. Its principles are first, both images are motion in the video sequence,
transformed from the image plane to the 3D world (3) Pre-processing using edge removal apply image
coordinates based on the calibrated camera parameters. enhancement for background estimation and shadow
Second, the difference of the two transformed images is removal,
calculated, resulting in the background being eliminated (4) Background estimation and shadow removal,
and vehicles in the two images are mapped onto one (5) Cubic spline interpolation for trajectory
image. Finally, a block feature of the vehicle closest to the approximation.
ground is matched to estimate vehicle travel distance and The overall intention is to implement a vision-based speed
speed.
sensor considering occlusion caused by overlapping vehicles.
It is handling the occluders rather than the occluded vehicles.
Index Terms – images, vehicle, vehicle speed measurement.
For almost two decades these CCTV systems were strictly
used to extend the view available to human traffic managers.
I. INTRODUCTION The objective behind these video-based traffic surveillance
Intelligent transportation systems are becoming more systems is to extract important traffic parameters for traffic
important due to their advantages of saving lives, money, and analysis and management such as vehicle speed, vehicle path,
time. Acquiring traffic information, such as lane width traffic flow rate and density. Vision-based vehicle detection is
volume (the number of travelling vehicles per time period intended to be a lower cost alternative to many other detector
through a position in a lane), traffic density (the number of technologies, e.g., loop detectors. Loop detectors are
total vehicles in a given area at a given time) and vehicle essentially metal detectors embedded in the pavement, and
speed, these are the key part of intelligent transportation have been the most common detector to record traffic
systems, and such information is used to manage and control parameters. Depending on deployment these detectors can
traffic. It focuses on vehicle speed since reducing speed can collect information such as vehicle length, speed and flow
help to reduce accidents. rate. However, loop detectors only detect vehicles directly
Intelligent transportation systems is a new approach to overhead. In contrast, vision-based systems collect
estimate vehicle speed using video sequence data recorded information over an extended space compared to the
form roadway surveillance cameras under occlusion. Rather conventional vehicle detection systems.
than detecting or tracking individual vehicles in each image
frame as is conventionally done, It transform the sequence of II. BRIEF REVIEW OF VISION – BASED VEHICLE SPEED
frames into a graphical representation of vehicle trajectories MEASUREMENT SYSTEMS
using time stacks. Where a time stack is constructed from a The block diagram of the proposed algorithm is depicted in
video sequence out of temporally successive slices of the Fig. 1. To begin with, the two consecutive images taken
same 1D region in the frame. Most vision based traffic through a perspective view are transformed from their 2D
monitoring systems (VBTMS) attempt to detect and track image plane to 3D world coordinates using camera
discrete vehicles. But such segmentation and tracking is parameters calculated from lane-marking calibration. As there
hampered by occlusion, changes in lightning conditions and is no height information immediately available from the two
images, only the X-Y plane in 3D is considered for all
shadows. Many Solutions have been developed, Segmenting
subsequent estimation. From the two reconstructed images, an
discrete vehicles for detection and tracking in video is
image differencing is applied so that the two vehicles are
difficult, measuring the speed of vehicle features is much
overlaid on one resultant image. Although this can effectively
simpler and so this work seeks to bypass the need for remove the background features as the time difference
segmenting each vehicle when measuring traffic speed over between the two images is small, it also resulted in a large
amount of noise and holes along the boundaries of the
vehicles. These are removed by a carefully selected threshold
Manuscript received 8/Sept/2012.
Manuscript selected 11/Sept/2012. and morphological operations to obtain a combined vehicle
mask. After that, a block matching algorithm is applied, which
Prakash.V ,Sri Ramakrishna Institute of Technology , Coimbatore, India includes specifying the block and matching it within a search
E-mail: [email protected] window. As the 3D X-Y plane is given in physical dimension
Devi.P, Assistant Professor, Dept of ECE, Sri Ramakrishna Institute of
Technology , Coimbatore, India, E-mail: [email protected]
(meters in this case), he distance between the two matched

82
Vision-Based Vehicle Speed Measurement System

blocks denotes the distance traveled by the vehicle between Let Q= (XQ, YQ, ZQ) be an arbitrary point in the 3-D world
the two consecutive images. Speed is then estimated by taking coordinate and q=(xq,yq) be the corresponding 2-D image
this value and dividing it by the time taken between the two coordinates of Q. A forward mapping function,
images.

Figure 3. Image Reconstruction

Figure 1. Diagram of the Proposed Algorithm Which defines the transformation from a point in the world
coordinates to a point in the image coordinates is given as,
Camera Calibration
The purpose of camera calibration is to establish a
relationship between the 3-D world coordinates and the
corresponding 2-D image coordinates.

Position of Camera

Figure 2. Position of Camera

It adopts the camera model proposed in which is depicted in


Fig. 2. In essence, this model describes all the extrinsic
parameters (camera installation height, installation angle,
image plane and swing angle) and an intrinsic parameter
(focal length). Equations define the transformation between the world and
image coordinates.
Image Reconstruction
The definitions of these parameters are: P an angle is the
horizontal angle from the Y axis of the world coordinate
system to the projection of the optical axis of the camera on
the X-Y plane measured in the anti-clockwise direction. Tilt
angle is the vertical angle of the optical axis of the camera
with respect to the X-Y plane of the world coordinate system.
Swing angle is the rotational angle of the camera along its Figure 4. Two consecutive images
optical axis. Focal length is the distance from the image plane Lane markings that form a parallelogram can be used to
to the centre of the camera lens along the optical axis of the estimate the camera parameters, from which Equations can be
camera, while camera height is the perpendicular distance solved. In other words, every pixel of the two consecutive
from the centre of the camera lens to the X-Y plane. images can be transformed to the 3D coordinates (with Z=0)
These parameters can be estimated using existing road lane using Equations , and the corresponding images in X-Y plane
markings without having to measure them physically. Without can be reconstructed, the view along the Z-axis perpendicular
detailed derivation, the mapping between the image plane and to the road plane, the distance traversed by the vehicle
world plane is quoted below. represents the actual distance travelled. However, it should be

83
Journal of Computer Applications (JCA)
ISSN: 0974-1925, Volume V, Issue 3, 2012
noted that this is only true for points on the road plane. Other
points that are not on the road plane do not represent the same
as height information is not available. Therefore, the problem
in matching is not finding the most correlated blocks between
the two vehicle images as, but to make sure that the feature
points in the block are on the road surface as well. The most
reliable points in these images for the purpose are the points
where the wheels touch the ground. Unfortunately, these
points are extremely difficult to be determined. For the reason
the subsequent estimation is based on the shadow of the back
bumper that casts on the ground. Although this feature is
relatively easy to find, this is also represents a source of error (a) (b)
due to road colour change, illumination change and shadow. Figure 5. (a) Binary image after thresholding.
(b) Vehicle mask after morphological operations.
Background Componsation and Vehicle Detection
Separating the vehicle from the road (background) is a major In general, the case as depicted in Fig. represents a typical
issue in detecting a vehicle from a captured image. The scenario. By computing the connected components in the
background image is an image that contains no moving binary image, it has two blobs which represent the masks of
objects. As the road’s scene changes every second, it is two individual vehicles. From the distance of the bottom edge
impossible to get a consistent background image from a single of the two blobs, displacement of the vehicle in two
image and create the empty background image with a series of consecutive frames can be roughly estimated, which could be
images containing the moving objects to create an empty refined by block matching. However, for vehicles that are
background image from a few captured images. travelling at low speed, or have long length or the two
This algorithm uses the Gaussian mean and the standard consecutive images are taken at a shorter time.
deviation between pixels from each image to ignore the
absurd value pixels that represent the moving object. Block Matching
Background subtraction computes the inter frame difference In this Section, the block matching algorithm (BMA)
(IFD) between the background image and the incoming image estimates motion between two images or two video frames
from the camera. The result of the IFD process, i.e., the using "blocks" of pixels. First, a source block is defined in
foreground image, involves a black background with floating terms of a horizontal base line, a fixed height and a variable
vehicles. Image difference is a widely used method for the width according to the size of the mask. The blob shown in
detection of motion changes. The interframe difference (IFD) Fig.6 is part of the lower blob from the masking image, in
is calculated by performing a pixel-by-pixel subtraction which a horizontal base line is drawn across the lowest part of
between two images.. In particular, after creating the the blob. From the base line, an upper boundary of k pixel
background, displacements can be seen between the incoming above the line and a lower boundary also of k pixels below the
frames and the generated background. line are defined. As the upper boundary line intersects the
vehicle mask, the left and right boundaries are defined by the
Moving Region Extraction width of the mask intersected by the upper boundary line. This
If a background reference image is available, it can easily defines a source block of 2k×w in size.
extract the vehicle masks of each image and estimate the
vehicle position directly.
On the premise that no background reference image is
available, it regard one of the two images as a background
reference, then perform conventional vehicle mask extraction
on the other image and finally get an overlaid vehicle mask.

Morphological Process
A simple vehicle mask extraction method was adopted, which
includes three steps: temporal differencing, thresholding and
Figure 6. Definition of Source Block.
morphological operations. First, It overlay one image onto the
other by taking an absolute difference between the two
images. This results in the image as depicted in Fig.5(a). For With these boundaries, it has a block defined in the first
colour images and obtain the absolute difference in each reconstructed image as the source block. The search is
colour channel first and then average them to a gray level performed in the second reconstructed image. The mean
image. The image depicted in Fig. 5(a) is then threshold to absolute difference (MAD) measurement between the source
produce a binary image as depicted in Fig.5(b). The threshold, block and candidate blocks is employed as a criterion in
T, is a predefined value to accommodate small pixel intensity proposed matching algorithm and roughly estimated
variation. After that, morphological opening is used to clean displacement of the vehicle. The underlying supposition
up all the isolated points and morphological closing is used to behind motion estimation is that the patterns corresponding to
join the disconnected vehicle components together, resulting objects and background in a frame of video sequence move
in the extracted vehicle mask as shown in Figures. within the frame to form corresponding objects on the
subsequent frame. The idea behind block matching is to
divide the current frame into a matrix of ‘macro blocks’ that

84
Vision-Based Vehicle Speed Measurement System

are then compared with corresponding block and its adjacent of day-time images, the results estimated by the proposed
neighbours in the previous frame to create a vector that method and reference speed.
stipulates the movement of a macro block from one location
to another in the previous frame. This movement calculated IV. CONCLUSION AND FUTURE DIRECTION
for all the macro blocks comprising a frame, constitutes the In conclusion, a novel method for estimating individual
motion estimated in the current frame. The search area for a vehicle speed using two consecutive images from a traffic
good macro block match is constrained up to p pixels on all surveillance camera has been proposed. Compared with speed
fours sides of the corresponding macro block in previous from radar, the averaged estimation errors for day-time cases
frame. is 3.27%, while for night-time cases is 8.51%. Future work
will be focused on the block matching accuracy and the
robustness of the algorithm against large changes in ambient
illumination conditions.

REFERENCES
[1] C. Sun and S. G. Ritchie, "Individual vehicle speed estimation using
single loop inductive waveforms," Journal ofTransportation
Engineering-Asce, vol. 125, pp. 531-538, 1999.
[2] Y. H. Wang and N. L. Nihan, "Freeway traffic speed estimation with
single-loop outputs," Advanced Traffic ManagementSystems and
Automated Highway Systems 2000, pp. 120-126, 2000.
[3] D. L. Woods, B. P. Cronin, and R. A. Hamm, "Speed Measurement
Figure 7. Travel Distance Estimation with Inductance Loop Speed Traps.," Texas Transportation Institute.,
Research Report FHWA/TX-95/1392-8, 1994.
Velocity Measurement [4] K. W. Dickinson and R. C. Waterfall, "Video Image Processing for
Monitoring Road Traffic," in Proceeding of IEEInternational
Once a block is matched, travelled distance in pixels, PD, of
Conference on Road Traffic Data Collection, pp. 5-7, 1984.
the vehicle between the two images is represented by the [5] R. Ashworth, D. G. Darkin, K. W. Dickinson, M. G. Hartley, C. L.
distance between the source block and the matched block. Wan, and R. C. Waterfall, "Application of Video Image Processing for
Vehicle speed is the distance travelled normalized to physical Traffic Control Systems," in Proceeding ofSecond International
distance in m, and divided by the time taken to traverse that Conference on Road Traffic Control, vol. 14-18 London, UK, 1985.
[6] S. Takaba, M. Sakauchi, T. Kaneko, Hwang Byong Won, and T.
distance, which is given by, Sekine, "Measurement of traffic flow using real time processing of
moving pictures," in Proceeding of 32nd IEEEVehicular Technology
Conference, vol. 32, pp. 488-494 San Diego, California, USA, 1982.
[7] Z. Houkes, "Measurement of speed and time headway of motor vehicle
with video camera and computer," in Proceeding of 6thIFAC/IFIP
Conference on Digital Computer Applications toProcess Control, pp.
Where, PD - Travelled distance in pixels, 231-237, 1980.
R - Resolution of reconstructed images, [8] D. J. Dailey and L. Li, "An algorithm to estimate vehicle speed using
t - Time interval between the two images, uncalibrated cameras," in Proceeding of IEEE/IEEJ/JSAIInternational
v - Estimated speed Conference on Intelligent TransportationSystems, pp. 441-446, 1999.
[9] F. W. Cathey and D. J. Dailey, "One-parameter camera calibration for
traffic management cameras," in Proceeding of7th International IEEE
Conference on IntelligentTransportation Systems, pp. 865-869, 2004.
III. EXPERIMENTAL RESULTS [10] F. W. Cathey and D. J. Dailey, "A novel technique to dynamically
measure vehicle speed using uncalibrated roadway cameras," in
Proceeding of IEEE Intelligent VehiclesSymposium, pp. 777-782,
2005.

BIOGRAPHY
V. Prakash received the BE degree in Electronics and
Communication Engineering from Sri Ramakrishna
Institute of Technology, Anna University Coimbatore
in 2012. He is an active member of IETE. He had
presented national conferences and international
Figure 8. Speed of the vehicles conferences in various fields He had done the project
in the area of Digital Image Processing. His area of
interest is Vehicular technology, Digital Electronics, Digital Image
In this experiment, we evaluate the accuracy of the proposed Processing.
method in estimating individual vehicle speed from real
traffic images at day-time as well as night-time, by comparing P. Devi received the BE degree in Electronics and
the estimated value with the speed measured by a Doppler Communication Engineering from VLB Janakiammal
College of Engineering and Technology, Anna University
speed radar system. All the test images are taken by a Chennai in 2009 and the ME degree in Communication
surveillance camera at 0.5 seconds apart, with the size of Systems from Sri Krishna College of Engineering and
1280×1024 and 24 bit color depth mode. We first calculate Technology, Anna University Coimbatore in 2011.
the reconstructed images as described in Section 2.2 with Currently working in Sri Ramakrishna Institute of
Technology as an Assistant Professor in ECE Department.
resolution of 10 pixels/meter, and then threshold the 256 gray
She has one year teaching experience. She has presented the papers in the
level frame difference using a threshold of 30 to generate the national conference. Under her guidance, the final year students are doing
vehicle mask. k, sxand syin block matching period were set to their project in various fields. Her field of interest is Digital Image
10 pixels, 20 pixels and 10 pixels respectively. For the 31 sets Processing.

85

You might also like