APPLICATION OF IP
TECHNIQUES IN TRAFFIC
CONTROL SYSTEM
PIXEL DENSITY
METHOD ASHIK.S.R
ashikask@live.com
Electronics Engineering
Central Polytechnic College
tangibility by ask™
Objectives and scopes
 Traffic congestion is becoming more serious day after day.
 Trying to find out a technique for determining traffic congestion on roads using
image processing techniques.
 This method will reduce the necessity of intense man power for traffic control
and wastage of green light on empty roads.
tangibility by ask™
Introduction
 Image processing is an efficient tool for overcoming traffic problems.
 Image processing techniques can be used to find out the density of traffic on
roads.
 Proposes a method to find out the traffic density on roads using image
subtraction and segmentation.
 This is a method of finding traffic density in terms of total amount of pixels in a
video frame instead of calculating number of vehicles using image processing
techniques.
tangibility by ask™
Traffic Control Using Image
Processing
 Image processing is simply processing images using digital computers.
 Steps involved here are
• Video acquisition using camera.
• Image pre-processing .
• RGB to gray conversion.
• Edge detection
• Sobel operation.
• Image subtraction.
• Filtering
• Weiner filter
• Image post-processing
• Morphological closing & flood fill operation
• Thresholding
• converting grayscale image to binary.
tangibility by ask™
Camera video
stream
RGB foreground image (FGrgb) RGB background image (BGrgb)
RGB to gray conversion (FGgray) RGB to gray conversion (BGgray)
Edge
detection
(FGp)
Edge
detection
(BGp)
Image subtraction & enhancement
Binary image(Gbinary)
Direct subtraction
Dobj=FGgray-BGgray
Image enhancement
Binary image(Dbinary)
Itotal
Block Diagram
tangibility by ask™
 First a video camera is used for capturing image.
 From the camera video stream data is processed frame by frame.
 The empty road will be the background image and subsequent frames from
video camera will be the foreground image.
 Background image is taken as the reference image.
VIDEO
ACQUISITION
GRADIENT MAGNITUDE METHOD
tangibility by ask™
IMAGE PRE-
PROCESSING
 RGB foreground image(FGrgb) and background image(BGrgb) are
converted grayscale image (FGgray & BGgray)
 Various algorithms are there. The simplest one is
I=0.33*R+0.33*G+0.33*B
 R,G,B:- red, green,blue value of each pixel.
tangibility by ask™
EDGE DETECTION
 Sobel edge detecting operation is performed on foreground and
background image.
 It measures 2-D gradient measurement using horizontal and vertical
gradient.
Horizontal gradient
Vertical gradient
tangibility by ask™
IMAGE SUBTRACTION
 Our aim is to extract the foreground objects(ie, vehicles) from the
background.
 Edge detected foreground and background images are subtracted.
Gobj= FGp-BGp
 Then we get foreground objects(ie, vehicles)
tangibility by ask™
FILTERING
 Noise removal to remove the noise introduced by subtraction.
 Wiener filter is used because of its ability to remove the additive noise and
invert the blurring simultaneously.
 Before we perform filtering we try to reduce small intensity pixels by
subtracting a fixed small value.
tangibility by ask™
IMAGE POST-
PROCESSING
 Morphological image closing
 Essentially performs dilation followed by erosion.
 This procedure helps us to construct the edges
found by sobel operation
 Flood fill operation
 To fill holes in the objects with closed contours with
solid foreground objects
tangibility by ask™
THRESHOLDING
 We obtain a binary image by thresholding.
 We apply Otsu’s method to obtain the threshold T needed to
convert grayscale image to binary.
 To enhance the binary image we multiply the threshold by a factor.
tangibility by ask™
Direct Subtraction
• The grayscale background is subtracted from gray scale foreground to get
Dobj where foreground objects are visible.
Dobj = FGgray-BGgray
• Then perform the above said image enhancement steps and thesholding to
get the binary image Dbinary.
tangibility by ask™
Using Both methods Together
 The binary images Gbinary & Dbinary are added to get the final image.
Itotal = Gbinary +Dbinary
Itotal = 1 if pixel value>=1
0 else
 The amount of white pixels in Itotal represents the foreground objects.
tangibility by ask™
Traffic Density Calculation
 Traffic density is given by
Where R & C is the number of rows and columns in Itotal.
tangibility by ask™
 The traffic cycle is taken as a function of total traffic density (TD) of
vehicles.
ie, Tc = f(TD)
 The denser the traffic, longer is the traffic cycle.
 Another parameter is weighted time allocation of vehicles.
tangibility by ask™
 Our main target is to pass traffic from the road with the higher density. For
this reason, a weighted time allocation is chosen.
 All the computations described here can be implemented in Matlab.
 The Matlab sends necessary information to the microcontroller for
