You are on page 1of 24

A Seminar Report on Speed Detection Of Vehicle With Image Processing

____________________________________________________________________________________________________________

1. INTRODUCTION

1.1 History of Speed Cameras

First speed detection camera was manufactured by Dutch Company named gatsometer
BV, founded by Rally driver Maurice Gatsonides. His camera was the first automated road
rule enforcement system. Currently Gatsometer is the biggest supplier of the speed
cameras. The working principle behind speed camera was same as the one used in modern
day cameras, only that it used a more direct approach. The camera would take two photos
of a car, moving across the start and end points of a measured section of the road.

The cost benefit analysis was carried out between November 1995 and March 1996 by
management consultants employed by Price Waterhouse. The data collection exercise
focused on ten police force areas which were selected in accordance with a range of pre-
defined criteria including number of cameras, experience of their use, force size, degree of
urbanization, road length and number of traffic officers. The number of police forces using
speed and traffic light cameras has increased steadily in recent years. In 1994, it was
estimated that just over half of all police forces were using cameras. The number of
cameras in use then was still relatively small with just over 30 speed cameras and 54
traffic light cameras. The majority of the cameras in use, at the time of the current study,
were `wet film’ cameras which are usually unmanned and mounted on fixed roadside
poles.

Costs of cameras:

Data was collected in the ten force areas on the costs associated with the installation (fixed
costs) / operation (recurrent costs) of traffic light and speed cameras and with related
prosecutions. These were as follows:

Traffic light cameras:

– The average fixed cost per traffic light site was just over £9,200 and average recurrent
costs were over £5,600 per annum for each site

– 86% of the fixed costs for traffic light cameras were met by local authorities and the
police service met 67% of recurrent costs. (Magistrates’ courts accounted for 25% of these
recurrent costs.)

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 1
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

– The average number of traffic light prosecutions per site was 123 with an average cost
per prosecution of £46. (80% of these offences were dealt with by way of fixed penalty.)

Speed cameras:

– The average fixed cost per site for a speed camera was £12,500 and average recurrent
costs were just over £8,500 per annum for each site.

– 68% of the fixed costs for speed cameras were met by local authorities and 20% were
met by the police service. The police service also met 64% of the recurrent costs
associated with speed cameras. (Magistrates’ courts accounted for over 30% of these
recurrent costs.)

– Each site generated an average of 316 speed related prosecutions per annum, although
there was considerable variation between sites. The average cost per prosecution was £27.
(86% of these offences were dealt with by way of fixed penalty.)

Benefits of cameras:

– Accidents fell by 28% at speed camera sites or by 1.25 accidents per site per year

– Accidents fell by 18% at traffic light sites or by 0.48 per site per year

– Speeds were reduced by an average of 4.2 mph per site

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 2
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

2. SPEED DETECTION CAMERAS

2.1 Categories of Speed Cameras

The categories of speed camera considered were:

2.1.1 Video Image Processors:

A video image processor (VIP) is a combination of hardware and software which extracts
desired information from data provided by an imaging sensor. This imaging sensor can be a
conventional TV camera or an infrared camera. A VIP can detect speed, occupancy, count,
and presence. Because the VIP produces an image of several lanes, there is potential for a
VIP to provide a wealth of traffic information such as vehicle classification and incident
detection. A VIP generally operates in the following manner: the operator selects several
vehicle detection zones within the field of view (FOV) of the camera. Image processing
algorithms are then applied in real time to these zones in order to extract the desired
information, such as vehicle speed or occupancy.

Advantages of VIPs are that they are mounted above the road instead of in the road, the
placement of vehicle detection zones can be made by the operator, the shape of the detection
zones can be programmed for specific applications, and the system can be used to track
vehicles. Disadvantages are the need to overcome detection artifacts caused by shadows,
weather, and reflections from the roadway surface. The disadvantages can be overcome
through design and installation of the hardware and design of the software algorithms.

2.1.2 Speed camera using Radar system:

Radar makes use of electromagnetic waves to detect objects and give info (speed, distance,
etc) about them. It makes use of Doppler Effect to determine the vehicle's speed. They
calculate and scale the variation of frequency between the received and sent radio waves
(echo). The frequency will be lower if the object is moving away and is higher if it is moving
closer. So, based on the level of echo, it is possible to decide the speed of the moving object.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 3
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

Fig.2.1 The Doppler Effect

The principle of speed camera that is the Doppler's effect can be described by the formula

f M = 2vfEcos(α/c)

where

FM is the frequency of the received signal

v is the speed of vehicles

f E if the frequency of transmitted signal

α is the angle between the transmitted signal and path along which the vehicle travels

c is propagation speed of the signal in the air.

Disadvantages of this system is high cost and less accuracy, also requires line of sight
connection between vehicle and radar equipment

2.1.3 Traffic light cameras:

Traffic light cameras are invariably wet film cameras mounted on a fixed position pole close
to the traffic lights under surveillance. They are activated when a vehicle travels beyond the
stop line at a specified period (e.g. one second) after the red light shows. The conditions
under which such cameras are activated can be varied e.g. to avoid drivers being
photographed after stopping very slightly over the stop line. The current study focused
exclusively on the cameras described above and these will be referred to collectively as
“traffic cameras”.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 4
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

2.1.4 Infrared Detectors:

There are two types of infrared (IR) detectors, active and passive. Active infrared sensors
operate by transmitting energy from either a light emitting diode (LED) or a laser diode. An
LED is used for a non-imaging active IR detector, and a laser diode is used for an imaging
active IR detector. In both types of detectors the LED or laser diode illuminates the target,
and the reflected energy is focused onto a detector consisting of a pixel or an array of pixels.
The measured data is then processed using various signal-processing algorithms to extract the
desired information. Active IR detectors provide count, presence, speed, and occupancy data
in both night and day operation. The laser diode type can also be used for vehicle
classification because it provides vehicle profile and shape data. A passive infrared system
detects energy emitted by objects in the field of view and may use signal-processing
algorithms to extract the desired information. It does not emit any energy of its own for the
purposes of detection. Passive infrared systems can detect presence, occupancy, and count.
Advantages of infrared detectors are that they can be operated during both day and night, and
they can be mounted in both side and overhead configurations. Disadvantages are that
infrared detectors can be sensitive to inclement weather conditions and ambient light. The
choice of detector materials and construction of the system, as well as sophisticated signal
processing algorithms, can compensate for the disadvantages.

2.1.5 Inductive Loops:

An inductive-loop detection system consists of an inductive loop, which is simply a coil of


wire embedded in the road's surface, and a detector, which typically sits in a signal cabinet
and links the signal controller to the inductive loop. When a vehicle enters or crosses the
loop, the body and frame provide a conductive path for the magnetic field. This produces a
loading effect, which in turn causes the loop inductance to decrease. The decreased
inductance causes the resonant frequency to increase from its nominal value. If the frequency
change exceeds the threshold set by the sensitivity setting, the detector module will output a
detect signal (i.e., an \ON" status). Otherwise, the detector does not output a signal (i.e., an \
OFF" status).

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 5
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

Fig 2.2 Inductive loop system

Disadvantages of this system is Installation of inductive-loop detectors is intrusive to traffic


(i.e. the traffic must be interrupted in order to put the loop in pavement). In addition, set-up
and maintenance costs of inductive-loop detectors are high. Inductive-loop detectors can fail
under weather conditions, especially snow and ice.

2.1.6 Ultrasonic detectors

Ultrasonic detectors have not become widely used in the United States, but they are very
widely used in Japan. Japan uses ultrasonic detectors in traffic applications as much as the U.
S. uses inductive loop detectors in traffic applications. There are two types of ultrasonic
sensors available, presence-only and speed measuring. Both types operate by transmitting
ultrasonic energy and measuring the energy reflected by the target. These measurements are
processed to obtain measurements of vehicle presence, speed, and occupancy.

The advantages of ultrasonic are that they provide all-weather operation, do not need to be
approved by the FCC, and provide fixed or portable mounting fixtures above the road. Their
disadvantages include their need to be mounted in a down-looking configuration as
perpendicular as possible to the target (as opposed to side mounting), a difficulty in
identifying lane-straddling vehicles and vehicles traveling side by side, and susceptibility to
high wind speeds. Some of these disadvantages may be compensated for through more
sophisticated data processing techniques.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 6
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

2.1.7 Photoelectric

Photoelectric devices commonly consist of two components, the light source and the detector.
These may both be in the same place, or placed across from each other. When placed across
from each other, the detector is activated whenever something obstructs the illumination from
the light source. When placed in the together, the detector is activated when light from the
light source is reflected from a target and back onto the detector. There is not enough
information on these detectors as applied to vehicle detection. They do not appear to be a
competitive technology in the field of vehicle detectors at this time.

2.1.8 Spread-spectrum wideband radar

New wideband spread-spectrum radar has recently been developed at Lawrence Livermore
Laboratory. It is a significant development because it is very inexpensive and it has
extremely accurate range discrimination. It can also penetrate many types of materials,
including concrete. It has a range of about 20 feet, so it may be useful as an inexpensive,
single-lane vehicle detector. It is predicted that the sensor, when made in production
quantities, would cost much less than $10 per sensor. Because of their accurate range
discrimination, they have a very well defined field of detection. They could become a cheap
alternative to magnetometer probes. Their ability to detect range provides additional
information for future traffic control systems. In addition, Lawrence Livermore has stated
that they are developing a broadband transmitter/receiver pair to be used with these sensors.
This would eliminate the need for communication lines between the sensor and the controller.

2.1.9 Magnetic Detectors

There are two other types of magnetic detectors, which are used to detect traffic. Both of
them are in the form of probes, and they both operate on the principle of a large metal object
disturbing a magnetic field, just as inductive loop detectors work. There are both active and
passive types. The active type is called a magnetometer. A magnetometer acts in much the
same way as an inductive loop detector, except that it consists of a coil of wire wrapped
around a magnetic core. It measures the change in the magnetic field caused by the passage
of a vehicle. It can be used both for presence and for vehicle passage detection. The passive
type of detector simply measures a change in the flux of the earth's magnetic field caused by
the passage of a vehicle. These detectors can only detect moving vehicles, so they cannot be
used as presence detectors. They have a fairly large detection range and thus can be used to
observe multiple lanes of traffic.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 7
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

The advantage of both of these types of magnetic detectors is that they can be used where
point or small-area location of a vehicle is necessary. For example, on a bridge, inductive
loop detectors would be disrupted by the steel struts, and it is necessary to have a point
detector. One of their disadvantages is that multiple detectors need to be installed to detect
smaller vehicles, such as motorcycles.

2.1.10 Acceleration detectors

For the left-turn collision countermeasure system, it is necessary to determine the


acceleration of the vehicle, so that it can be determined whether or not the vehicle is slowing
to make a left turn. Using Doppler information, the range rate of a vehicle may be
determined, but it does not appear that any radar currently being marketed for traffic
applications measure the range rate. A simple method is to have three detectors in a linear
formation. Measurements from these three detectors will provide an approximation of the
acceleration of the vehicle from which the system may determine whether or not to activate
the left-turn ahead warning.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 8
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

3. SPEED DETECTION WITH IMAGE PROCESSING

3.1 Need of Image Processing based Speed Cameras

Nowadays there is more demand for traffic surveillance system. The traffic surveillance
system gives the information about various traffic parameters such as vehicle count, traffic
congestion, vehicle speed etc. As the single biggest cause of road accidents is speed most of
the research is going on to detect speed of vehicle. Many speed detection instruments are
available for moving vehicle speed detection Also the field of image processing is widely
used for various applications generally in video surveillance systems. So, video sequences are
in use for instance tracking moving objects, extracting trajectories, finding traffic intensity or
estimating vehicle velocity etc. Using video to track vehicle in scene reveals added
information difficult to obtain using loop detectors. This system might be useful for
extending in real-time surveillance.

Traditionally radar systems were used for many applications. So it can be applicable not only
in military applications but also in civilian applications. The radar system is not able to
become popular in traffic surveillance system due to high cost of radar and less
accuracy. Also it requires line of sight connection between vehicle and radar equipment. The
other method for speed calculation is use of inductive loops. ILDS (Inductive loop detection
system) requires high maintenance and installation cost, also it doesn’t provide enough
information about traffic parameters. So to overcome the limitations in existing methods,
various techniques have been developed for vehicle speed determination using image
processing.

IPBSC is based on background subtraction. In background subtraction background modeling


is most important. The various methods of moving vehicle speed detection are Inductive
loops, RADAR gun, LASER Gun, Manual count. The methods of background extraction
from colour image based on average value, median filter and common region. Also running
average, median algorithm, Mixture of Gaussian are developed, these are based on DCT.
Many times first frame or frame differencing is used for background subtraction. To remove
misdetection of vehicle due to vehicle travelling from other lane, or other small
movements such as tree waving can be avoided using ROI extraction. The background is
multiplied with roi mask. So that vehicles are detected accurately. Furthermore thresholding
and morphological operations are used to reduce noise. In thresholding selection of threshold

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 9
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

value is based on various methods. The threshold value can be selected manually or
automatically by using thresholding.

3.2 Working of image processing based speed cameras

Fig.3.1 Block Diagram

This method is used for estimating vehicle speed which is coming towards camera by
tracking the motion of vehicle through sequence of images. The proposed system mainly
consists of steps as shown in fig.3.1 Firstly, the video is converted into frames. The
Background Subtraction is used for moving vehicle detection. Averaging all frames,
background without moving object is extracted. Background Subtraction output is applied for
Thresholding and Morphological Operation. Connected Component Method is used to detect
object and centroid of that object. Centroid is tracked over multiple frames. Velocity is
calculated using distance travelled by vehicle and frame rate of video. This system is helpful
for traffic parameter surveillance.

3.2.1 Preprocessing:

The video is recorded using camera having pixels. In pre-processing the video has converted
into the frames. The various parameters such as number of frames, frame rate, colour
format, frame size are extracted. There are any no of frames in this video (eg. 372, 500
etc). It has frame rate any no of frames per second (eg. 30 frames per second). The frame size
may of 640x480 pixels. Also at this stage the frames are converted into double data format
i.e. required for future operation.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 10
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

3.2.2 Moving vehicle detection:

Detecting Moving vehicle from video accurately is challenging task. To detect moving object
there are various approaches such as temporal differencing method, optical flow algorithm,
background subtraction algorithm. Temporal differencing method uses two adjacent frames
only to get background image. This method has one disadvantage that it cannot detect slow
changes accurately. Optical flow algorithm detects object independently using camera
motion. Optical flow algorithm is computationally complex and it is not suitable for real time
application. In background subtraction absolute difference between background model and
each instantaneous frame is taken to detect moving object. Background model is an image
with no moving object. Background subtraction algorithm is used to detect moving vehicle.
The background subtraction algorithm mainly consist of three stages Background Extraction,

Thresholding, Morphological Operations.

Fig 3.2 Flow chart for background subtraction method

1) Background Extraction: The heart of Background Subtraction is background


extraction. Background extraction and removal is one of the important parts of the
vehicle detection that is highly applicable for the acquisition of foreground data.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 11
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

Moreover, if background image difference is used with no update of background


image, this would lead to incorrect and unsuitable results. Therefore, the dynamic
background extraction method which can estimate it while there are environmental
changes in a traffic scene is required. Background extraction algorithms are divided
into several types. Ridder et al. (1995) used adaptive background estimation and
foreground detection using kalman filter. Bailo et al. (2005) used background
estimation with Gaussian distribution for image segmentation. Shi et al. (2002)
introduced Adaptive Median Filter for Background Generation and Asaad and Syed
(2009) utilized morphological background estimation. While recording video on
highway; it is very difficult to get the image without any moving vehicle. For getting
such image which is called as background or background model background
extraction is used. Average of all frames pixel values, have taken because of this as
result as shown in Fig.3.3, we get the image having only stationary object. From
background image ROI Extraction has done. For ROI, vehicle coming towards
camera are tracked so that only one lane of road is considered as ROI. The extracted
ROI is as shown in Fig.3.4

Fig.3.3 Background model using averaging frames

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 12
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

Fig 3.4 Extracted ROI from background model

Each frame is then multiplied with extracted ROI. Before multiplication RGB frames
are converted to Gray level. Because of this detection of other movement such as
waving trees, or any other unwanted movement is avoided. It is required to do to get
accuracy in vehicle detection. The absolute difference of each instantaneous frame
and background model after multiplying both with extracted ROI has taken to detect
only moving vehicles. The result of this stage is as shown in fig. 3.5

Fig 3.5 Difference image of background and frame

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 13
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

2) Thresholding: Image Thresholding is a simple, yet, effective way of partitioning an


image into a foreground and background. This image analysis technique is a type of
image segmentation that isolates objects by converting grayscale images into binary
images. Image thresholding is most effective in images with high level of contrast.
After performing the frame differencing operation we perform the thresholding
operation to convert the image into the binary image. It is easy to perform the motion
operations on the binary image than the grayscale image. Threshold follows the same
concept as in basic electronics, here it is used to convert the grayscale image to black
and white (binary image, consisting of 0's and 1's as pixel values.) We select the same
frame X and frame Y from the last operation and perform thresholding on it.
Thresholding is one of the ways for image segmentation. It converts grey scale image
to binary image. Selection of threshold value is very much important in thresholding.
To separate foreground vehicle from static background thresholding is used here.
g(x, y) = 0 for f(x, y) < T
1 for f(x, y) >= T
Where g(x, y) is threshold image,
T is the selected threshold value;
F (x, y) is instantaneous frame.
In this stage we get vehicle as object and some noise. The result of this stage is as
shown in fig. 3.6.

Fig 3.6 Thresholding

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 14
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

3) Morphological Operations: After thresholding operation there are lots of isolated


points which add to the complexity. Morphological operations are performed to
remove all the isolated points that are observed in the thresholding operations. We
remove the isolated points so that we are left with clear points that belong to the
vehicle. Morphological image processing is a collection of techniques for digital
image processing based on mathematical morphology which is a nonlinear approach
that is developed based on set theory and geometry. Morphological image processing
techniques are widely used in the area of image processing, machine vision and
pattern recognition due to its robustness in preserving the main shape while
suppressing noise. When acting upon complex shapes, morphological operations are
able to decompose them into meaningful parts and separate them from the
background, as well as preserve the main shape characteristics. Furthermore, the
mathematical calculation involved in mathematical morphology includes only
addition, subtraction and maximum and minimum operations without any
multiplication and division. There are two fundamental morphological operations
which are dilation and erosion and many of the morphological algorithms are
based on these two primitive operations.
Dilation of the set A by set B which is usually called as structure element,
denoted by A⊕B , is obtained by first reflecting B about its origin and then
translating the result by x. All x such that A and reflected B translated by x that have
at least one point in common form the dilated set.

Where

denotes the reflection of B and (B)x denotes the translation of B by x.

Thus, dilation of A by B expands the boundary of A.

Erosion of A by B, denoted by A ѳ B, is the set of all x such that B translated by x is


completely contained in A.

Thus, erosion of A by B shrinks the boundary of A.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 15
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

Other important morphological operations which are defined in terms of erosion and
dilation: opening and closing.

A is said to be opened by B if the erosion of A by B is followed by a dilation


of the result by B.

Opening generally smoothes the contour of an object, breaks narrow isthmuses, and
eliminates thin protrusions. Similarly, A is said to be closed by B if A is first dilated
by B and the result is then eroded by B. Thus,

Closing also tends to smooth sections of contours but, as opposed to opening, it


generally fuses narrow breaks and long thin gulfs, eliminates small holes, and fills
gaps in the contour.

Now after removing the isolated points we are left with some disconnected
components. If we calculate the centroid of all these disconnected components then it
will become difficult for us to calculate the displacement of the vehicle because of
large number of centroid. We will not able to judge that which centroid we need to
pick to calculate displacement. Therefore we will connect all these disconnected
components together. So now perform morphological closing to connect the vehicle
disconnected components together. They are generally used to remove noise from
imperfect segmentation. Morphological operations are especially suited for binary
images. So they are performed on output image of thresholding. The results of these
morphological operations are shown in fig.3.7.After this the selected object pixels are
applied for connected component analysis.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 16
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

Fig 3.7 Morphological operations

Connected component analysis is used to identify connected pixel region by scanning


an image pixel-by-pixel. It is applied to binary and grey scale image. It has various
connectivity i.e.8 pixel connectivity or 4 pixel connectivity. Connected component
analysis is performed on binary image with 8 pixel connectivity.

3.2.3 Feature Extraction:

Feature extraction is the key aspect in moving vehicle tracking. Features are nothing but
some of the characteristics of detected vehicle such as position, speed, colour, shape,
centroid, edges etc. By using result of connected component analysis bounding box has
drawn around vehicle. The centroid and histogram of vehicles surrounded by bounding box
can also be selected as features. The result of vehicle detection is as shown in fig.3.8.

Fig 3.8 Vehicle detection

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 17
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

3.2.4 Vehicle Tracking:

It is based on feature tracking. The extracted features are tracked over sequential frames. To
identify whether it is same object or other object matching algorithm is used. In object
matching algorithm mahalanobis distance is calculated. Mahalanobis distance is used to find
similarity and dissimilarity between two groups. It uses covariance of the two groups. When
covariance matrix is same as identity matrix then mahalanobis distance is same as Euclidian
distance.

Fig 3.9 Match ID and detected vehicle

In object matching the mahalanob is distance between features of object in the previous frame
and instantaneous frame is calculated. Some threshold value is set and it has compared with
calculated distance. If the distance is less than the threshold value then the object in the
previous frame and instantaneous frame is same. According to this, match id has given for
each object. The result of this is as shown in fig.3.9. This match id is tracked over sequential
frames.

3.2.5 Speed Determination:

The speed of the vehicle in each frame is calculated using the position of the vehicle in
each frame, so the next step is to find out bounding box, and the centroid. The centroid is
important to understand the distance of the vehicle moving in consecutive frames and
therefore as the frame rate of captured moves is known, the calculation of the speed become
possible. This information must be recorded consecutively into an array cell in the same size
as the captured camera image because the distance moved by the centroid is needed which is

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 18
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

a pixel with a specific coordinate in the image to find out the vehicle speed. To find out the
distance moved by the pixel, suppose the pixel has the coordinate like:

i= (a, b) & i-1= (e, f)

Where the centroids location is showed in frame i and i-1 for one vehicles, with (a, b)
coordinate and (e, f) coordinate.

The detected vehicle having match id is tracked over frames. The total number of frames in
which same object is present has calculated.

Total Frames Covered= frame n – frame 0

Where, frame 0 is the first frame when object is entered in roi and frame n is last frame
when object passed away from roi. Also the real world distance is mapped on the image.
The count of total number of frames is then multiplied with duration of one frame
which is calculated from frame rate of video. From this the total time taken by vehicle to
travel and Distance is fixed it is measured in real world and mapped into image.

Speed=Distance/ (TF*Frame rate)

From distance and travelled time of detected vehicle, speed of that vehicle is determined from
above formulae.

Fig 3.9 Speed detection

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 19
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

4. ALGORITHM
i. Read and access the video and find information like number of frames, width
and height of the video captured.
ii. Create a structure to capture all the frames from the video.
iii. From the list of frames, select frames and a background frame.
iv. Perform Background extraction of the frames with the background frame and a
Grayscale image is created.
v. Convert the grayscale image into binary image using thresholding operation.
vi. Remove lane marking and others non-disk shaped structures using morphological
processing.
vii. Perform morphological closing to join the vehicle disconnected components together.
viii. Use connected component method to detect object and centroid of that object.
ix. Track the centroid over multiple frames.
x. From distance and travelled time of detected vehicle, the speed of vehicle can be
calculated by,
Speed=Distance/ (TF*Frame rate)

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 20
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

5. ADVANTAGS
1. Image processing is continuously improving its ability to recognize noise produced by
shadows, illumination changes, reflections, weather conditions
2. Heavy congestion can’t degrade the performance image processors.
3. Results for vehicle flow rate, speed are 95 percent accurate in single detection. To
increase the detection accuracies of 100 percent , the detection zones per lane is
increased
4. Using video to track vehicle in scene gives perfect result.
5. Background subtraction algorithm detect moving objects a lots of effectively and
precisely.
6. By extracting ROI noise immunity is improved.
7. Using Thresholding algorithms the more complete behavior of moving object is
achieved.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 21
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

6. APPLICATIONS
1) Motion Detection: Vehicle detection and tracking applications play an important role
for civilian and military applications such as in highway traffic surveillance control,
management and urban traffic planning. Vehicle detection process on road are used
for vehicle tracking, counts, average speed of each individual vehicle, traffic
analysis and vehicle categorizing objectives and may be implemented under
different environments changes. Speed estimation of vehicles from videos has gained
importance recently as it can be used in automated driving, detecting over-
speeding cars, automatic garages and toll gates operation.
2) Number plate Recognition: The methods for recognizing license plate of a vehicle
from video sequences is a research hotspot and a computer vision problem. Previous
techniques required special hardware, calibration of hardware or failed to identify the
vehicle.
3) Object localization: Focuses attention to a region of interest in the image. Often only
interest points found which are used later to solve the correspondence problem.
4) Motion segmentation: Images are segmented into region corresponding to different
moving objects.
5) Sports Application: human object detection and tracking can be done by background
subtraction algorithm for sports application.
6) Visual surveillance: A human action recognition system process image sequences
captured by video cameras monitoring sensitive areas such as bank, departmental
stores, parking lots and country border to determine whether one or more humans
engaged are suspicious or under criminal activity.
7) Content based video retrieval: A human behaviour understanding system scan an
input video, and an action or event specified in high-level language as output. This
application will be very much useful for sportscasters to retrieve quickly important
events in particular games.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 22
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

7. FUTURE WORK AND CONLUSIONS

The success of the implementation of Speed cameras with leading and effective image
processing techniques results in accurate speed detection of vehicles. Implementing image
processing technology for speed detection of vehicles to avoid the accidents on highway has
the potential to overcome the inefficient techniques with low cost and better accuracy.

It is a novel generic technique for license plate detection, recognition and speed estimation
from video sequences. The technique is generic, as it doesn’t require any special hardware or
calibration and can work even in complex backgrounds. The technique is robust and can be
used as a basis for future research. In future technique can be extended to replace radar guns.
Also new innovative techniques can be developed to make use of object tracking method for
speed detection.

Image processing based speed cameras shows the detailed information about how the traffic
surveillance systems used the image processing methods and analysis tools for detect,
segment, and track the vehicles. In addition, shadow and partial occlusion matters and its
available solutions are discussed. More specifically, this review gives better understanding
and highlights the issues and its solutions for traffic surveillance systems.
This system provides a software package specifically designed to manage a vehicle’s traffic,
that provides a number of benefits:
• It is a cheap alternative system to the traditional radar system.
• There is no any hardware damage due to any environmental conditions
Future work will be focused on reducing the percentage error and developing the method that
work in night time also.
Image processing techniques are developed computationally economical and are used to
reduce energy consumption. With image processing objects are easily detected and tracked
at high speed consecutive sequences of image of the vehicle. The accuracy of the system
proposed in the speed measurement is comparable to the actual speed of the moving
vehicles.

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 23
A Seminar Report on Speed Detection Of Vehicle With Image Processing
____________________________________________________________________________________________________________

REFERENCES
[1] “Vehicle speed detection in video image sequences using CVS method” Arash
Gholami Rad1, Abbas Dehghani2 and Mohamed Rehan Karim3 Department of civil
Engineering, University of Malaya. 50603 Kuala Lumpur, Malaysia1. Department of
Electrical Engineering, Sadjad Institute of Higher Education, Mashhad, Iran 2.
Department of Computer Science, UCLA, 420 Westwood Plaza, Los Angeles, CA
90095, USA3. 5 November, 2010
[2] “Vehicle Speed Determination Using Image Processing” Shweta Joshi Department
of Electronics & Telecommunication Engineering, Rajarambapu Institute of
Technology, Rajaramnagar, Islampur, Maharashtra, India. International Journal of
Research in Management, Science & Technology (E-ISSN: 2321-3264) Vol. 2, No. 1,
April 2014
[3] “Vehicle Speed Estimation in Accident Prone Areas using Image Processing”
Siddharth Jhumat M.Tech (CSE), Department of Computer Science & Engineering,
University School of Information & Communication Technology, Guru Gobind Singh
Indraprastha University, Delhi, India International Journal of Advanced Research in
Computer and Communication Engineering Vol. 3, Issue 5, May 2014
[4] “Background subtraction frame difference algorithm for moving object
detection and extraction” d stalin alex1, dr. amitabh wahi2, Research Scholer1,
Department of Computer Science and Engineering,Anna Univeristy Professor 2,
Department of Information Technology,Bannari Amman Institute of Technology 28th
February 2014. Vol. 60 No.3
[5] “Human Object Detection and Tracking using Background Subtraction for
Sports Applications” R.Manikandan1, R.Ramakrishnan2, Research Scholar1,
Professor and Head2, Department of Advanced Sports Training and Technology,
Tamil Nadu Physical Education and Sports University, Chennai, India. International
Journal of Advanced Research in Computer and Communication Engineering Vol. 2,
Issue 10, October 2013

Department of Electronics & Telecommunication Engineering.


Dr. Babasaheb Ambedkar Technological University, Lonere. 24

You might also like