Path Detection of a Moving Object - CiteSeerX

4 downloads 3079 Views 338KB Size Report
Email: {[email protected], [email protected], [email protected]}. Abstract— This .... position points are connected using “Braselshum Inline. Algorithm”. ... [2] http://www.patentstorm.us/patents/5461231/claims.html.
SHORT PAPER   International Journal of Recent Trends in Engineering, Vol 2, No. 3, November 2009

Path Detection of a Moving Object Soma Datta1, Debotosh Bhattacherjee2 and Pramit Ghosh3 TATA Consultancy Services Ltd, Salt Lake,Kolkata - 700091, India 2 Department of Computer Science and Engineering, Jadavpur University, Kolkata, 700032, India 3 Academy of Technology, Hooghly- 712121, West Bengal, India Email: {[email protected], [email protected], [email protected]} 1

Abstract— This paper presents an algorithm to find out the path of an object which is moving in different frames. These objects are coming from different background. To detect a moving object from different frames correlation is useful but correlation process consumes huge time. So to reduce searching time here selective correlation is used. The proposed algorithm can significantly speed up the computation of the block matching because for many search position of the block, only 1/4th size of that block needs to be calculated. This paper focuses to minimize the object detection time.

Image Acquisition

Color image to gray image conversion.

Image enhancement to reduce noise.

PREPROCESSING.

Index Terms— Complex conjugate, Correlation, Laplacian filter, NTSC format, Threshold value

Object Recognition Process.

I. INTRODUCTION Path Plotting.

With the ever increasing demand for images on animation, video sequences, ‘moving object detection’ remains a critical issue regarding the cost of data storage and search time. There is some existing algorithm for that like Optical Flow Extraction[1], infrared moving object detection system[2],[3] etc. An infrared moving object detection system comprising first and second infrared detectors which includes an arithmetic circuit to make subtraction between the peak values of signals generated by the detector, and a decision circuit whereby the balance of subtraction is compared with a reference level. But in infrared moving object detection system if some battery driven moving object, which emits very low thermal energy, is present, then this object cannot be detected properly. Optical flow which calculates motion vectors for the current image by looking for similar pixel values in the previous images. But in Optical Flow Extraction if background has changed then this algorithm can’t detect the path of an object in motion. This paper proposed a procedure which is able to remove all these problem along with optimal search time.

Fig. 1 Block diagram of the entire design.

A. Image Acquisition Image Acquisition is the first step. Bit map formatted images are extracted from the video file, where frame speed is 25 frames per second. B. Color image to Gray Image Conversion. The acquired images are in RGB format, which means images are in three dimensional formats. Three dimensional format takes huge computational time, so RGB image is converted into gray image using NTSC format [4] using equation 1, shown in Fig. 2.

⎡Y ⎤ ⎢I ⎥ = ⎢ ⎥ ⎢⎣Q ⎥⎦

0.299 0.596 0.211

0.587 0.114 ⎡ R ⎤ − 0.274 − 0.322 ⎢⎢G ⎥⎥ − 0.523 0.312 ⎢⎣ B ⎥⎦

where luminance(Y), hue(I), and saturation(Q)

II DETAIL DESIGN

The entire work is divided into several steps like image acquisition, color image to gray image conversion, enhancement of the image, Object recognition and path plotting. Fig. 2 The RGB image and corresponding Gray image

37 © 2009 ACADEMY PUBLISHER

(1)

SHORT PAPER   International Journal of Recent Trends in Engineering, Vol 2, No. 3, November 2009 C. Image Enhancement It have been observed that the images extracted from the frames are not with clear-edged. That means those images are slightly hazy. This type of noise is removed by using second derivative image enhancement method which is called Laplacian Filter [4]. The Laplacian value of a pixel is denoted by ∇ 2 f(x,y). and it is defined as:. ∇ 2f(x,y) ∂ 2 (2) ∂2 =

∂x 2

f ( x, y ) +

∂y 2

if [I2]ij < Mmin then [I2bMin]ij = 0 End for End for Step9: Create binary matrix I2b with the same dimension of I2. I2b = I2bMax AND I2bMin. In binary image I2b there are a lot of unnecessary very small contours. They are called noise. So by erosion small contours are removed. Erosion is a morphological operation applied on binary image. In erosion a contour is eroded from its boundary by a pre specified pixel. I2b = I2b is eroded [5] by 7 pixels Step10: In I2b there may be several contours, these contour positions are identified by label matrix technique [6]. If the moving object is present in I2 then it must remain in any one of the contours. Step11: To detect moving object, perform correlation, [4] in the selected positions obtained from step 10 of the image I2 with the ¼ mask of M. if result is satisfactory then perform the sane operation with full mask M Let M is a row×col matrix and f(x,y) selected position, then

f ( x, y )

∂2 f ( x, y ) = f ( x + 1, y ) + f ( x − 1, y ) − 2 f ( x, y ) ∂x 2 ∂2 f ( x, y ) = f ( x, y + 1) + f ( x, y − 1) − 2 f ( x, y ) ∂y 2

