Design & Implementation of a Person Authenticating & Commands Following Robot
PROJECT REPORT ON
Submitted In Partial Fulfillment of the Requirements for the Degree of BACHELOR OF TECHNOLOGY
Under the able guidance of Dr. Haranath Kar
ByAditya Agarwal (2002519) Subhayan Banerjee (2003516) Nilesh Goel (2003560) Chandra Veer Singh (2002577)
Department of Electronics and Communication Engineering MOTILAL NEHRU NATIONAL INSTITUTE OF TECHNOLOGY ALLAHABAD 211004, INDIA MAY 2007
Abstract In this project, the algorithms for the speech recognition and face recognition have been developed and implemented on MATLAB 7.0.1.These algorithms can be used for any security system in which the person authentication is required. A security system developed using these two algorithms first recognizes the person to be authenticated using the face recognition algorithm and after proper authentication follows the commands of the person using the speech recognition algorithm. The speech recognition algorithm basically uses the speech templates and the face recognition algorithm uses the Fourier Descriptors for the identification purpose. The proposed algorithms are simpler, faster and economic as compare to previously reported algorithm. These algorithms can be easily implemented on DSP kits (Texas or Analog Devices) to develop an autonomous wireless security system. This security system has been easily mounted on SODDRO (Sound Direction Detection Robot) developed by the same group in November 2006.
Acknowledgments We take this opportunity to express our deep sense of gratitude and regard to Dr. Haranath Kar, Asst.Professor, Department of Electronics and Communication Engineering, MNNIT, Allahabad for his continuous encouragement and able guidance, we needed to complete this project. We are indebted to Dr. T.N.Sharma, Dr.Sudarshan Tiwari, Mr. Asim Mukherji, Mr.Arvind Kumar and Mr. Rajeev Gupta. of MNNIT Allahabad, for their valuable comments and suggestions that have helped us to make it a success. The valuable and fruitful discussion with them was of immense help without which it would have been difficult to present this Robot in its present form. We also wish to thank Mrs. Vijya Bhadauria, Project In-charge, ,Dr.V.K.Srivastava and Romesh Nandwana(B.Tech 2nd Yr.,ECE) for their very kind support throughout the project. Finally, we are grateful to P.P.Singh, staff, Project and PCB Lab, Chandra Vali Tiwari and Ram Sajivan, staff, Basic Electronics Lab, Ram ji, staff, Computer Architecture Lab of MNNIT, Allahabad and the administration of MNNIT, Allahabad for providing us the help required.
Aditya Agarwal Subhayan Banerjee Nilesh Goel Chandra Veer Singh
Certificate TO WHOM IT MAY CONCERN This is to certify that project titled Design & Implementation of a Person Authenticating & Commands Following Robot Submitted by: 1. 2. 3. 4. Aditya Agarwal Subhayan Banerjee Nilesh Goel Chandra Veer Singh
Of B.Tech 8th semester, Electronics & Communication Engineering, in partial fulfillment of the requirement for the degree of Bachelor of Technology in Electronics & Communication Engineering, MNNIT(Deemed University), Allahabad ,during the academic year 2006-07 is their original endeavor carried out under my supervision and guidance and has not been presented anywhere else.
Dr. Haranath Kar Department of Electronics and Communication Engineering Motilal Nehru National Institute of Technology Allahabad Allahabad 211004
05 MAY 2007
Table of Contents
Page Abstract ii Acknowledgments iii Certificate iv Table of Contents v List of Tables vi List of Figures vii Chapter 1: Introduction 1 1.1 Purpose of This Document 2 Chapter 2: Algorithm for Face Recognition 3 Chapter 3: Algorithm for Speech Recognition 6 Chapter 4: System Description & Hardware Implementation 8 4.1a Person to be authenticated 8 4.1b web Camera 8 4.1c Image Acquisition & Processing Tool Box 8 4.2a Voice Commands 9 4.2b Microphone 9 4.2c Sampler 10 4.2d Band Pass Filter 10 4.2e Processing & Decision Making Unit 10 4.2f Microcontroller & Motor Controller Unit 10 4.2g Mechanical Assembly 11 4.3 List of Components 13 Chapter 5: Software Section 14 5.1 MATLAB Code for Face Recognition 14 5.2 MATLAB Code for Speech Recognition 21 5.3 Assembly Code for Sound Detection 33 Chapter 6: Results 51 Chapter 7: Summary & Conclusion 52 7.1 Summary 52 7.2 Conclusion 52 Chapter 8: Future Scope 53 References 54 Appendix A 55
List of Tables Table 6.1 6.2 Title Table for Results of Face Recognition Table for Results of Speech Recognition Page 51 51
List of Figures Figure 2.1 2.2 4.1 4.2 4.2a 4.2b Title A Simple Binary Image Result of Structuring element on Fig.2.1 Block Diagram of Face Recognition System Block Diagram of Speech Recognition System Microcontrollers & Motor Controller Unit Bottom View of Mechanical Assembly page 3 4 8 9 11 12
IntroductionSpeech Recognition & Face Recognition are two important areas that have drawn the attention of so many researchers in the recent years. Face Recognition in a real time application with sufficient efficacy is still a challenge for the researchers keeping in mind the constraints imposed by memory availability and processing time. Here a two dimensional approach of face recognition is introduced. In the proposed algorithm for face recognition first the face is detected in the image using the techniques of edge detection and then the face is recognized with the help of Fourier descriptors. The main advantage of using Fourier descriptors is that these are invariant to translation, rotation and scaling of the observed object. For Speech Recognition the speech templates are used that basically depends upon the intensity and the accent of the speech. The Speech Recognition and Face Recognition modules are the most important stages of any humanoid robot that needs proper authentication of the person before following any instruction. Apart from the humanoid robot the proposed algorithms can be also used in different real time industrial applications. The rest of the report is organized as follows. The description of the algorithm for Face Recognition is given in Chapter 2. In Chapter 3, an algorithm for reliable Recognition of Speech is proposed. The Chapter 4 consists of System Description and Hardware Implementation. The Software Section is given in chapter 5.Results are depicted in Chapter 6.To bind up the report Summary & Conclusion are shown in Chapter 7.Chapter 8 deals with Future Scope and at last References are given.
Purpose of this Document
This project report is prepared as the part of B.Tech final year project in Electronics and Communication Department, MNNIT, Allahabad. The purpose of this project report is to give the detailed description of the algorithms used for speech recognition and face recognition; hardware for speech recognition and software programs used for the development of the security system that at first authenticates the person using face recognition and after proper authentication follows the predefined commands given by him.
Algorithm for Face RecognitionThis algorithm consists of both the face detection and recognition parts .First the edge of the face is detected by using a morphological algorithm of boundary extraction. In this algorithm the image is first converted into a binary image and then erosion is performed after taking a structuring element of 1s and of suitable dimensions (generally 5 5). The edge of the face image ( I ) can be obtained by first eroding A by a structuring element B and then performing the set difference between A and its erosion. If edge of A is denoted by E (A) then E (A) = A (AB) where AB shows erosion of image A by structuring element B. Use of this 5 5 structuring element on Fig. 2 would result in an edge of between 2 and 3 pixels thick as shown in Fig. 3.
Figure 2.1: A simple binary image.
Figure 2.2: Result of structuring element in Fig. 2.1 After getting the edge Fourier descriptors for the edge are calculated. Fourier descriptors are used for the face detection of any object found on input image. The main advantage of using Fourier descriptors is their invariance to translation, rotation and scaling of the observed object. Let the complex array , represent the edge belonging to face. Here value of n depends upon the size of the face and the dimensions of the image matrix obtained during image acquisition. The Fourier transform coefficient is calculated by
The Fourier descriptors are obtained from the sequence by truncating the elements and , then by taking the absolute value of the remaining elements and dividing every element of thusly obtained array by . To summarize the Fourier descriptors are Ck-2 , k= 2, 3..n-1.
The Fourier descriptors for each face edge will be invariant to rotation, translation and scaling. Idealized translation only affects .So it is truncated while evaluating the Fourier descriptors. Idealized rotation only causes the multiplication of with each element. So while calculating Fourier descriptors the absolute value is calculated. Idealized scaling accounts for
multiplication of a constant C with every element and so this effect can be nullified by dividing all Fourier transforms by one of the calculated Fourier Transform Coefficient. As has been already truncated, one good choice is .So every element is divided by . All of the properties described are correct when idealized case of translation, rotation and scaling is considered, but as the input images acquired by our acquisition system are spatially sampled and all of the transformations will occur before image sampling,