Academia.eduAcademia.edu

Intelligent Surveillance and Security System

2015, International Journal of Innovative Research in Computer and Communication Engineering

From centuries humans have been insecure regarding his personal belongings; be it land, food or money security. With advancement in technology in the recent times various security issues have aroused. The technology currently being used to tackle these issues is video surveillance and monitoring. Thus we propose a new system based on face detection and tracking. The system detects the human face with the help of web camera and the face detection algorithm based on Haar-like-feature extraction and AdaBoost (Adaptive Boost) algorithm implemented on Processing IDE. The detected face is tracked using the OpenCV and Arduino, targeted using the Unmanned Gun Control (UGC) mechanism.

ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 Intelligent Surveillance and Security System Monali Chaudhari¹, Gauresh Vanjare², Dhairya Thakkar³, Malay Shah4, Amit Kadam5 Assistant Professor, Dept of EXTC, Vivekanand Education Society Institute of Technology, Chembur, Mumbai, India.1 B.E Student, Dept of EXTC, Vivekanand Education Society Institute of Technology, Chembur, Mumbai, India. 2,3,4,5 ABSTRACT: From centuries humans have been insecure regarding his personal belongings; be it land, food or money security. With advancement in technology in the recent times various security issues have aroused. The technology currently being used to tackle these issues is video surveillance and monitoring. Thus we propose a new system based on face detection and tracking. The system detects the human face with the help of web camera and the face detection algorithm based on Haar-like-feature extraction and AdaBoost (Adaptive Boost) algorithm implemented on Processing IDE. The detected face is tracked using the OpenCV and Arduino, targeted using the Unmanned Gun Control (UGC) mechanism. KEYWORDS: Open Computer Vision (OpenCV), Processing, Face Detection Algorithm, Unmanned Gun Control Mechanism, Servo, Arduino, Pan and Tilt Mechanism. I. INTRODUCTION Security has become a major concern in this highly advanced age. Over the period of 40 years, a human resource safeguarding a region is being replaced by many CCTVs controlled by a single man. Potentially more advancement in technology has led to more crimes. Our project attempts to provide a solution to reduce the human resource and fetch reliable results. The primary purpose of this project is for the military applications. The borders are still protected by fencing and a soldier monitoring from a watch tower. The soldier provided with ammunition, armor and a flash light is solely responsible for the protection of border. The proposed work aims to provide an efficient way to track the intruder automatically when it reaches its perimeter and target him accurately in order to abolish it. To track a human intruder various methods have been developed. To accurately classify humans from all living beings face detection method can be used. A human face would be suitable to detect a potential human intruder. Hence we have used face detection to detect a human. Face detection, as the name suggests detects a human face based on the structure of human face or else compare it with training data set. Over a span of 2 decades traditional approach of using simple heuristic and anthropometric techniques[1, 2] are replaced by more robust schemes. The use of neural networks and statistical networks has paved the way to extract features from the face [3]. Feature extraction takes into consideration the skin color, face geometry which detects a face with less latency.Commonly used face detection methods are: 1. Knowledge based/feature based 2. Statistical based/model based 3. Integration of both [4] Knowledge based approach needs prior knowledge of the face structure and is suitable for limited class of backgrounds but needs more integration of features.A statistical method detects face by using a classifier. A classifier marks the face region so that detection speed is increased by a smaller extent. It has high robustness and is suitable for different backgrounds [4]. Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2291 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 II. RELATED WORK With the need for efficient and reliable security system numerous steps have been taken to achieve the humanmachine interface. Face detection finds its use in variety of applications such as surveillance system, attendance based system, energy conservation, etc. Another major interest is to detect the presence of human and effectively track his attention. Face detection when used along with face recognition results for solution of various challenges faced recently by world. For recognizing the person in image, the prior requirement is to detect the person. Face detection helps in detection of human. Face detection can be implemented using various methods. Kath-Kay Sung and TomasoPoggio [5] implemented example-based learning algorithm to locate the human face patterns by means of Gaussian clusters. The decision procedure decides the presence of face based on distribution-based generic model generated using database of about 1000 images. In [6], Rowley, Baluja and Kanade used Neutral Network for face detection. The method classifies the image containing faces and images not containing faces using feature extraction to detect the face. To achieve high detector accuracy and reduce the size of training set method, “Bootstrap” algorithm is used to decide the “images not containing face”.Moghaddam and Pentland [7] demonstrated a probabilistic face detection method which uses Eigen space decomposition for estimation Schneidermen and Kanade [8] proposed a statistical method for 3D object detection.The proposed work is based on the method developed by Viola and Jones [9]. The Haar-like features are computed rapidly on the images by the introduction of Integral images. The face detection is implemented by further classifying, the Haar-like features using a boosting process to select weak classifier and then cascading the classifiers to increase the speed of detection. III. PROPOSED WORK A. FACE DETECTION ALGORITHM The AdaBoost algorithm [10, 11] provided fast and robust face detection. This algorithm converts a weak classifier into a strong classifier. Implementation of this algorithm is carried out using OpenCV i.e. Open Computer Vision. OpenCV facilitates easy use giving desired results without compromising the industrial standards.Computer vision processing an image 3 stages [4]: Fig.1.Process level in computer vision In Figure 1,low level processing involves improving the quality of the image. Midlevel processing does the job of feature extraction and pattern detection task. High level processing does the job of final representation of detected face with contour around the face. AdaBoost algorithm helps to select small features from the face that facilitates fast and easy computation [9].Unlike other methods, AdaBoost algorithm gives desired region of the object discarding unnecessary background. The working model can in interpreted by using neural networks [9].  Given image is in the form (𝑥1 , 𝑦1 )……. (𝑥𝑛 , 𝑦𝑛 )  𝑦𝑖 =0,1 for negative and positive examples. 1 1  Initialize the weights 𝑤1,𝑖 = , for 𝑦𝑖 =0,1 respectively, where m and l are number of positives and negatives 2𝑚 2𝑙 respectively. 𝑤 1. For t=1,..,T:Normalize the weights,𝑤𝑡,𝑖 = 𝑛 𝑡,𝑖 (1) 𝑤𝑡 is the probability distribution Copyright to IJIRCCE 𝑗 =1 𝑤 𝑡,𝑖 10.15680/ijircce.2015.0303174 2292 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 2. 3. 4.  For each feature j, train a classifier ℎ𝑗 which is restricted to use a single feature.The error is evaluated with respect to 𝑤𝑡 , 𝐸𝑡 = 𝑖 𝑤𝑖 |ℎ𝑗 (𝑥𝑖 ), 𝑦𝑖 | (2) Choose the classifier ℎ𝑡 with lowest error 𝐸𝑡 Update the weights 1−𝑒 𝑤𝑡+1,𝑖 = 𝑤𝑡,𝑖 𝐵𝑡 𝑖 (3) Where 𝑒𝑖 =0 if examples 𝑥𝑖 is classified correctly. 𝑒𝑖 =1 otherwise 𝑒 And 𝐵𝑡 = 𝑡 1−𝑒 𝑡 The final strong classifier is: h(x) = 1 𝑇 𝑡−=1 𝑎𝑡 ℎ𝑡 1 where𝑎𝑡 = log 𝐵𝑡 𝑥 ≥ 1 2 𝑇 𝑡=1 𝑎𝑡 (4) AdaBoost learning process is fast and gives more number of desired data. This data can be classified into classifier. A classifier contains small features the face. It is commonly employed for pattern detection.This method has high accuracy and detection speed with about 1% false detection [9] but requires more time to train.Haar like features are used to detect variation in the black and light portion of the image. This computation forms a single rectangle around the detected face. Based on the color shade near nose or forehead a contour is formed. Some commonly used Haar features are: 1. Two rectangle feature. 2. Three rectangle feature. 3. Four rectangle feature. (a) (b) (c) Fig. 2. (a) Two Rectangle Feature, (b) Three Rectangle Feature, (c) Four Rectangle Feature The value of two rectangle feature is the difference between the sums of the pixels within two rectangle regions. In three rectangles, the value is center rectangle subtracted by the addition of the two surrounding rectangles. Whereas four rectangle features computes the difference between the diagonal pairs of the rectangles.Figure 3shows two features of Haar. (a) (b) (c) Fig. 3.(a)isthe original unaltered image, (b) shows the feature extraction using the difference in the intensity between eyes and the upper Cheeks as the eye region is anytime more dark. (c) Compares the intensity in the eye region and across the bridge of the nose Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2293 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 B. BLOCK DIAGRAM: Fig. 4.Block diagram of proposed work The system consists of a web camera, Arduino and two servo motors. The web camera provides the live feed to the system to perform face detection. The face detection algorithm runs on PROCESSING IDE that provides the coordinates of image as per the motion of the object. These coordinates are fed to Arduino using asynchronous serial communication. The Arduino decodes the coordinates received and commands the servo motors to movein a direction opposite to that of motion of a person.The unmanned gun control mechanism based on pan and tilt assembly is used as a targeting system. The laser is used as an indication for the firing of gun. IV. IMPLEMENTATION ANALYSIS A. HARDWARE IMPLEMENTATION: (a) (b) (c) Fig. 5.(a) Pan assembly, (b)Tilt assembly, (c)Project setup The hardware consists of a Webcam and an Unmanned Gun Control mechanism (UGC). The face is detected using the face detection algorithm via webcam. The detected face is then tracked using tracking algorithm and the coordinates of the face tracked are sent to the Arduino which accordingly moves the UGC. The UGC is built on a pan Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2294 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 and tilt mechanism for moving the turret in x-direction i.e. pan motion and y direction i.e. tilt motion. Pan and tilt mechanism is constructed using two servo motors, one for pan movement and other for tilt movement. In pan motion, turret can move 180°, while in tilt motion, turret can move 120°. We have used gears so as to increase the torque. Driving gear has 20teeth while the driven one has 60 teeth thus giving a ratio of 1:3 due to which torque get multiplied by 3i.e. servo motor torque increases from 3 kg to 9 kg, while speed gets divided by 3 as compared to that of servo motor using formula: Updated Torque = Actual Torque * Number of teeth of Driven Gear Number of teeths of Driver Gear For pan mechanism, driving gear is connected to servo motor while driven gear is connected to tilt mechanism using an axle. For tilt mechanism driving gear is connected to servo motor while driven gear is connected to the gun mechanism. For making pan mechanism a wooden box is used with two „C‟ shaped supporting brackets for vertical axle using mechanics kit. While for tilt mechanism a rectangular structure is made which consist of tilt servo motor, gears and the turret. B. SOFTWARE IMPLEMENTATION: Fig. 6. Software Implementation Figure 6demonstrates the movement of the system. We have employed a segmentation principle to divide image frames(X *Y) into small parts of (x * y) dimension. A contour is formed around the face and mid-point is traced. This mid-point is then located between the segments and the coordinates calibrated in terms of angle rotation is send to Arduino for servo movement. The successive coordinates are compared with previous one so that the servo motors move with desired value. The flowchart of the proposed work is as shown below. Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2295 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 Fig. 7. Flowchart for PROCESSING IDE Fig. 8. Flowchart for ARDUINO IDE Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2296 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 Fig. 9. Flowchart of proposed work Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2297 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 V. RESULTS AND DISCUSSION Fig. 10.(a) The target is in close proximity about 2meters, (b) The target is away about 4meters, (c) Four targets appears simultaneously on the screen, (d) The target turns 90 degrees, (e) Target hides its eyes, (f) Three targets face towards the camera and one is at 90 degree Haar cascade enables fast detection and tracking of the human face. We have implemented the code on Windows 7,Intel i5, 4GB RAM laptop at 15 fps. A green contour is formed around detected face after statistically calculating the difference between the intensity levels. We have used 3 rectangle features to detect face. Figure 10 (a) and 10 (b) shows the reliability of the software to detect face upto a certain range. Figure 10(c)shows the robustness of the algorithm to detect four faces simultaneously. Figure 10(d) depicts the failure to detect a face positioned sideways. Figure10(e) Shows the result when the target‟s eyes are covered. Due to this, the algorithm cannot compute the appropriate intensity difference between the eyes and the bridge of the nose. In this case this method fails. Similarly,in Figure 10 (f) when the target at 90 degree from the camera, difference in the intensity level cannot be calculated because only one side of the face is exposed, which is insufficient to get variation in the intensity levels. Third drawback is multiple face detection. This phenomenon occurs due to the trained file whichhas all data points mapped for standard faces in the world. VI. CONCLUSION The system developed targets 8 out of 10 times accurately, when the person comes in front of the camera.The system fails to target an object at the external edges of the 640x480 frame. The face detection method that we have used efficiently detects the upright front face when looking into the camera. But when it comes to detection and tracking the rotated faces, the problem still persists. With various use of face detection methods, the growing interest is to track the attention of person by detecting the face[12]. To detect crossed faces an algorithm developed by Cruz [13] could be used. Further accuracy could be improved by using motion tracking along with face tracking proposed by Cai, Yinchao [14]. REFERENCES 1. 2. 3. 4. 5. Valentin, Dominique, et al. "Connectionist models of face processing: A survey." Pattern recognition 27.9 (1994): 1209-1230. Hjelmås, Erik, and Boon Kee Low. "Face detection: A survey." Computer vision and image understanding 83.3 (2001): 236-274. Faizi, Amir. Robust face detection using template matching algorithm. Diss. University of Toronto, 2008. Viraktamath, S. V., et al. "Face Detection and Tracking using OpenCV." The SIJ Transactions on Computer Networks & Communication Engineering (CNCE) 1.3 (2013). Sung, Kah-Kay, and TomasoPoggio. "Example-based learning for view-based human face detection." Pattern Analysis and Machine Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2298 ISSN(Online): 2320-9801 ISSN (Print): 2320-9798 International Journal of Innovative Research in Computer and Communication Engineering (An ISO 3297: 2007 Certified Organization) Vol. 3, Issue 3, March 2015 6. 7. 8. 9. 10. 11. 12. 13. 14. Intelligence, IEEE Transactions on 20.1 (1998): 39-51. Rowley, Henry A., ShumeetBaluja, and Takeo Kanade. "Neural network-based face detection." Pattern Analysis and Machine Intelligence, IEEE Transactions on 20.1 (1998): 23-38. Schneiderman, Henry, and Takeo Kanade. "A statistical method for 3D object detection applied to faces and cars." Computer Vision and Pattern Recognition, 2000. Proceedings. IEEE Conference on. Vol. 1. IEEE, 2000. Moghaddam, Baback, and Alex Pentland. "Probabilistic visual learning for object representation." Pattern Analysis and Machine Intelligence, IEEE Transactions on 19.7 (1997): 696-710. Viola, Paul, and Michael Jones. "Rapid object detection using a boosted cascade of simple features." Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on. Vol. 1. IEEE, 2001. Z.Zhang(2008), "Implementation and Research of Embedded Face Detection using Adaboost", Shanghai JiaoTong University, China. Guo, Lei, and Qiu-guang WANG. "Research of face detection based on Adaboost algorithm and OpenCV implementation." Journal of Harbin University of Science and Technology 5 (2009): 034. Makovetsky, Ruslana, and GayanePetrosyan. "Face Detection and Tracking with Web Camera." Cruz, Claudia, Luis Enrique Sucar, and Eduardo F. Morales. "Real-time face recognition for human-robot interaction." Automatic Face & Gesture Recognition, 2008. FG'08. 8th IEEE International Conference on. IEEE, 2008. Cai, Yinghao, Gérard Medioni, and Thang Ba Dinh. "Towards a practical PTZ face detection and tracking system." Applications of Computer Vision (WACV), 2013 IEEE Workshop on. IEEE, 2013. BIOGRAPHY Mrs. MonaliChaudhariis an assistant professor at Electronics and Telecommunication Department of VESIT, Mumbai University, with 9 years of teaching experience. She has done Masters in Engineering from Mumbai University. Her area of interest includes Image Processing and Wireless Technology. GaureshVanjare is currently pursuing B.E. (Final Year) in Electronics and Telecommunication (Mumbai University) from V.E.S. Institute of Technology, Mumbai.Council member of ISTEVESIT.His area of interest includes Image Processing, Artificial Intelligence and Embedded Systems. DhairyaThakkar is currently pursuing B.E. (Final Year) in Electronics and Telecommunication (Mumbai University) from V.E.S. Institute of Technology, Mumbai.He is an Oracle Certified Java Programmer. His area of interest includes Image Processing, Embedded Systems and Computer Networking. Malay Shah is currently pursuing B.E. (Final Year) in Electronics and Telecommunication (Mumbai University) from V.E.S. Institute of Technology, Mumbai.His area of interest includes Image Processing and Embedded System. AmitKadam is pursuing B.E. (Final Year) in Electronics and Telecommunication (Mumbai University) from V.E.S. Institute of Technology, Mumbai.His area of interest includes Image Processing and Embedded Systems. Copyright to IJIRCCE 10.15680/ijircce.2015.0303174 2299