5 mins = half hour 10 mins = 45 mins 15 mins = 1 and a ......image processing image processing:...
TRANSCRIPT
5 Mins = half hour
10 Mins = 45 Mins
15 Mins = 1 and a half hour.
?
AUTONOMOUS FOUR
PHASE INTERSECTION
TRAFFIC LIGHTS WITH
MINIMUM DELAY
Motivation
As Population is expanding day by day, so are the vehicles on the road. The road congestion is
becoming a considerable problem especially in India. How much early I get up, I always miss
my first class at college or sometimes I had reached at lunch break too. I see hundreds of
vehicle standing and just wasting fuel because of the unoperated traffic lights. Is this the way
of sustainable development ?
Conventional methods are even
better than the today's traffic light
system. So I decided to make the
system dynamic and more superior
to eradicate the Delay waiting
period at the intersections.
Introduction
Dynamic Timings of phase : Calculation of Traffic density of four phase intersection using image processing which is done on videos of vehicles that are captured using digital camera. We have chosen image processing for calculation of traffic density as cameras are very much cheaper than other devices such as sensors. According to the calculated density, optimum green ratio or we can say that allotment of green light is done in an efficient manner to reduce the delay of vehicles or indirectly the congestion of traffic.
VIDEO CAPTURE : By Four Cameras At Four Sides of the Intersection.
VIDEO PRE-PROCESSING:
• RGB TO GRAY COLOUR CONVERSION
• GAUSSIAN BLUR
• MORPHOLOGICAL OPERATIONS
• BACKGROUND SUBTRACTION
• BLOB TRACKING
VEHICLE COUNTING OF FOREGROUND MASK IMAGES
ALLOTMENT OF TIME USING WEBSTERS EQUATION
Image Processing
Image processing: Image processing is the process of manipulating image data in order to make it suitable for computer vision applications or to make it suitable to present it to humans. For example, changing brightness or contrast is a image processing task which make the image visually pleasing for humans or suitable for further processing for a certain computer vision application.
Image acquisition
Image manipulation
Obtaining relevant information
Decision making
Image Processing with opencv/c++: OpenCV is an open source C++ library for image processing and computer vision, originally developed by Intel and now supported by Willow Garage.
It is a library of many inbuilt functions mainly aimed at real time image processing. Now it has several hundreds of image processing and computer vision algorithms which make developing advanced computer vision applications easy and efficient.
BLOCK DIAGRAM AND VIDEO
Image Pre-Processing
RGB TO GRAY COLOUR CONVERSION
Signal to noise : For many applications of image processing, color information doesn't help us identify important edges or other features. There are exceptions. If there is an edge (a step change in pixel value) in hue that is hard to detect in a grayscale image, or if we need to identify objects of known hue (orange fruit in front of green leaves), then color information could be useful. If we don't need color, then we can consider it noise. At first it's a bit counterintuitive to "think" in grayscale, but you get used to it.
Complexity of the code : If you want to find edges based on luminance AND chrominance, you've got more work ahead of you. That additional work (and additional debugging, additional pain in supporting the software, etc.) is hard to justify if the additional color information isn't helpful for applications of interest.
Color is complex : Humans perceive color and identify color with deceptive ease. If you get into the business of attempting to distinguish colors from one another, then you'll either want to (a) follow tradition and control the lighting, camera color calibration, and other factors to ensure the best results, or (b) settle down for a career-long journey into a topic that gets deeper the more you look at it, or (c) wish you could be back working with grayscale because at least then the problems seem solvable.
MORPHOLOGICAL TRANSFORMATION
IN IMAGE PROCESSING
Morphological transformations are some simple operations based on the image shape. It is
normally performed on binary images. It needs two inputs, one is our original image, second
one is called structuring element or kernel which decides the nature of operation. Two basic
morphological operators are Erosion and Dilation. Then its variant forms like Opening,
Closing, Gradient etc also comes into play. We will see them one-by-one with help of
following image:
Threshold
Erosion
Dilation
It is just opposite of erosion. Here, a pixel element is '1' if atleast one pixel under
the kernel is '1'. So it increases the white region in the image or size of
foreground object increases. Normally, in cases like noise removal, erosion is
followed by dilation. Because, erosion removes white noises, but it also shrinks
our object. So we dilate it. Since noise is gone, they won't come back, but our
object area increases. It is also useful in joining broken parts of an object.
Dilation
The basic idea of erosion is just like soil erosion only, it erodes away the
boundaries of foreground object (Always try to keep foreground in white). So
what it does? The kernel slides through the image (as in 2D convolution). A
pixel in the original image (either 1 or 0) will be considered 1 only if all the
pixels under the kernel is 1, otherwise it is eroded (made to zero).So what
happends is that, all the pixels near boundary will be discarded depending
upon the size of kernel. So the thickness or size of the foreground object
decreases or simply white region decreases in the image. It is useful for
removing small white noises (as we have seen in colorspace chapter), detach
two connected objects etc.
Erosion
GAUSSIAN BLUR
Smoothing, also called blurring, is a simple and
frequently used image processing operation.
Probably the most useful filter (although not the
fastest). Gaussian filtering is done by convolving each
point in the input array with a Gaussian kernel and
then summing them all to produce the output array.
Assuming that an image is 1D, you can notice that the
pixel located in the middle would have the biggest
weight. The weight of its neighbors decreases as the
spatial distance between them and the center pixel
increases.
Background Subtraction Background subtraction (BS) is a common and widely used technique for
generating a foreground mask (namely, a binary image containing the pixels
belonging to moving objects in the scene) by using static cameras.
As the name suggests, BS calculates the foreground mask performing a
subtraction between the current frame and a background model, containing the
static part of the scene or, more in general, everything that can be considered as
background given the characteristics of the observed scene.
Background modeling consists of two main steps:
• Background Initialization;
• Background Update.
In the first step, an initial model of the background is computed, while in the
second step that model is updated in order to adapt to possible changes in the
scene.
CONTOURS AND BLOB TRACKING
Contours can be explained simply as a curve joining all the
continuous points (along the boundary), having same color
or intensity. The contours are a useful tool for shape analysis
and object detection and recognition.
In OpenCV, finding contours is like finding white object from
black background. So remember, object to be found should
be white and background should be black.
There are two functions: cv2.CHAIN_APPROX_NONE (734
points), cv2.CHAIN_APPROX_SIMPLE(only 4 points)
WEBSTERS EQUATION C0 is the Optimum Cycle Length in Sec
L is Total lost time in Sec
𝑖𝑛𝑌 = Total critical volume/saturation flow
Effective green time per phase =𝑌𝑖 𝑖𝑛 𝑌
gt
2 phase diagram for example.
The Green blocks will become dynamic
and will change according to traffic
density.
CONCLUSION and FUTURE WORK
Drawback of earlier methods
• Wastage of time by lighting green signal even when road is empty.
Image processing with websters equation removes such problem.
Slight difficult to implement in real time because the accuracy of time calculation depends
on relative position of camera.
FUTURE WORK
The focus shall be to implement the controller using DSP as it can avoid heavy investment in
industrial control computer while obtaining improved computational power and optimized
system structure. The hardware implementation would enable the project to be used in real-
time practical conditions. In addition, we propose a system to identify the vehicles as they pass
by, giving preference to emergency vehicles and assisting in surveillance on a large scale.
THANK YOU ;)