Professional Documents
Culture Documents
difference of images for two frames, compares with a threshold and 2.2 Three-frame differential method
then binarize the images to get the moving target [5]. To determine
whether there is a moving target and its location, formula is given as
The standard three-frame differential method on the basis of the two
follows.
frame image differential, every two of three images taken connected
to the differential, then the differential image for further processing,
logical and operator, obtain the secondary differential results[6]. The
{I, If[1 I,(x,y)-I'_l(x,y) I> T]
S,(x,y) (1) schematic diagram is shown in Figure 2:
otherwise
=
0,
information of the images of the two frames is little close (for operation on Dk and dk +1 differential image, we can get a final
example, the object is pure black), overlap area of A and B portion differential image Dk.
will not be detected as a motion area, forming "empty".
*This work was supported in part by National Natural Science
Foundation of China (No.6l2032241F030307), and the Sic-Tech
Innovation Foundation Shanghai Municipal Education Commission
(No.13YZlOl), and Shanghai Municipal Electric Power Company
Science and Technology Project (No.JYYBGKJ[2013]170), and kt-l
Shanghai Municipal Electric Power Company Science and
k
Technology Project (JYYBGKJ[2013]124).
B (a) (b)
AB
kt-1
kt-1
A k
(c) (d)
Figure 3. Three-frame differential method
97
Proceedings of the 2013 International Conference on Wavelet Analysis and Pattern Recognition, Tianjin, 14-17 July, 2013
As shown in Figure 3 (a), the object moves from Frame k-t to Frame appear when the target is elongated with the two-frame differential
k. After the frame subtraction, we can get dk, the green and red method.
regions in the Figure, while dk+! is the green and blue region. After According to the three-frame differential described above, the
the logic AND operation, we can get Dk, the green region, i.e. the following is the indoor Lab's video target detection experiments. As
complete motion region in Frame k. Three-frame differential method shown in figure 4
successfully overcomes the shortcoming that the "ghosting" easily
(a) The 149th frame (b) The 150th frame (c) The 15lth frame
(d) First two frames differential (e) Follow two frames differential (t) Three-frame differential
Figure 4. Three-frame Differential
Figure 4 (d) is the 149th frame difference image with 150th frame. 3. Improved Algorithm
Figure 4 (e) is the 150th frame difference image with 151th frame.
There is an obvious "ghosting" phenomenon, and also caused the
3.1 Image Edge Detection
result of cavitation as the single colors of coat and trouser; (d) and (e)
make the And operation, then obtained the result of three-frame
differential as the figure 4 (t). As can be seen the results of the three The image edge detection is to detect the edge of the image. The edge
differential is effective removed the phenomenon of "ghosting", but of the image is the collection of pixels that has obvious step change
empty phenomenon still exists, and also the loss of part of the compared to the gray values of the surrounding pixels, and it is
boundary information. generally present in the junction between the region and region,
target and target, target and background. Edge has two characteristics:
along the trend of the edge of the image, the change to the pixel value
of the image is relatively flat; while along the vertical direction and
edge, the change to in pixel value is dramatic, presenting a step
shaped or ramp-like way. The first order derivative of the pixel
values on the edge is great, and the second derivative value is zero at
the edges, showing zero-crossing. The edges of the image contain
most of the information of the image. Other features of the images
98
Proceedings of the 2013 International Conference on Wavelet Analysis and Pattern Recognition, Tianjin, 14-17 July, 2013
are derived based on the basic characteristics relevant to the edge and 3.2 Dilation Operation
the area. It is the basis of image segmentation and image matching.
Canny edge detector is the most popular tool for edge detection and The dilation operation is make all background points are merged into
has many applications in the areas of image processing, multimedia contact with the object in the object, so that the boundary outward
and computer vision [7]. The Canny algorithm optimizes the edge expansion process. It can be used to fill the holes in the object [9].
detection through noise filtering using an optimal function Dilation operation expressed by G EEl B , which is defined as
approximated by the first derivative of a Gaussian. The Canny edge
follows:
detector uses a filter based on the first derivative of a Gaussian to
suppress image noise. An edge in an image may point in a variety of
directions, so the traditional Canny algorithm uses various operators
to detect edges in the noise-filtered image in four directions:
(3)
horizontal, vertical and two diagonal directions. The use of an edge
detection operator returns a value of intensity gradient.
After Image filtering, we need stretching process to grayscale images
that make the image gray distribution wider range, and enhance the The formula (1) is based the image to obtain the origin of the B and
image contrast and edge rate of change. concrete treatment as shown a displacement of the image. The elements of G expanded by B are
{
in Equation 1: the set of a. B and G at least has one element overlap. The same
with other morphological operations, set B is often referred to as
0O:-:::;f(x,y)<u structural elements. Principle as shown below:
Mg V:-:::;f(x,y):-:::;Mj
Wherein M g = Mf = 255, u, V are constants.
o • i 0
can use the distribution of gray gradient to reflect this change. Classic
and simple edge detection method is to operator the edge of the G B
construction of a neighborhood of pixels in the original image. Since
Figure 6.Dilation Operation
the original image often contain noise, and edge and noise shares
similar characteristics on the spatial and frequency domain.
Therefore, it is difficult to distinguish them, making the image edge
detection difficult. The image edge detected via Canny operator edge
detection is the most complete, and the continuity is also very good 3.3 Local Boundary Connection
and the detection is better than other operators [8]. Although
theoretically, the complexity of Canny edge detection is highest, with In image edge detection, due to the presence of the pixel noise and
the rapid development of computer technology, its processing speed other factors, tends to make the edge of the image fracture and the
has been fully in line with the real-time requirements. brightness of the spurious is not continuous and is difficult to obtain
full edge characteristics. After a typical edge detection algorithm we
need to edge connection, some detected edge fragment was ligated
into a complete boundary. Analyze the characteristics of each point
(x, y) in the image with a small area, is one of the easiest method of
connecting edge. All in accordance with a predetermined criterion is
considered to be similar points are connected, formation an edge to
meet these criteria pixels. In this analysis process, to determine the
edge pixels of the similarity of the two main properties is the gradient
strength and gradient direction [10]. Therefore, if the following two
(a) Original image (b) Canny Algorithm
formulas:
Figure 5. Improved algorithm principle
99
Proceedings of the 2013 International Conference on Wavelet Analysis and Pattern Recognition, Tianjin, 14-17 July, 2013
la(XpYl)-a(X2'Y2)1 � Ta (5)
.. "
I I
Considered point(xl, y2) and the point (xl, y2) are located on the fk_1 and fk do
differential Extract the edge of
same one edge. Wherein, T is the gradient intensity similarity
G
I I
Three difference
.. K-th image by edge
method
I I
threshold value, T is the gradient direction for the similarity detection
a Dilation
threshold.
I
..
I I
By edge detection and dilation operation, combined with the inter
frame difference do some image pre-processing. And then combine Or operation
100
Proceedings of the 2013 International Conference on Wavelet Analysis and Pattern Recognition, Tianjin, 14-17 July, 2013
(a) The 150th frame (b) Two frame differential (c) Expansion operation
(d) Canny edge detection (e) AND operation (f) Three frame differential
• . .
,- ,-
"t ,J
A.
-'l. . -'l .
.. . .. .
.
'. '.
I . I . •
,,"
,\. . ,\. .
.� .� .- ..
(g) OR operation (h) Expansion (i) Black and white conversion
. .
,-
. . -- �
... . ... -_ .. ...... "-"
"! A
-
. .n . ..��
.. .
'. ,,
I . • I - .' " . 'Ie,_
,\. . . ,;..
"
.� . - .. �
(j) Small area to remove (k) Conversion and corrosion (1) Small area to remove
Figure 8. Improved algorithm experimental results
101
Proceedings of the 2013 International Conference on Wavelet Analysis and Pattern Recognition, Tianjin, 14-17 July, 2013
In Figure 8, (b) is for the two-frame differential image, which has Acknowledgements
empty phenomenon and ghosting; the result after AND operation on
(c) obtained after dilation and edge detection result (d); (f) is for the This work was supported in part by National Natural Science
three-frame differential image, although the ghosting is removed, a Foundation of China (No.612032241F030307), and the Sic-Tech
lot of edge information is lost, and the significant empty phenomenon Innovation Foundation Shanghai Municipal Education Commission
is still present; after phasing (e) and (f) , we can get a more complete (No.13YZI01), and Shanghai Municipal Electric Power Company
boundary contour diagram (g). The image (g) has a large number of Science and Technology Project (No.JYYBGKJ[2013]170), and
empty and noise point, we need to do a series of mathematical Shanghai Municipal Electric Power Company Science and
morphology process and connectivity testing on it. We can get (h) Technology Project (JYYBGKJ[2013]124).
after dilation operation on (g) and get (i) after exchange black and
white image of (h). And we can obtain FIG. G) by having a References
connected domain detection on (i) and retaining only the largest area
[1] Zhao Ming-ying and Zhao Jun. A novel method for moving
(i.e., a background area), we can get (k) after making a black and
object detection in intelligent video surveillance systems[C].
white conversion and corrosion on G), and then we complete filling International Conference on Computational Intelligence and
of the movement of the target area in a disguised form. There are still Security, Guangzhou, 2006, 2: 1797-1800.
some isolated noise points, so we should make fmal domain detection
and remove small areas to get the final test results (1). [2] Ritter G X, Wilson J N. Handbook of Computer Vision
Algorithms in Image Algebra. CRC Press, 2000.
From the above experimental results can be seen that the results of
this algorithm is still quite good, effective solution to the cavitation [3] Wang Yaoming,Wang Hao. Radon Transform and its
of the three difference method and edge deletion, and the Application to Image Recognition. Journal of Shanghai Dian Ji
computation involves only a simple image subtraction, corrosion University,2005,8(5):6-10.
expansion computing and connectivity detection computationally [4] Wang Bin, Pan Jianshou, Liang Yanbing, Moving detection of
intensive, time-consuming short track can well meet real-time video images based on Matrox card., Journal of Northwest
requirements. University. 2004,2(3), pp:I-7
Figure4(f) and Figure8(1) shows through comparison of the three [5] ZORAN Z. Recursive unsupervised learning of fmite mixture
frame differential with its improve can be shown as following: models [J].IEEE Transactions on Pattern Analysis and Machine
improved algorithm eliminates ghosting, complements most empty, Intelligence, 2010,26(5): 651-656.
and the boundary data to supplement complete, the results obtained
with the video closer to the target, which provides a good track for [6] WANG Bing, FAN Shao-sheng .An improved Canny edge
tracking part 0 bject. detection algorithm[C).2010 Second International Workshop on
Computer Science and Engineering,2009:497-500.
[7] ZHAO Hui-li, QIN Guo-feng, WANG Xingjian. Improvement
4. Conclusions of Canny algorithm based on pavement edge detection [C].201O
3rd International Congress on Image and Signal
This paper proposes a real-time moving target detection algorithm for Processing,2010:964-967.
the moving target detection with a static background on the basis of
[8] [2] R. Gonzalez and R. Woods, Digital Image Processing, 2nd
inter-frame differential and edge detection algorithm. The improved
ed. Upper Saddle River, NJ, USA: Prentice Hall, inc, 2002.
algorithm overcomes the empty phenomenon and edge deletion
problems of standard three-frame differential. It extracts the profile [9] Q. Zhang, T. S. Yeo, H. S. Tan, and Y. Luo, "Imaging of a
of the moving object and fills the empty space by a series of moving target with rotating parts based on the Hough
mathematical morphology. The improved algorithm still has some transform," IEEE Trans. Geosci. Remote Sens., vol. 46, no. 1,
limitations. In the environment with strong light and obvious shadow, pp. 291-299, Jan. 2008.
the effect is not ideal. It still needs further improvement. For [10] [4] Otsu, N., A threshold selection method from gray-level
backgrounds with changing conditions and jitter, the effect of this histograms. IEEE Trans. on System, Man and Cybernetics, 1979,
method to detect moving targets is not very ideal and we need to 9(1), pp. 62-66
further research and exploration. Another future research direction is
the background with translation transformation. [11] Muyun Weng, Mingyi He, "Image Detection Based on SUSAN
Method and Integrated Feature Matching" P], International
Journal of Innovative Computing, Information and
Control,Vol.4, No.3, March 2008. pp. 671--680.
[12] Gonzalez r c. Digital Image Processing Using MATLAB.
Beijing: Publishing House of Electronics Industry, 2000.
102