particular signal to be lighted.
tangibility by ask™
Why two methods are used for finding final image ?
 In direct subtraction method, if the vehicle colour is black it may not be
detected. This problem is solved by the gradient magnitude method
where vehicle colour is not a factor.
 In gradient magnitude method there can be certain situations where
detected edges may not form closed contour. This problem can be
solved by background subtraction.
 Using this traffic density information we can calculate traffic cycle (Tc)
which is the total time required for one complete rotation of the signal
lights at any traffic point.
tangibility by ask™
tangibility by ask™
tangibility by ask™
tangibility by ask™
Conclusion
 Automatic traffic control system using timers which is used earlier
had a drawback that the time is being wasted by green light on the
empty road. This technique avoids this problem.
 Here we have successfully implemented an algorithm for a real time
image processing based traffic controller.
 Image processing is a far more efficient method of traffic control as
compared to traditional techniques.
 Also image processing methods are easy to implement and are cost
effective.
tangibility by ask™
Future Scope
 We can use satellite images instead of video cameras
 In addition, we can propose a system to identify the vehicles as
they pass by, giving preference to emergency vehicles and
assisting in surveillance on a large scale.
tangibility by ask™
References
1)V. Kastrinaki, M. Zervakis, and K. Kalaitzakis, “A survey of video processing
techniques for traffic applications,” Image and Vision Computing, vol. 21, pp.
359-381, Apr 1 2003.
2)D. Beymer, P. McLauchlan, B. Coifman, and J. Malik, “A real-time computer
vision system for measuring traffic parameters,” IEEE Conf. on Computer
Vision and Pattern Recognition, pp. 495-501, 1997.
3) M. Fathy, and M. Y. Siyal, “An image detection technique based on
morphological edge detection and background differencing for realtime traffic
analysis,” Pattern Recognition Letters, vol. 16, pp. 1321-1330, Dec. 1995.
4) M. Piccardi, “Background subtraction techniques: a review,” IEEE
International Conference on Systems, Man and Cybernetics 4, pp. 3099-
3104, Oct. 2004.
5) R. Cucchiara, M. Piccardi, and P. Mello, “Image analysis and rule-based
reasoning for a traffic monitoring system,” IEEE Trans. on Intelligent
Transportation Systems, Vol. 1, Issue 2, pp 119-130, 2000
tangibility by ask™
©creative ask ™

