Professional Documents
Culture Documents
Vehicle Detection and Counting From A Video Frame: Chomtip Pornpanomchai, Thitinut Liamsanguan, Vissakorn Vannakosit
Vehicle Detection and Counting From A Video Frame: Chomtip Pornpanomchai, Thitinut Liamsanguan, Vissakorn Vannakosit
Vehicle Detection and Counting From A Video Frame: Chomtip Pornpanomchai, Thitinut Liamsanguan, Vissakorn Vannakosit
2008
Abstract: area. The users do not have to install much equipment since
The research intends to develop the vehicle detection and we can combine the tasks together. So, the users can reduce
counting system using image processing. Overall works are the cost of investment. Image processing technology can
software development of a system that requires a video stream fulfill this requirement.
and capture to a video frame. They consist of the following Image processing is the technique which is based on the
components: background road without any moving vehicle
and the frame with moving vehicles. The system is designed to
software component that does not require special hardware.
find the differentiation which is the moving vehicles and find With a typical video recording device and a normal
the number of moving vehicles from the video frame. The computer, we can create the detection and counting device.
vehicle detection and counting system consists of four major By using the basic pattern matching theory, we can find the
components: 1) Image Acquisition, 2) Image Analysis, 3) number of objects in the video scene from the known size
Object detection and Counting, and 4) Display Result of the object [2-6].
The experiment has been conducted in order to access the Few image processing key methodologies have been
following qualities: 1) Usability, to prove that the system can applied to this project. The image differentiation is used in
determine vehicle detection and counting under the specific the object detection process, level of difference for the
condition lay out. 2) Efficiency, to show that the system can
work with high accuracy.
image analysis and pattern matching to find the number of
objects [7-9]. The project is still in the prototype mode. We
require more research and development in order to reduce
Keywords:
Vehicle detection; Vehicle counting; Digital Image the system limitation and enhance the efficiency of the
Processing; Multimedia system to be able to perform for a real-world application.
The topic of further enhancement will be discussed at the
1. Introduction end of the document.
This project is about developing an image processing
The idea of using the video camera to count the number system that can detect the number of vehicle from the video
of objects has been proposed as a new way of detection and frame, which is running on specific constraints. The system
counting approach. The current detection and counting is intended to replace the sensor equipment, which has
approaches are based too much on the sensor equipment. some weak points as explained before. The system will be
The use of sensor equipment to count the number of objects created in the form of software which consists of input and
has been widely spread into different kinds of industries. output parts. The input part accepts a data, which is an
Even though the equipment itself provides a benefit to the image from a video scene. The output part is responsible for
user, there are also some disadvantages. The sensor reporting the result to the user.
equipment is only used for real time - the user cannot insert
other kinds of inputs such as video file to the sensor 2. Related work
equipment in order to count the number of objects.
The sensor equipment also has a high cost and it is not a Due to the traffic jam problem in Bangkok, the idea of
multitasking tool [1]. Compared to the video camera applying the technology to solving the problem has been
device, many users have now already installed video launched. Genius Traffic System is used to represent the
camera devices in their offices or buildings for security. We state of traffic in real time for the traveler. The system will
can use these video cameras for multitasking - not only for present the state of the main streets in Bangkok in order to
security, but also as the sensor equipment. That means we resolve the traffic problem [10]. The traveler can make the
can count the number of objects or people in the detection
decision to choose a better way by trying to avoid streets the total time for each car to run through a square. If the
that have traffic jams shown in Figure 1. total time is quite little, it means that a car can run with
speed and so there is no traffic jam. If the total time is very
much, it means that a car can only run slowly and so there
is a traffic jam occurring. The computer system will
measure the total time that the car has occupied the detector
over the time unit. For example, the time unit is 100
seconds and a car has occupied the square area for 100
seconds. This means that there is a traffic jam. The
occupancy ratio is between 0.0 and 1.0 and the related color
is shown in Table 1.
3. System design
357
Proceedings of the 2008 International Conference on Wavelet Analysis and Pattern Recognition, Hong Kong, 30-31 Aug. 2008
358
Proceedings of the 2008 International Conference on Wavelet Analysis and Pattern Recognition, Hong Kong, 30-31 Aug. 2008
image” which is used to show the image after previous 3. The third window area displays the background
processes are done, and the image is displayed in black and which has no cars in the image.
white. 4. The fourth window area displays the image in which
The third component is vehicle detection and counting. noises are recorded and converted into 2-bit image.
The processes in this component are “pattern creation” 5. The fifth window area displays the image which
which will create the patterns for making car detection, shows the detection and counting process. All black
“pattern matching” which uses the rules to detect the object rectangular boxes show a location of all counted
in the captured image and, “counting result” which is used cars.
to show result in the image that crops each detected object 6. The group of Multimedia buttons allows users to
in the image. control the video stream.
The fourth component is display result. The process in 7. The group of text box and command button area is
this component is “display result” which will show the used to select video file path.
object number in the screen after all of previous processes 8. The <Capture> button allows users to capture a
have been done. single frame from the video stream in the first
picture area.
4. System implementation 9. The <Count> button allows the end user to start the
car detection and counting system. The user can
This section explains the design of input and output user press this button again to recount action.
interface. The graphic of user interface will be presented 10. The <Save> button allows users to save the
here. We will introduce how the system performs in real- captured picture in the decided destination
life application. We create the interface by using Visual 11. The <View Report> button and report area
Basic 6, which is also used for programming. allows the user to retrieve all the counting cars at the
present time and view them immediately.
12. The <Exit> button allows the user to close the
application and exit the program.
5. Experimental results
359
Proceedings of the 2008 International Conference on Wavelet Analysis and Pattern Recognition, Hong Kong, 30-31 Aug. 2008
In order to test all functional aspects of the system 5.2.5. Detection and counting from video frame
thoroughly, we set up a test scenario which consists of 5
phases as shown below: After the program gets video frame, the user can click
• Recording Video from top view the count button to call Digital image processing method in
• Converting Video to .AVI file format our system. When the process of digital image processing is
• Playing Video in our system done, it will show block which covers on each car and the
• Capturing Video in our system result that shows the number of cars in the textbox.
• Activating the Detection and Counting from video
Table 2 The effectiveness testing result
Moreover, the test scenario can be used as a user
guideline for using our system in the real world because it Testing time Total number Correct Precision
covers all the steps necessary in order to use our system. of cars counting
The details of each phase are as the following:
Afternoon 233 212 91.98%
5.2.1. Recording video from top view
Since our system is developed for using with the web Evening 192 185 96.35%
camera or video camera which records video from top
view, we have to follow these steps. 1) We need to choose a
location that can record video from the bird eyes’ views. 2) The effectiveness test will be done the same as that in
We need to find a location that can record video clearly. 3) the previous section, but we focus on the correctness of the
We must record video without any annoyance with video or final result. We had tested from different samples of video
web camera. frames which were recorded from different views to prove
that our program can be used to perform the vehicle
5.2.2. Converting video into .AVI file format detection and counting not only in one place but it can also
be implemented with other cases at different time. We have
two data sets for our experiment. The first data set comes
We need to convert video by using any third party
from recording video in the afternoon and the second data
video converter. If our program is implemented with a
set comes from recording video in the evening. Each case
video camera directly, it does not have to convert video file
captures 51 video frames and the results of effectiveness
before using in the system.
testing are shown in Table 2.
360
Proceedings of the 2008 International Conference on Wavelet Analysis and Pattern Recognition, Hong Kong, 30-31 Aug. 2008
References
361