You are on page 1of 4

2016 International Conference on Smart Grid and Electrical Automation

The System Design for Improving Vechicle Detection Precision Based on Image
processing

Li Congsheng ,He Zhaoyang


Harbin Institute of Technology at Weihai, Weihai, Shandong, 264209, China
lishengyeach@163.com

Abstract—Research on moving vehicle detection based on information, such as traffic flow, average vehicle speed,
Video and Image Processing is a significant research topic in occupancy rate, vehicle type and so on.
image processing and computer vision, and is also a basic and The detection result is seriously affected by the quality of
key work in intelligent traffic system field, which directly noise and image, freightflow, noise and so on. In the actual
affects the follow-on object identification and tracking, image processing, the edge of target is incomplete and
analysis and understanding of the traffic scene. In this paper occasionally contain cavities. In this paper the main
detection of moving vehicles has been studied, analyed and emphasis of our research is to improve image quality, image
summarized the existing moving object detection technology, features, eliminate interference factor and etc, and it aims to
an moving vehicle detection system is introduced and designed.
set up a set of image processing system to more simply and
In the system the improved frame difference method combined
accurately extract the region of interest from complex scenes.
with image contrast enhancement and morphological filter is
proposed, which can effectively solve the background II. IMAGE PREPROCESSING
difference method and frame difference method can not
extract the regions of interest effectively, besides, using a The transport video images got by the image capture
connected region labeling method to fill the voids in the middle system are always full of noise which caused by complex
of the vehicle image, the target area becomed more complete outdoor ambient light, hardware itself and adding from the
and clear. Using this kind of system can reduce computation, process of signals’ acquisition, conversion and transmission.
improve identification speed, and receive better robustness Therefore, we use digital image pre processing technology to
and higher recognition effect to recognize vehicles more deal with the videos so that we can identify and segment the
efficiently. Therefore the research contents and the system moving vehicle from the image.
design have the practical significance to the research of vehicle
detection technology based on the video. A. Grey Scale Processing
Grey scale processing is to remove the original image of
Keywords-ITS; Vehicle detection system; Frame difference the color information, only toretain the image of the
method;Image processing brightness information. And the information of lightness is
I. INTRODUCTION divided into a total of 256 levels from 0 which represents the
blackest to 255, which represents the whitest.In this paper,
Digital image processing technology is to various weighted average method is used to carry out weighted
technologies and methods of digital image processing by average of RGB three components in color image according
using computer technology. The early method is aimed to to its importance and other indexes. The sensitivity of
improve human’s visual effect, recover the pictures, and human’s eyes towards RGB components are different, which
improve the quality. Later, with the development of has the lowest sensitive to blue and highest sensitive to green,
computer technology and pattern recognition technology, the Therefore, we can use the following formula to weighted
computer digital image processing technology has been average the RGB components and realize image grizzled
improved. It is so widely used that almost involved in every processing.
part of our life and scientific fields. Getting the information Specific formula is as follows:
of the moving target from the video sequence images is the
hot topic in the field of computer digital image processing f x, y   0.30Rx, y   0.59Gx, y   0.11Bx, y 
technology.
A vehicle detection system based on image processing B. Filtering Denoising
technology is very important in the ITS, which is not only to In view of the strong correlation between adjacent pixels
the trend and hot spot but also the heading in the field of of the image, filtering denoising can help to limit or reduce
Intelligence Transportation System. In the system, vehicle the noise signals’ interference to the image, attenuate the
detection based on Video Image Technology is to analyze needless information in the images, improve the quality and
the image sequence of traffic monitoring system collection. highlight the interesting parts selectively.
Since traffic video image holds extremely large amounts of Considering the condition that the mean filter filters out
raw data, we can use the strong correlation between less completely than the median filter the paper uses the
consecutive adjacent frames in temporal and spatial domains median filtering algorithm. Assume that the median filtering
extraction of moving vehicles in order to get more traffic will process an image, the mobile windowis first identified

978-0-7695-5948-3/16 $31.00 © 2016 IEEE 191