APPLICATION OF IP TECHNIQUES IN TRAFFIC CONTROL SYSTEM

  • 1.
    APPLICATION OF IP TECHNIQUESIN TRAFFIC CONTROL SYSTEM PIXEL DENSITY METHOD ASHIK.S.R ashikask@live.com Electronics Engineering Central Polytechnic College tangibility by ask™
  • 2.
    Objectives and scopes Traffic congestion is becoming more serious day after day.  Trying to find out a technique for determining traffic congestion on roads using image processing techniques.  This method will reduce the necessity of intense man power for traffic control and wastage of green light on empty roads. tangibility by ask™
  • 3.
    Introduction  Image processingis an efficient tool for overcoming traffic problems.  Image processing techniques can be used to find out the density of traffic on roads.  Proposes a method to find out the traffic density on roads using image subtraction and segmentation.  This is a method of finding traffic density in terms of total amount of pixels in a video frame instead of calculating number of vehicles using image processing techniques. tangibility by ask™
  • 4.
    Traffic Control UsingImage Processing  Image processing is simply processing images using digital computers.  Steps involved here are • Video acquisition using camera. • Image pre-processing . • RGB to gray conversion. • Edge detection • Sobel operation. • Image subtraction. • Filtering • Weiner filter • Image post-processing • Morphological closing & flood fill operation • Thresholding • converting grayscale image to binary. tangibility by ask™
  • 5.
    Camera video stream RGB foregroundimage (FGrgb) RGB background image (BGrgb) RGB to gray conversion (FGgray) RGB to gray conversion (BGgray) Edge detection (FGp) Edge detection (BGp) Image subtraction & enhancement Binary image(Gbinary) Direct subtraction Dobj=FGgray-BGgray Image enhancement Binary image(Dbinary) Itotal Block Diagram tangibility by ask™
  • 6.
     First avideo camera is used for capturing image.  From the camera video stream data is processed frame by frame.  The empty road will be the background image and subsequent frames from video camera will be the foreground image.  Background image is taken as the reference image. VIDEO ACQUISITION GRADIENT MAGNITUDE METHOD tangibility by ask™
  • 7.
    IMAGE PRE- PROCESSING  RGBforeground image(FGrgb) and background image(BGrgb) are converted grayscale image (FGgray & BGgray)  Various algorithms are there. The simplest one is I=0.33*R+0.33*G+0.33*B  R,G,B:- red, green,blue value of each pixel. tangibility by ask™
  • 8.
    EDGE DETECTION  Sobeledge detecting operation is performed on foreground and background image.  It measures 2-D gradient measurement using horizontal and vertical gradient. Horizontal gradient Vertical gradient tangibility by ask™
  • 9.
    IMAGE SUBTRACTION  Ouraim is to extract the foreground objects(ie, vehicles) from the background.  Edge detected foreground and background images are subtracted. Gobj= FGp-BGp  Then we get foreground objects(ie, vehicles) tangibility by ask™
  • 10.
    FILTERING  Noise removalto remove the noise introduced by subtraction.  Wiener filter is used because of its ability to remove the additive noise and invert the blurring simultaneously.  Before we perform filtering we try to reduce small intensity pixels by subtracting a fixed small value. tangibility by ask™
  • 11.
    IMAGE POST- PROCESSING  Morphologicalimage closing  Essentially performs dilation followed by erosion.  This procedure helps us to construct the edges found by sobel operation  Flood fill operation  To fill holes in the objects with closed contours with solid foreground objects tangibility by ask™
  • 12.
    THRESHOLDING  We obtaina binary image by thresholding.  We apply Otsu’s method to obtain the threshold T needed to convert grayscale image to binary.  To enhance the binary image we multiply the threshold by a factor. tangibility by ask™
  • 13.
    Direct Subtraction • Thegrayscale background is subtracted from gray scale foreground to get Dobj where foreground objects are visible. Dobj = FGgray-BGgray • Then perform the above said image enhancement steps and thesholding to get the binary image Dbinary. tangibility by ask™
  • 14.
    Using Both methodsTogether  The binary images Gbinary & Dbinary are added to get the final image. Itotal = Gbinary +Dbinary Itotal = 1 if pixel value>=1 0 else  The amount of white pixels in Itotal represents the foreground objects. tangibility by ask™
  • 15.
    Traffic Density Calculation Traffic density is given by Where R & C is the number of rows and columns in Itotal. tangibility by ask™
  • 16.
     The trafficcycle is taken as a function of total traffic density (TD) of vehicles. ie, Tc = f(TD)  The denser the traffic, longer is the traffic cycle.  Another parameter is weighted time allocation of vehicles. tangibility by ask™
  • 17.
     Our maintarget is to pass traffic from the road with the higher density. For this reason, a weighted time allocation is chosen.  All the computations described here can be implemented in Matlab.  The Matlab sends necessary information to the microcontroller for particular signal to be lighted. tangibility by ask™
  • 18.
    Why two methodsare used for finding final image ?  In direct subtraction method, if the vehicle colour is black it may not be detected. This problem is solved by the gradient magnitude method where vehicle colour is not a factor.  In gradient magnitude method there can be certain situations where detected edges may not form closed contour. This problem can be solved by background subtraction.  Using this traffic density information we can calculate traffic cycle (Tc) which is the total time required for one complete rotation of the signal lights at any traffic point. tangibility by ask™
  • 19.
  • 20.
  • 22.
  • 23.
    Conclusion  Automatic trafficcontrol system using timers which is used earlier had a drawback that the time is being wasted by green light on the empty road. This technique avoids this problem.  Here we have successfully implemented an algorithm for a real time image processing based traffic controller.  Image processing is a far more efficient method of traffic control as compared to traditional techniques.  Also image processing methods are easy to implement and are cost effective. tangibility by ask™
  • 24.
    Future Scope  Wecan use satellite images instead of video cameras  In addition, we can propose a system to identify the vehicles as they pass by, giving preference to emergency vehicles and assisting in surveillance on a large scale. tangibility by ask™
  • 25.
    References 1)V. Kastrinaki, M.Zervakis, and K. Kalaitzakis, “A survey of video processing techniques for traffic applications,” Image and Vision Computing, vol. 21, pp. 359-381, Apr 1 2003. 2)D. Beymer, P. McLauchlan, B. Coifman, and J. Malik, “A real-time computer vision system for measuring traffic parameters,” IEEE Conf. on Computer Vision and Pattern Recognition, pp. 495-501, 1997. 3) M. Fathy, and M. Y. Siyal, “An image detection technique based on morphological edge detection and background differencing for realtime traffic analysis,” Pattern Recognition Letters, vol. 16, pp. 1321-1330, Dec. 1995. 4) M. Piccardi, “Background subtraction techniques: a review,” IEEE International Conference on Systems, Man and Cybernetics 4, pp. 3099- 3104, Oct. 2004. 5) R. Cucchiara, M. Piccardi, and P. Mello, “Image analysis and rule-based reasoning for a traffic monitoring system,” IEEE Trans. on Intelligent Transportation Systems, Vol. 1, Issue 2, pp 119-130, 2000 tangibility by ask™ ©creative ask ™