2014 Fifth International Conference on Intelligent Systems, Modelling and Simulation
Automated Detection of Animals in Context to Indian Scenario Sachin Sharmah, Dharmesh Shah , Rishikesh Bhavsari, Bhavesh Jaiswalk, Kishor Bamniyax h
Electronics & Communication Department, Gujarat Technological University, Ahmedabad, India Email:
[email protected]
Electronics & Communication Department, Gujarat Technological University, Ahmedabad, India Email:
[email protected] i Electronics & Communication Department, SVBIT, Vasan, India Email:
[email protected] k Electronics & Communication Department, SVBIT, Vasan, India Email:
[email protected] x Electronics & Communication Department, KIRC, Kalol, India Email:
[email protected]
effective as human eyes have some severe limitations. Human eyes need some rest and can’t work efficiently for 24 hours a day to perform an application such as animal detection.
Abstract— Applications based on animal detection have a very important role in many real life situations. Some of these applications are detection and tracking of animals like elephant in forest for understanding their behavior with the environment, preventing animal vehicle collision on roads, preventing dangerous animal entering in residential area, and many more. In this paper first we will briefly summarize some of the methods used for detection of animals and then the application of our proposed method based on pattern matching mechanism using normalized cross correlation for identifying the animal. The proposed method has been applied for testing purpose to various images of dog. Simulation results show that our proposed method is efficient and the system has very low false positive and false negative rates. An overall efficiency of 86.25% is achieved for animal detection.
B. Animal Detection Based on Power Spectrum Power spectral of the image can be defined as the magnitude of the signal in the frequency domain. Initial researches were based on getting the information whether the presence of animal in the image affects the spectrum of the image or no. Work done in [3] showed that this method is not convenient and effective if a person wants to have quick information about the animals detected. C. Animal Detection Based on Threshold Segmentation For finding the details of the targeted animal from background, this approach has been used. Work done in [4] used background subtraction method after getting the background image. The basic idea is that the pixels in the image which are having intensities or values greater than the threshold are set to white (i.e. intensity 255) and those pixels having intensities or values less than the threshold value are set to black (i.e. intensity 0). Work done in [5] showed that it is very difficult and very time consuming to select the threshold value as the background image changes periodically.
Keywords-Animal Detection; Image Processing; Frame Differencing; Normalized Cross Correlation; Pattern Matching
I.
INTRODUCTION
Animal detection is an emerging and a challenging area due to a large number of real life applications. Some of these applications are tracking of animals like elephant in forest for understanding their behavior, preventing animal vehicle collision on roads, preventing dangerous animal entering in residential area and many more [1]. Different animal detection methods and alert systems have been used for showing animals presence in the forest, residential area and/or on the roads. II.
D. Animal Detection Based on GPS Technology The Global Positioning System (GPS) is a free service which is space-based satellite direction-finding system that provides location and time information, on any place where there is a clear line of sight to four or more satellites. Researchers in [6] have used these GPS receivers for navigation and tracking of animals. Our proposed algorithm based on pattern matching mechanism using normalized cross correlation for detection of the animal overcomes all the drawbacks and limitations of the above mentioned animal detection methods.
BRIEF OVERVIEW OF DIFFERENT ANIMAL DETECTION METHODS
Different animal detection and tracking methods have been used for showing animals presence in the forest, residential area and/or on the roads. A. Animal Detection Based on Human Prediction Research done in [2] showed that a human observer is able to take a decision whether a momentarily flashed animal image is having the presence of an animal as fast as 150ms. However this kind of approach is not always 2166-0662/14 $31.00 © 2014 IEEE DOI 10.1109/ISMS.2014.63
III.
PROPOSED METHOD
Figure 1 shows a block diagram of the proposed system 334
1. Capturing the Video For capturing the real time video, we can use IP camera or webcam. In MATLAB command window, typing imaqhinfo will give acquisition tool information. The adaptor is winvideo. Any IP camera or webcam is accessed through this adaptor. For our algorithm we have used the stored video. 2. Detection of the Moving Object A very important step in many computer vision applications is to detect and identify the moving object from the frames. There are some challenges like robustness against changes in illumination, avoid detecting nonstationary background items or objects such as rain, moving leaves and shadows cast by moving objects in building a good background subtraction algorithm. Here for our proposed animal detection system we have used frame differencing method for background subtraction. The results of frame differencing are shown in figure 2. Figure 1. Block diagram of the proposed system
As shown in the figure first the video is captured in which moving objects including animal is there using a camera. Then the video is converted into frames. A very important step is to detect the moving object from the frames which is followed next. A familiar method is to carry out background subtraction, which identifies objects which are moving from the segment of a video frames that differs considerably from a background model. After going through some techniques and method [7], we have used frame differencing mechanism which performs comparatively better than any other mechanism. After moving object detection and separation, the next step is to extract the important features as per our application. When the input information to an algorithm is too huge to be processed and it is found to be extremely unimportant, then the input information will be changed to a reduced image set of features. Different techniques and algorithms for feature extraction are already there. Some of them are blob extraction, template matching, thresholding, Hough transform and many more. For detection of the animal as per our application, we have used feature based pattern (template) matching mechanism using normalized cross correlation. Pattern matching is a method in image processing for finding small parts of an image which matches a pattern image. IV.
Figure 2. Results of frame differencing method
3. Database Creation After performing feature extraction, for creating the database, we have created two folders. One folder has the target images and one folder has the template images. Now for creating the target images, we have extracted the frames from stored (testing) video. For example, here we have used video012.avi as our stored testing video, and then we have extracted frames (images) from that video. So these images are stored and saved as a target images in one folder. Some of the images extracted from the video are shown in figure 3.
IMPLEMENTATION
For the implementation part, we have used MATLAB software toolbox. Following steps were carried out during the implementation phase: 1) 2) 3) 4)
Capturing the video Detecting the moving object (frame differencing) Picking (crop) the animal & save it in the database Using the algorithm for the detection of the animal
335
Figure 5.
Original image and detected image after applying matching algorithm
Figure 3. Target database
V. Template images are created and stored in the second folder. These images are used for comparing the images from target database folder. For the classification and identification of animals, a good source for these images is NEC animal dataset consisting of a sequence of about 5000 images from animals taken at various poses [8]. We are using pattern (template) matching method to compare the target images with template image database. Template images are again used for applying normalized cross correlation idea in finding animal from the frame. We are only concentrating in finding small signal from the large signal. So target image database is used to find template image database. Even if the template image does not match exactly or accurately with target image then also proposed method is such that it is able to detect the object. Some of the template images are shown in figure 4.
IMPLEMENTATION
Here we have calculated & checked the efficiency of our proposed system manually. There are four important parameters for checking the validity and accuracy of the proposed algorithm or the system [9]. First is the true positive (TP), second is the true negative (TN), third is the false positive (FP) and last is the false negative (FN). The true positives (TP) and true negatives (TN) are correct classifications. A false positive (FP) is when the outcome is an incorrectly predicted image feature when the feature is in fact absent. A false negative (FN) is when the outcome of the algorithm is incorrectly predicted as absence of a feature, when in reality it is actually present in the image. FP is also known as false alarm. We will look into more detail this FP and FN parameters in context to our application. A. False Positive Rate False positive rate is very important parameter which indicates and shows that there is a rectangle (box) on the frame even if there is no animal present therein. So, to find the false positive rate for our implemented code in MATLAB, we have taken 160 frames and from that 18 frames are showing rectangle (box) even if there is no animal. So, false positive turns out to be 18 and true negative is 142. Figure 6 shows the false positive rate case.
Figure 4. Template images
4. Pattern (Template) Matching To use the concept of template matching in MATLAB, we have used the method of normalized cross correlation. In digital signal processing, cross-correlation is a measure of similarity of two waveforms as a function of a time-lag applied to one of them. It is normally used for finding a long-duration signal for a shorter known feature. For applications such as image processing where brightness as well as the intensity of both the image and its template can change due to lighting or its exposure, the images needs to have normalization first which is possible by subtracting first the mean and then dividing it by the standard deviation at each and every step. Figure 5(a) shows the original image and figure 5(b) shows the detected image using the concept of pattern matching algorithm.
Figure 6. False positive rate case
336
Methods like frame differencing, and then mix of Gaussian and sum of absolute differences were implemented for background subtraction and were tested on the video. We found that frame differencing method works better. After that database was created for template and target images. Finally the pattern (template) matching method was used for detecting animal from the video. Once the animal is detected in the video an alert (buzzer) message needs to be generated and should be sent to the destination which is yet to be done. We noticed that our proposed method works quite well for detecting animal from the video. False positive turns out to be 18 and true negative is 142 whereas false negative turns out to be 26 and true positive is 134. So our proposed method has an overall efficiency of 86.25% for animal detection. In future machine learning techniques like neural networks or support vector machine can be used which may increase the efficiency of the algorithm in identifying the animal.
B. False Negative Rate False negative rate is yet another important parameter which indicates and shows that even if the animal is present in the frame it do not show the rectangle (box) on the frame. So, to find the false negative rate for our implemented code in MATLAB, we have taken 160 frames and from that 26 frames are not showing rectangle (box) even if there is animal present in the frame. So, false negative turns out to be 26 and true positive is 134. Figure 7 shows false negative rate case.
ACKNOWLEDGMENT We would like to thank Keval Shah, Sagufta Khan and Prachi Rami for providing image and the video material. We would also like to thank Mr. Jaysinh Sagar for helpful tips and comments on the paper. REFERENCES
Figure 7. False negative rate case [1]
S. Sharma and D. J. Shah, "A Brief Overview on Different Animal Detection Methods," Signal and Image Processing: An International Journal, vol 4, No.3, pp. 77-81, June 2013. [2] M. F. Thorpe, A. Delorme, and S. T. C. Marlot, “A limit to the speed processing in ultra-rapid visual categorization of novel natural scene,” Cognitive Neuroscience, pp. 171-180, 2003. [3] F. A. Wichmann, J. Drewes, P. Rosas, and K. R. Gegenfurtner, “Animal detection in natural scenes: Critical review revisited,” Journal of Vision, vol. 10, no. 4, pp. 1-27, 2010. [4] C. Peijiang, “Moving object detection based on background extraction,” Computer Network and Multimedia Technology (CNMT), 2009. [5] J. C. Nascimento and J. S. Marques, “Performance evaluation of object detection algorithms for video surveillance,” IEEE Transactions on Multimedia, vol. 8, pp. 761-774, 2006. [6] M.S. Zahrani, Khaled Ragab and Asrar Ul Haque, “Design of GPS based system to avoid camel-vehicle collisions: A Review,” Asian Journal of Applied Sciences,vol 4, pp.362 – 377, May 2011. [7] Piccardi M, “Background subtraction techniques: A review,” Proceedings of the International Conference on Systems, Man and Cybernetics, pp.3199-3104, 2004. [8] Hossein Mobahi, Ronan Collobert and Jason Weston, "Deep Learning from Temporal Coherence in Video", Proceedings of the 26th Annual International Conference on Machine Learning (ICML'09) , p.737744, June 14-18, 2009, Montreal, Quebec, Canada, June 2009 [9] Y. Oishi and T. Matsunaga, “Automatic detection of the moving wild animals in the snow in multi-temporal airborne remote sensing images”, Proceedings of the 47th Autumn Conference of the Remote Sensing Society of Japan, Nagoya, Japan, pp. 69-70, Nov. 2009 (in Japanese). [10] Wichmann, F. A. Drewes, J. P. Rosas, and K. R. Gegenfurtner,” Animal detection in natural scenes: Critical review revisited,” Journal of Vision, vol. 10, no. 4, pp. 1-27, 2010.
The importance of all this four parameters is that these parameters help us in calculating the efficiency or the success rate which is the ability of the algorithm to extract the region of interest (ROI). The efficiency of the segmentation is given as Efficiency (TN TP) /(TN TP FN FP)
(1)
So the efficiency for our case by putting the values in the equation (1) comes out to be 86.25%. So the success rate of our algorithm turns out to be 86.25% for animal detection. VI.
CONCLUSION & FUTURE WORK
Intelligent animal vehicle collision detection or farm surveillance system refers to the video processing techniques for detection and identification of specific moving objects, in recorded videos of the road or the farm. First we mentioned different methods with their advantages and disadvantages used in the past for detection and identifying the animal. We also showed why animal detection is a very important and emerging area due to a large number of real life applications. Next in our proposed work, we took videos of the road wherein animal was there in it apart from other stationary objects. Then we converted the video into frames (images) and extended our algorithm for identifying moving object from videos. Various image processing methods have been studied and surveyed to identify moving objects in the video.
337
[11] M. Parikh and M. Patel,” Animal detection using template matching,” International Journal of Research in Modern Engineering and Emerging Technology, vol.1, no. 3 , pp. 26-32, 2013. [12] N.Hearing, P. L. Venetianer, A.Lipton,” The evolution of video surveillance: An overview,” Machine Vision and Applications, vol.19 (5-6), pp. 279-290, 2008. [13] C. Papageorgiou, M. Oren, T. Poggio, “A General Framework for Object Detection”, International Conference on Computer Vision, Bombay, India, pp. 555-562, Jan., 1988.
[14] Rahul Gupta and Samir R. Das, "Tracking Moving Targets in a Smart Sensor Network," Proceedings of the VTC Fall 2003 Symposium, Oct 2003. [15] Greg Welch and Gary Bishop, "An Introduction to the Kalman Filter', Tutorial University of North Carolina at Chapel Hill, April 2004. [16] R. E. Schapire and Y. Singer, “Improved boosting algorithms using confidence-rated predictions,” Machine learning, vol. 37, pp. 297– 336, 1999.
338