DOI 10.1109/ICSGEA.2016.60
Authorized licensed use limited to: KLE Technological University. Downloaded on January 21,2024 at 06:50:27 UTC from IEEE Xplore. Restrictions apply.
which take (x, y) as the center of the N pixel. (N is an odd A. Accumulative Frame Difference Method
number). First, sort each pixel by gray scale (ascending or Accumulated frame difference method combined with
descending). Then, use the sorted intermediate value instead adjacent frame difference method and discontinuous frame
of the center pixel point of window called f(x, y). difference is described as follows.
Specific formula is as follows:
First, compute the adjacent frame difference and the
discontinuous frame difference. Assume height component
f x, y  medianf x k , y t , k , t  w of the Kth frame image on (x, y) is fk(x, y). Then the
C. Image Enhancement Processing adjacent frame difference dk(x, y) and discontinuous frame
difference d’k(x, y) can be expressed as:
Image enhancement processing technology is an image
processing technology which can amend the blur image d k  x, y   f k  x, y  f k 1 x, y 
condition and improve the image quality. In the process of
traffic video images’ acquisition, transmission and d 'k  x, y   f k  x, y  f k  2  x, y 
conversion, various factors can cause the image quality’s
deterioration and degradation. All these factors led to the Then, calculate the cumulative value of adjacent frame
difficult to extract useful information from image. difference and frame difference.Select n frame images to
Image enhancement processing technology is the accumulate the difference of adjacent frame difference and
proper handling of the deterioration and degradation of the frame difference respectively and represent the results by
image. Emphasis on image edge, contour and contrast help m(x,y) and m’(x,y).
the image post-processing to obtain more useful The formula is:
information[1]. Gray transformation method is also called n 1

contrast stretching. It is one of the simplest image mx, y   d k x, y 


k 0
enhancement methods, using the most simple piece wise n 1
linear function to stretch the image. It expands the gray m' x, y   d ' k x, y 
scale of the image from a small area to a larger area to k 0

stretch, in order to achieve the effect of image enhancement.


Finally, to determine the threshold of total accumulated
III. MOVING VEHICLE DETECTION AND RECOGNITION frame difference. The mm(x, y) is the cumulative result of
the adjacent frame difference m(x,y) and the frame
Motion vehicle detection is an analysis of the image difference cumulative value m’(x,y). The threshold formula
sequence of video, detecting the moving vehicle from the is
video traffic image by using the time domain and spatial
domain information of the image. Moving vehicle detection mm( x, y ) if m( x, y )  m' ( x, y ) u
is the basis for the subsequent traffic information mm x, y  
0 else
acquisition, and the subsequent parameters are derived from
the accurate detection of moving vehicles. However, the
diversity of road traffic conditions, background disturbance, The selection of threshold formula directly affects the
ambient light, shadow interference and the influence of the final test results. If the selected threshold is too big, it will
external factors such as camera shake make moving vehicle create cavities inside the cars those are too slow to make the
detection in traffic video face great challenge. moving vehicle extraction not complete. If the threshold
A good moving object detection algorithm should have selection is too small, it will introduce too much noise.
strong robustness, which can detect the moving object from Usually select the threshold in 20 or so can remove more
the video image accurately and quickly to meet background noise, but due to the complexity of the outdoor
requirements of traffic parameters detection. In recent years, ambient light (such as a cloudy day, in the evening, etc.),
people have made a lot of researches on moving object the actual needs of the threshold choice according to the
specific circumstances.
detection technology of video image.Traditional two frame
difference method for moving target detection have large B. Segmentation processing of Moving Target Region
noise, and the result of the detection is incomplete, and After receiving difference image by using the frame
include missed detection and error detection for the too difference method, some steps should be done to complete
slow moving target detection.Therefore, this paper designs the detection of moving vehicle. Frame difference diagrams
the method to detect moving vehicles which combines need to be processed by threshold segmentation to approach
adjacent frame difference method with frame difference image binaryzation. Then, Transform the gray image to the
method. Cumulative frame difference method’s basic idea is binary image
to increase the number of frame difference and then to The characteristic of the binary image is that the image is
improve the accuracy of motion vehicle identification [2]. completely black and white, all pixels in the image of the
gray value of only two possible, either is 0 or 255, that is, the
pixel color is either black or white. The most common way

