Speed Estimation of Moving Vehicle Based On Digital

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

Speed Estimation Of Moving Vehicle

Based On Digital Image Processing


by

SOUVIK PATRA (ROLL NO-T91/CSE/164036)


University Of Calcutta
Content
 Introduction
 Overview Of Proposed Methodology
 Video Input
 Preprocessing
 Background Subtraction
 Smoothing
 Shadow Removal
 Morphology Operation
 Object Detection
 Speed Estimation
 Conclusions
 References
Introduction
ONE of smart city components is smart transportation, known as
Intelligent Transportation System (ITS)
Smart traffic monitoring system is uncompleted without the existence
of system that is capable to detect any traffic problems automatically
 speed estimation process using digital image processing will give a
contribution to build a smart system for traffic monitoring that is able
to do detecting, counting, classifying, and estimating speed for vehicle
object from video data
Overview Of Proposed Methodology
Here we are focusing on image processing technique used for vehicle
speed detection using JAVA programming with OpenCv which includes
following steps
 Video Input
Preprocessing
Background Subtraction
Smoothing
Shadow Removal
Morphology Operation
Overview Of Proposed Methodology(Contd.)
Object Detection
Labeling and Tracking
Speed Estimation

Fig 1:Block diagram of system architecture


Video Input
 Video data is captured from static camera at top position of highway, using geometric equation to
calculate perpendicular view (P) and distance between object and camera (D) based on camera height
(H), field of view angle of the camera (Tc), and angle of the camera (Tv)
 Tc = 2arctan(v /2f).................................. (1)
 T = Tv +Tc/ 2.............................................(2)

 where f is focal length of the camera and v is vertical


dimension of 35 mm image format which can be found
from camera specifications. Then, we can get
D = Htan(T)………………………… (3)
and
P = 2tan(Tc/ 2) H²+D² ……………(4)
Fig 2: Video capturing layout
Preprocessing
 Video data is extracted to frames and each frame is applied preprocessing before frame is
being processed by background subtraction
 Preprocessing is used to minimize bold shadow that can be detected as solid object which
can decrease object detection accuracy.
 This paper uses brightness and contrast adjustment for preprocessing step which has
general equation given by
g(i, j) =αf(i, j)+β………………. (5)
 where f(i, j) is pixel intensity in coordinate (i, j), α is gain parameter with default 1, and β is
bias parameter with default 0.
Background Subtraction
 Background subtraction is used to extract foreground image based on background model for
each frame

 This paper uses Gaussian Mixture Model known as GMM method to do background
subtraction process

 To implement GMM method, we use BackgroundSubtractor class from OpenCV library.


BackgroundSubtractor in OpenCV will produce foreground image with 3 gray levels, 255 for
moving object, 127 for object shadow, and 0 for background.
Smoothing
 Smoothing is used to filter or reduce noise produced from background subtraction process
 The illustration how median filter works is given by Fig. 3

Fig 3: Median filter


Shadow Removal
 Background subtraction using GMM can also be used to detect shadow, so to increase object detection accuracy, the
shadow should be removed
 This process will map foreground image produced from GMM to binary image which contain only pixel value 1
and 0 for identify moving object and background respectively.

 Ibinary(i,j) = 0 if Igray(i, j) = 0 or Igray(i, j) = 127


1 if Igray(i, j) = 255…................ (6)

Fig 4:Shadow removal process


Morphology Operation
 morphology operation is used to reconstruct image after shadow removal process
 Erosion shrinking and thinning operation to objects
 Dilation grow or thicken objects in binary image
 Opening operation Erosion Dilation
 Closing operation Dilation Erosion
 To reconstruct image which contain gaps, we will use this closing operation

Fig 5:Closing operation in image morphology


Object Detection
 This process uses findContours function from OpenCV to detect moving objects
 We will calculate Euclidean distance to know the distance traveled by the object from two
consecutive frames by its center point
 Let B(i, j) is a bounding box which starts at coordinate (i, j), then centroid point C(i, j) which
is coordinate (Ci,Cj) can be determined by
 C(i, j) = (Ci,Cj) ……………………….(7)
With Ci = Bi +Bwidth /2 , Cj = Bj +Bheight /2………………..(8)
 where Ci is centroid coordinate at row i, Cj is centroid coordinate at column j, Bi is bounding
box coordinate at row i, Bj is bounding box coordinate at column j, Bwidth is the width of
bounding box, and Bheight is the height of bounding box
Object Detection(Contd.)
Speed Estimation

 To calculate the distance traveled by the object for two consecutive frames using Euclidean
distance, let Ct(a,b) and Ct+1(c,d) is centroid point of the object in frame t and t + 1
respectively. The distance d calculated by Euclidean distance is given below
 d= (a−c)²+(b−d)² ………………(9)
 To calculate speed V between two frames, we use
 V = k *d/t…………………………..(10)
 where k is calibration coefficient based on perpendicular view P and image height Iheight
and t is time between two frames which is given by
 k =P/ Iheight , t =1/ fps........................(11)
 Converting unit of V from m/s to km/h V =3.6( k* d/t)
Speed Estimation(Contd.)
Conclusions
 Speed estimation is one of many important parts of Intelligent Traffic System (ITS) which can
be done by using image processing technique.

 It is more efficient and economical than conventional technique without using image
processing, for example : using speed radar and manual inspection.

 The system in this paper acts as prototype which can be more developed and be more
complex for larger system to build a complete ITS system for smart city development.
References
 B. C. Putra, “Moving vehicle classification with fuzzy logic based on image processing,”
Master’s thesis, Sepuluh Nopember Institute of Technology, 2016.
 B. Setiyono, D. R. Sulistyaningrum, I. Mukhlash, and R. A. J. Firdaus, “A new approach
algorithm for counting of vehicles moving based on image processing,” International Journal
of Computer Science and Information Security, vol. 14, no. 10, pp. 366–370, 2016.
 A. G. Rad, A. Dehghani, and M. R. Karim, “Vehicle speed detection in video image
sequences using cvs method,” International Journal of Physical Sciences, vol. 5, no. 17, pp.
2555–2563, 2010.
 J. Lan, J. Li, G. Hu, B. Ran, and L. Wang, “Vehicle speed measurement based on gray
constraint optical flow algorithm,” Optik-International Journal for Light and Electron Optics,
vol. 125, no. 1, pp. 289–295, 2014.
THANK YOU

You might also like