(3) (4)

Finally

∇ 2 f(x,y) = [f(x+1, y) + f(x-1, y)+ f(x, y+1) + f(x, y-1)]

-

(5) This expression is implemented at all points (x,y) of the image through convolution.

4f(x, y)

D. Object Recognition and Path Plotting. Since correlation takes huge time therefore to find out an object selected correlation method is used here. Selected correlation method is applied to selected areas instead of whole image area. The algorithm to detect objects is described next.

f(x, y) o M(x, y) =

(6) row − 1 col − 1 1 f ∗ ( m , n ) h ( x + m , y + n ) ∑ ∑ row × col m = 0 n = 0 where x = 0,1,2,3,……… row-1 y = 0,1,2,3,……… col-1 f* denotes the complex conjugate of f. In image f*=f. Step12: If the object is found then find out the position of the middle point of the object, and add the position in the “path” vector. Step13: Perform Step6 to Step12 until no more new image in the frame set. Step14: Connects the discrete points from “path” vector, using “Braselshum Inline Algorithm”. So finally the path of the moving object from the different frames is identified. Step15: Stop

Algorithm1: Object detection algorithm Step1: Let consider I be the base image where moving object is not present. Input I1 is the next image where moving object is present, but background is same with the base image. Step2: To detect the position of the moving object, incoming image is subtracted from the base image pixel by pixel i.e.; I-I1. Step3: The subtracted image is converted into its equivalent binary image with the help of thresholding. Step4: In the binary image there is a block B where constituent pixels of the block is with value 1 and all other pixels are with value 0. Pixel positions of the B block is extracted and stored in ROWb, COLb vectors. The mask M is constructed by taking ROWb, COLb position’s values from image I1 pixels. Step5: set Mmax= Maximum value found in the mask M, and set Mmin= Minimum value found in the mask M, Step 6: Accept new image from the frame, binaries it and store it in I2 matrix after “Image Enhancement”, as discussed earlier. Step7: Create binary matrix I2bMax with the same dimension of I2. For i=1 to number of row in I2 For j=1 to number of column in I2 if [I2]ij > Mmax then [I2bMax]ij = 0 if [I2]ij T called as G1 and consisting of pixels with values = Mmin then [I2bMin]ij = 1 © 2009 ACADEMY PUBLISHER

Fig. 3 to fig. 8.are used to illustrate the algorithm. Fig 3 shows the result of step 2 applied in fig. 2. Result of step7 is shown in fig. 4. When step8 is applied the 38

SHORT PAPER   International Journal of Recent Trends in Engineering, Vol 2, No. 3, November 2009 obtained result is shown in fig. 5. Result of step 9 is shown in fig. 6. In fig 6 there is a huge number of unnecessary points, this points are called noise. Statistical analysing shows that these noises are 4 to 5 pixel thick. So by erosion, up to 7 pixel, this type of noise is removed, this is shown in fig. 7. Finally all object position points are connected using “Braselshum Inline Algorithm”. Fig 8 shows that. Fig. 7 After erosion I2b looks like.

Fig. 3 The subtracted image (I – I1)

Fig. 8 The path of the moving object.

III SIMULATION AND RESULT MatLab [7] is used for simulation of the procedure. If normal correlation is performed to detect an object it takes huge time. For a 600×800 image the total correlation time is 32.9220 second, where dimension of the mask is 39×49 and For the same input image and mask, 1.3590 second is required to detect the same object using proposed algorithm. Therefore, in this case the present system is 24 times faster than normal correlation based object detection.

Fig. 4 After Appling step 7 I2bMax looks like.

IV CONCLUSION Moving object detection technique discussed earlier is quite efficient. 250 frames are used for testing purpose. This method provides 92% accuracy to find out the object moving path. The main strong point of the object detection procidure is to localize the area where correlation is performed. Object recognition time can be reduces if it is implemented in Field Programmable Gate Array [8]

Fig. 5 After Appling step 8 I2bMin looks like.

REFERENCES [1] [2] [3] [4] [5] Fig. 6 After Appling step 9 I2b looks like. [6] [7] [8]

Path Detection of a Moving Object.

© 2009 ACADEMY PUBLISHER

39

http://www-cv.mech.eng.osakau.ac.jp/research/tracking_group/iketani/research_e/node3.html http://www.patentstorm.us/patents/5461231/claims.html http://www.freepatentsonline.com/4612441.html R.C. Gonzalez, R. E. Woods, “Digital Image Processing” Second Edition, Pearson Education. J. Serra, Image Analysis and Mathematical Morphology, Vol.2: Theoretical Advances. New York: Academic Press,1988. R.C. Gonzalez, R. E. Woods, S. L. Eddins, “Digital Image Processing Using MATLAB”. Pearson Education. www.mathwork.com www.xilinx.com

Suggest Documents