192

Authorized licensed use limited to: KLE Technological University. Downloaded on January 21,2024 at 06:50:27 UTC from IEEE Xplore. Restrictions apply.
to process binary image is to use the threshold segmentation close operation of the four basic computing. In mathematical
technology. It is particularly applicable when the contrast of morphology of these four types of operation is the basis, all
moving target and background contrast degree is strong. the complex morphological operations can be combined and
Furthermore, the algorithm is simple in calculation and can derived by the four basic operations. In the image processing,
always achieve better regional closure and boundary open operation and close operation are the most basic Image
connectivity for the non overlapping partitions. Threshold denoising method, while in the morphology of corrosion,
segmentation technology principle is to use the threshold to expansion and operation are the basis of open and close.
distinguish images of the moving object region and Erosion operation is one of the two basic operations, in
background region. If the pixel gray values are bigger than the mathematical morphology, mainly used to remove the
the threshold set in advance, they will be changed to 255, as noise of the image of small particles by way of inward
the moving target region; otherwise, they will be set to 0, as contraction of the image contour to eliminate adhesion of the
the background region [3]. target area so that the different detection targets are
Choosing the best reasonable threshold is the key to get independent.
good image segmentation. The aim to select the appropriate Dilation operation is the dual operation of erosion
threshold is to distinguish between foreground points and operation, just the opposite to corrosion operation in the role
background points as accurately as possible. According to of mathematical morphology. It is mainly used to eliminate
the different use of scenarios, the threshold can be divided small particle noise within the target area and to fill the void
into global fixed threshold method and variable threshold in the target area by dilating the range of image contour.
method. Global fixed threshold method in binary threshold Image corrosion expansion processing still has a problem.
in the process of has the fixed parameter, and the algorithm The moving target area of corrode image will be smaller,
is simple. However, the disadvantage is that the miscarriage while the moving target area of expanded image will be
of justice is likely to occur. Thus, in order to obtain good bigger. People designed opening and closing operation to
segmentation results, we must take automatic threshold deal with this problem. Morphological open operation and
method, and the threshold image should be compute with a close operation consist of a combination of dilation and
series of complex operations to dynamically update. erosion algorithm, the images those were dilated and then
Following pictures shows the effect of the iterative processed for corrosion treatment called closing operation.
threshold and the Otsu threshold segmentation. Figure 1 is The images those were corroded and then dilated called open
the interception of a video image in a frame. Figure 2 is the operation.
image after iterative threshold. Figure 3 is the image after To sum up, each of the open operation and close
threshold segmentation. The experimental results show that operation in image processing has its own advantages. We
the Otsu threshold segmentation method has good can use open operation to help smooth processing of image
segmentation effect. contour without changing the area and shape of the moving
object region. Close operation can process the image
IV. IMAGE FURTHER PROCESS fragmentation and the moving target area of small hole
We have realized the foreground region and background filling without changing the position and shape of the
region segmentation, which is not only the first step of moving object region[4].
vehicle detection but also the most important one. However, In this paper, with the integrated use of open operation
due to the influence of the light in the acquisition, and close operationÿs advantages, the filter processing open
conversion and transmission of the outdoor environment, the operation before closing operation is designed to filter the
speed of the moving vehicle and the noise introduced in the images. The experimental results are showned. Figure 1 is
process of collection, conversion and transmission of the the image with threshold segmentation. Figure 2 is the image
video equipment, the quality of image segmentation has processed by morphology.
been reduced. The reduction can be mainly found in many
places, the background is often mixed with some of the
white noise points. The detected white foreground motion
regions mixed with black noise pixels, even within the white
foreground motion regions appears big "hole". The quality of
segmented image noise removal affects the intelligent
transportation systems in the vehicle flow detection, vehicle
recognition, vehicle to positioning and tracking of vehicles.
In this paper, the morphological filtering technology and the
tag based region filling technology are combined to deal
with the two value image, in order to improve the accuracy
of motor vehicle flow detection.
A. Mathematical Morphology Processing 
Figure 1. Image with threshold segmentation
Morphological image processing is based on
mathematical morphology, which contains mathematical
morphology of corrosion, expansion, open operation and

