Keywords
|
liquid crystal display (LCD), Peripheral Interface Controller (PIC) |
INTRODUCTION
|
This paper reports one of the attempts to automatically recognize face, perform matching and implement it embedding on hardware provided by low cost PIC microcontroller by Microchip Technology. The discussion here will explain the details about the development of a low cost hardware based platform to perform face recognition. |
Computerized automatic human face recognition has been an active area of research for many years. The development of face recognition systems is quite essential in a variety of applications such as intelligent human-computer interfaces, robotics, security systems, bank card identification, access control, surveillance system and so on. Real-time face recognition, in particular, plays an important role in establishing user-friendly human-computer interfacing. Face recognition is used to identify one or more persons from still images or a scene captured from a video by comparing input images with faces stored in data base. It is a biometric system that utilizes methods to verify the identity of the person based on some physiological characteristics. |
While performing real- time automatic face recognition, two tasks are accomplished. The first one is to detect the locations of the faces in an input image independent of conditions such as illumination, focus, size of the faces, poses, alignment etc. This is called face detection. At this stage, the key concern is to detect all the faces without any loss of information due to false negatives despite some false positives included in the detection results. There may be the presence of some partial images. It should be decided very fast whether or not the partial image belongs to faces because such decision must be taken for all the locations in the entire image. |
The detected face is then identified as individual by matching it with the faces in the images stored in the database of the system. The computational cost at this stage is quite reduced as compared to that in the first stage since only a small number of faces are involved in the recognition process. This allows us to execute more complex computation for verification and identification. Therefore, any false positives detected in the first stage can be eliminated by this operation. A number of face detection algorithms such as Eigen faces methods, SVM, component-based detection, neural network etc. are available. In these algorithms, however, a large amount of numerical computation is required. This makes the processing extremely time-consuming. Therefore, it is not feasible to build real-time systems by software running on general-purpose computers. But the proposed algorithm called Canny edge detection algorithm requires minimum numerical computations. Good edge detector must satisfy following parameters: |
i) Good detection: The false edges should be minimum in number. Generally, edges are detected after threshold operation. The high threshold leads to less false edges, but also reduces the number of true edges detected. |
ii) Noise sensitivity: The Edge detector should either remove or reduce the noise to some acceptable level. |
iii) Good localization: The location of edge detected must be as close as possible to the correct position called edge localization accuracy (ELA). |
iv) Orientation sensitivity: The edge detector should not only detect edge magnitude, but it should also detect edge orientation correctly. Orientation can be used in post processing to connect edge segments, reject noise and suppress non maximum edge magnitude. |
v) Speed and efficiency: The algorithm should be faster to be used in an image processing system. An algorithm that allows recursive implementation improves efficiency. |
These all conditions are satisfied by canny edge detection technique. |
EDGE AND EDGE DETECTOR
|
An edge is a point in a digital image at which the brightness changes abruptly or sharply. Edges are organized into a set of curved line segments. In image processing, an edge is generally interpreted as one class of singularities. In a function, singularities are referred as discontinuities in the intensity values where the gradient approaches infinity. However, image data is discrete, so edges in an image often are defined as the local maxima of the gradient. |
Edge detection is a crucial task in image processing. It is a mathematical tool in pattern recognition, image segmentation, scene analysis and hence in face recognition. When an edge detection algorithm is applied to a digital image, it reduces the amount of data to be processed further to the greater extent and therefore filters out information that is less relevant, without the important structural properties being lost. An edge detector is a filter which is used to extract the edge points in an image. In this paper canny edge detector is proposed. |
|
Canny edge detection comprises of following steps: |
1. Smoothing: Blurring of the image to remove Noise. The image is smoothed using a Gaussian filter with a Specified standard deviation, σ, to reduce noise. |
2. Finding gradients: The edges should be marked where the gradients of the image has large magnitudes. |
3. Thresholding: The edge points marked in (2) give rise to ridges in the gradient magnitude image. The algorithm then tracks along the top of these ridges and sets to zero all pixels that are not actually ridge top so as to give a thin line in the output, a process known as non maximal suppression. The ridge pixels are then threshold by so called hysteresis thresholding, which is based on using two thresholds, T1 and T2, with T1 < T2. Ridge pixels with values greater than T2 are said to be strong edge pixels. Ridge pixels with values between T1 and T2 are said to be weak edge pixels. |
4. Finally, the algorithm performs edge linking by incorporating the weak pixels that are 8-connected to the strong pixels. |
It is inevitable that all images taken from a camera will contain some amount of noise. In order to prevent noise being mistaken for edges, noise must be reduced. Therefore the image is first smoothed by applying a Gaussian filter. The mask of Gaussian filter of size 5x5 with a standard deviation of 1.4 is shown below: |
|
Gaussian Mask=1/159 |
A. Canny |
Gaussian can be calculated by using the relation: |
|
Where, x and y represent the coordinate distance from the center pixel (x, y). It is seen obvious that all such values are in the form of fractions. In order to perform mathematical operation on fractions, a floating point number system is required. MATLAB has affluent resources to implement floating point calculation. |
The steps involved in canny edge detection method are best explained by the block diagram shown in fig.2. |
B. Properties of Gaussian Mask/Filter |
Smoothing or blurring of high contrast regions is an important step prior the application of any type of gradient mask on the image. A type of gradient mask namely Gaussian mask is highly sensitive to noise because of its derivative nature. Hence, smoothing results in better edge detection. The following properties can be associated with Gaussian mask: |
1. The intensity of the pixel varies inversely with the distance from the origin. |
2. It blurs the image to produce smoothing effect and reduces the noise. |
3. The distribution has a mean zero as it is centered about the origin and Standard Deviation has to be defined. |
4. The values are positive only. |
5. The output of the smooth regions remains unchanged. |
6. It blurs the high contrast region. |
7. Complete circular symmetry is offered. |
8. Larger mask leads to further smoothing. |
C. Finding gradients |
The canny algorithm finds edges where the grayscale intensity of the digital image changes abruptly by determining the gradients of the image at each pixel. sobel mask is applied for this purpose. |
At first, the respective gradient in x- and y- direction is approximated by applying mask as shown in fig (4). The edge strength i.e. gradient magnitude is then determined as a Euclidean distance measure by applying Pythagoras law as equation: |
|
The computational complexity can be reduced by applying Manhattan distance measure as: |
|
D. Thresholding |
The gradient image may contain false edges caused by noise or color variations due to uneven surfaces. There must be discrimination between true and false edges. This is achieved by using threshold so that only edges stronger than a certain value (threshold) would be preserved. The edge pixels stronger than threshold are marked whereas the ones weaker than the threshold are avoided. |
SOFTWARE AND HARDWARE IMPLEMENTATION
|
The software and hardware implementation of the project involve image source, MATLAB (software for image processing) , MPLAB IDE & Compiler (softwares for interfacing to PIC), PIC microcontroller, RS232 cable and LCD display. The details are discussed in the following section. |
The block diagram of facial recognition system with hardware interfacing consists of hardware and software parts. |
A. Software block: |
Face detection and recognition operations are carried out in this part. Hence, the software block is the main part that performs matching. |
a. PC with MATLAB software: |
MATLAB (Matrix Laboratory) is a programming language that allows matrix manipulations, implementation of algorithms, interfacing with programs that are written in any other languages like C, C++, Java etc. The image is represented as a 2- dimensional matrix. Different image processing tools available in MATLAB help in implementing face detection and recognition algorithm. |
b. Image: |
It is the image at our hand which is to be tested for matching. The features/ edges of the input image are extracted and detected as per canny edge detection algorithm. |
c. Image database: |
It is a collection of large number of images. We use two kinds of databases. One is train database whereas the other one is test database. Input image is an image from test database. Images of many people are stored in train database. Train database needs to be updated time and again so that maximum number of images can be matched with reliability. |
Input image is compared to each and every image in the database. If the image is matching with any of the images in train database, the condition is 'matched'. If the image is not matching with any of the images in train database, the condition is 'not matched'. |
B. Hardware block: |
The hardware block consists of PIC microcontroller and LCD display. |
1. Peripheral Interface controller (PIC): |
8 bit PIC is a Harvard architecture microcontroller developed by Microchip Technology. The salient features of PIC are as follows: |
i. Code efficiency: There are separate buses for instruction and data. The throughput rate is increased due to simultaneous access to both data and program memory (Harvard Architecture). |
ii. Less number of instructions. |
iii. Static operation: It is fully static. If it top the clock, all the register contents are maintained. |
iv. High output drive capability. |
v. Most instructions are single cycled. |
vi. Low cost, wide availability and serial programming capability. |
a. LCD display: |
Liquid Crystal Display (LCD) is a flat panel electronic-visual display which is used to display the result of matching. In the proposed system, 16x2 (16 characters/ row, 2rows) LCD has been used. |
Serial port interface consisting of RS232 and Universal Asynchronous Receiver/Transmitter (UART) establishes serial communication between PC and PIC microcontroller. An input image is fed to PC containing MATLAB. It is processed and face is detected. If the image is matching with any of the images in the database, PC sends (with the help of MPLAB programming) through serial port interface unit a character, say, 'M' to the microcontroller. The microcontroller interprets it as the matching condition and asks LCD to display 'Match found'. If the image is not matching with any of the images in the database, PC sends another character, say, 'N'. The microcontroller interprets it as not matching condition and asks LCD to display 'No match found'. |
WORKING OF FACE RECOGNITION SYSTEM
|
Every face has various distinguishable markers, the peaks and valleys that make up facial features. These landmarks are called nodal points. Some of the nodal point measured by the algorithm we have used are: |
? Distance between the eyes |
? Width of the nose |
? The shape of cheekbones |
? The depth of the eye sockets |
? The length of the jaw line |
These nodal points are measured creating a numerical code, called a face print, representing the face in the database. |
The proposed face recognition system follows series of steps to match the input image. These are: |
Detection
|
Canny algorithm is used to detect a live face in a scene of the image. |
Alignment
|
Once the face is detected, the system determines the head's position, size and pose. |
Measurement
|
The system then measure the features of the nodal points such as distance between the eyes, width of nose etc. It is actually the measurement of pixels at the edges and creates a template.Representation |
Representation
|
The system translates the template into a unique code. A set of numbers is used to represent the features on a subject's face. |
Matching
|
After coding, the system will then compare the input image with the images in the databases to find the potential match. If the features of input image are similar to that of any of the images stored in database, it is said to be matched/ identified/ verified. |
RESULTS AND DISCUSSION
|
Two databases were maintained- test and train database. Test database contained the image to be recognized. Train database contained all the images that are used for matching with. At first, face collection with plain white background, no light variation and having no changes was used. The image matching was performed reliably. Secondly, face collection with plain green background, no light variation but having minor changes in head turn, tilt, and slant, position of face and considerable changes in expressions was used. When input image with plain white background and no head turn, tilt was used, the result was reliable. However, when the angle of tilt was increased much and lighting conditions were varied drastically, it couldn’t match. So, it can be said that the proposed system can recognize the image if there is no drastic change in lighting conditions, poses, angle of tilting of head etc. |
CONCLUSION AND FUTURE SCOPES
|
The proposed automatic face recognition system with has employed Canny edge detection algorithm in conjunction with the exploitation of distinguishable landmarks that make up facial features. A PIC microcontroller has been used to output the result of identification/ verification of face to the external environment via LCD. The proposed low cost, easy-to-use and reliable system can be used to monitor security system, surveillance, privacy breach prevention and bankcard/ license/passport authorization. |
However, the proposed system can't give reliable result if the lighting conditions, angles and poses are drastic. Therefore, one of the future proposals is to develop facial recognition software that uses 3-D model which may provide more accuracy. 3-D facial recognition system will use distinctive features of the face where rigid tissues and bones are most obvious, such as the curves of the eye socket; nose and chin-to identify the subject. 3-D facial recognition system must be able to be used even in darkness and must have ability to recognize the face at different view angles. Another future proposal is to develop a system that uses skin biometrics, the uniqueness of skin texture to give even better result because face recognition alone may not always be enough to identify and verify the image. |
Figures at a glance
|
|
|
|
Figure 1 |
Figure 2 |
Figure 3 |
|
|
|
Figure 4 |
Figure 5 |
Figure 6 |
|
|
References
|
- ‘Digital Image processing usingMATLAB, 2nd edition’ by Rafael C. Gonzalez.
- Face recognition using eigenfaces,Proceedings of IEEE, by M.A. Turk and A.PPentland.
- ‘Handbook of Face Recognition, 2ndedition’ by Stan Z. Li and Anil K. Jain.
- ‘A research on improved CannyEdge Detection Algorithm’ by Jun Liang and ShengDing.
|