193

Authorized licensed use limited to: KLE Technological University. Downloaded on January 21,2024 at 06:50:27 UTC from IEEE Xplore. Restrictions apply.
(5) Output the modified binary image.
From Figure 2 and Figure 3 we can see that after the
above processing all moving objects are more
distinguishable and more complete.


Figure 2. Image processed by morphology

From Figure 1 and Figure 2 we can see that after


morphological filtering, black background noise of
threshold segmentation image can be eliminated. Also, the 
noise of vehicle area and bodies of the cars are dealt with. Figure 3. Image after region filling
In addition, the contour of the moving vehicle is relatively
smooth, and the fracture of the car bodies are filled up, V. CONCLUSIONS
therefore, the filtering denoising method works. Moving vehicle detection and recognition are the
important parts of the intelligent transportation system, this
B. Area Filling Based On Label research designs a scheme of moving vehicle identification
In most cases the image noise is eliminated, and the in video aimed to identify the moving vehicles in the traffic
small cavity inside the moving car can be filled up after the video accurately. The experimental result shows that using a
label-based area in the binary image being filled, segmented graying, median filtering and gray level transformation
and processed with mathematical morphology filter. But for three-step treatment method is superior to the traditional
some cars with especially slow motion, or the cars whose image pre processing algorithm at the pre processing stage,
body colors are relatively close to the color of the road because it can keep the main features of the subject. At the
surface due to the ambient light, test results often lead to a stage of moving vehicle detection, the system designed
black hole formed inside the car, we can not use the accumulated frame difference method to improve the
mathematical morphology to remove image noises. In these regional moving vehicle recognition’s accuracy after the
cases, area filling can be employed to fill the cavity inside processing of frame difference. Finally, at post processing
the car body [5]. stage, use the algorithm combining morphological filtering
The basic idea is to label the connected areas of the technique with the technology based on tag area filling to
binary image which has been morphologically processed. further process the two valued image. In this way, the area of
Label all the connected area of the binary image, namely the the moving object becomes more complete. In short, this
large white area (moving target area), as 1, and each chunk paper designs a set of video motion vehicle identification
of black area of the connected area (background area) as 0. If scheme, which can obtain the target area of moving vehicles
there are black areas not connected to the black areas which quickly and accurately with sufficient light, and achieved
are labeled as 0, then label them as 2. Finally, judge all areas good results.
that have been labeled as 2. If the dimensions of the black
areas labeled as 2 are smaller than a threshold, then change REFERENCES
the color of these areas from black to white, label them as 1, [1] Huo hongtao, Digital image processing. Beijing:Mechanical industry
and then complete the filling of the car body. If the press.2003.95-100.(in Chinese)
dimensions are bigger than a threshold, then change the label [2] Zhang yurong, Tu zhengzheng Luo Bin, “Moving object detection
of these areas as 0. After the label transformation, only two based on frame difference and wavelet analysis,”Computer
types of labels are left in the entire image, namely label 0 for technology and development, 2008(18). (in Chinese)
background areas and label 1 for areas where several moving [3] Li bicheng, Peng baiqiang Pengbo, Intelligent image processing
technology. Beijing:Publishing house of electronics.2004.177-199(in
cars are detected. Chinese)
Area filling process is as follows: [4] Zhou aijun, “The research of vehicle detection and tracking based on
(1) Start the program video frequency,” Master Degree thesis. Yangzhou, Jiangsu, 2008.
(2) Input a binary image (in Chinese)
(3) Set the labels for the connected area in the image [5] Gao haojun, “The research on vehicle objects detection and
(4) Determine whether the dimensions of the areas recognition based on video image,” Master Degree thesis. Yangzhou,
labeled as 2 are smaller than the threshold value; if the Jiangsu, 2007. (in Chinese)
dimensions are smaller, then label them as 1; if not, label
them as 0.

194

Authorized licensed use limited to: KLE Technological University. Downloaded on January 21,2024 at 06:50:27 UTC from IEEE Xplore. Restrictions apply.

You might also like