Criminal Final
Criminal Final
ABSTRACT
The aim of the project is to build a criminal recognition system which would depend upon face recognition technique. The face recognition is known as Face Biometric Application. The biometric security system has so far been the most successful one as far as providing a sense of security is concerned. It is based on the fact that almost every part of the human body is unique in its own way , and with the help of electronics we can make use of the uniqueness and set up a security system in which a person is granted access only if he biometrically proves that he has the rights to access the asset. With many biometric parameters around the ones that have gained ready popularity are the ones like: Fingerprints Hand geometry Iris/retina scan Face study Signature reading Voice recognition etc
Gone are the days when an engineer or a scientist had to stick to his respective field of work. Today with all the technological upgradements on our
Chapter - 1
INTRODUCTION
3
Chapter - 2
AN OVERVIEW OF BIOMETRICS
European Origins:
Elsewhere in the world up until the late 1800s, identification largely relied upon "photographic memory." In the 1890s, an anthropologist and police desk clerk in Paris named Alphonse Bertillon sought to fix the problem of identifying convicted criminals and turned biometrics into a distinct field of study. He developed a method of multiple body measurements which got named after him (Bertillonage). His system was used by police authorities throughout the world, until it quickly faded when it was discovered that some people shared the same measurements and based on the measurements alone, two people could get treated as one. After the failure of Bertillonage, the police started using finger printing, which was developed by Richard Edward Henry of Scotland Yard, essentially reverting to the same methods used by the Chinese for years.
Modern Times:
10
Fig 2.5 Sensitivity vs. Errors Graph Performance of a biometric measure is usually referred to in terms of the false accept rate (FAR), the false non match or reject rate (FRR), and the failure to enroll rate (FTE or FER). The FAR measures the percent of invalid users who are incorrectly accepted as genuine users, while the FRR measures the percent of valid users who are rejected as impostors. In real-world biometric systems the FAR and FRR can typically be traded off against each other by changing some parameter. One of the most common measures of real-world biometric systems is the rate at which both accept and reject errors are equal: the equal error rate (EER), also known as the cross-over error rate (CER). The lower the EER or CER, the more accurate the system is considered to be.
11
Chapter - 3
FACIAL RECONIZATION
12
14
Transmissi on
Databas e
Generate Template
REquire
15
No
Transmissi on
Databas e
Yes/No
16
Enrollment Phase
Extract High Quality Biometric Features/Representat ion Formulate Biometric Feature/Rep Template Database Template Depositor y
Templat e Matcher
Decision
Output
17
3.2 Introduction
3.2.1 Fundamental Issues in Face Recognition: Robust face recognition requires the ability to recognize identity despite many variations in appearance that the face can have in a scene. The face is a 3D object which is illuminated from a variety of light sources and surrounded by arbitrary background data (including other faces). Therefore, the appearance a face has when projected onto a 2D image can vary tremendously. If we wish to develop a system capable of performing non-contrived recognition, we need to find and recognize faces despite these variations. In fact, 3D pose, illumination and foreground-background segmentation have been pertinent issues in the field of computer vision as a whole. Additionally, our detection and recognition scheme must also be capable of tolerating variations in the faces themselves. The human face is not a unique rigid object. There are billions of different faces and each of them can assume a variety of deformations. Inter-personal variations can be due to race, identity, or genetics while intra-personal variations can be due to deformations, expression, aging, facial hair, cosmetics and facial paraphernalia. Furthermore, the output of the detection and recognition system has to be accurate. A recognition system has to associate an identity or name for each face it comes across by matching it to a large database of individuals. Simultaneously, the system must be robust to typical image-acquisition problems such as noise, video-camera distortion and image resolution. Thus, we are dealing with a multi-dimensional detection and recognition problem. One final constraint is the need to maintain the usability of the system on contemporary computational devices ( 100 MIPS). In other words, the
18
Research in intensity image face recognition generally falls into two categories: holistic (global) methods and feature-based methods. Feature-based methods rely on the identification of certain fiducial points on the face such as the eyes, the nose, the mouth, etc. The location of those points can be determined and used to compute geometrical relationships between the points as well to analyze the surrounding region locally. Thus, independent processing of the eyes, the nose, and other fiducial points is performed and then combined to produce recognition of the face. Since detection of feature points precedes the analysis, such a system is robust to position variations in the image. Holistic methods treat the image data simultaneously without attempting to localize individual points. The face is recognized as one entity without explicitly isolating different regions in the face. Holistic techniques utilize statistical analysis, neural networks and transformations. They also usually require large samples of training data. The advantage of holistic methods is that they utilize the face as a whole and do not destroy any information by exclusively processing only certain fiducial points. Thus, they generally provide more accurate recognition results. However, such techniques are sensitive to variations in position, scale and so on which restricts their use to standard, frontal mug-shot images.
20
We propose a hierarchical detection method which can quickly and reliably converge to a localization of the face amidst a wide range of external visual stimuli and variation. It is necessary to precede expensive computations with simple and efficient ones in this hierarchy to maximize efficiency. The results of the initial, diffuse and large search space computations narrow the search space for the more localized, higher precision operations that will follow. In other words, the results of preliminary detections guide the use of subsequent operations in a feed-forward manner to restrict their application to only significant parts of the image. This reduces the probability of error since the subsequent detection steps will not be distracted by irrelevant image data. Furthermore, more robust operations precede more sensitive ones in our hierarchy since the sensitive operations in the hierarchy need to have adequate initialization from previous stages to prevent failure.
21
Figure 3.5 displays the sequence of search steps for the face detection. We begin by searching for possible face or head-like blobs in the image. The detected blob candidates are examined to obtain an approximation of their contours. If these exhibit a face-like contour, their interior is scanned for the presence of eyes. Each of the possible pairs of eyes detected in the face are examined one at a time to see if they are in an appropriate position with respect to the facial contour. If they are, then we search for a mouth isolated by the facial contour and the position of the detected eyes. Once a mouth has been detected, the region to be searched for a nose is better isolated and we determine the nose position. Lastly, these facial coordinates are used to more accurately locate the iris within the eye region, if they are visible. The final result is a set of geometrical coordinates that specify the position, scale and pose of all possible faces in the image.
22
Face Localization
The human face is a highly correlated object due to the lack of variation in skin complexion. Even though facial features (i.e. mouths and eyes) differ in color from the skin tone, the hairless skin regions dominate facial surface area allowing it stand out against most backgrounds. Thus we expect a boundary around the face to be present. The foreshortening of the 3D face structure under most lighting conditions also accentuates the contour of the face. We propose that the face be considered as a blob or a region with a certain amount of contour enclosure. Furthermore, the scalp and the hair also usually triggers edge contours that extend the face blob. Consequently, we can expect both the face and head structures to behave as blobs or symmetric enclosures about a center point.
Chapter - 4
23
SYSTEM REQUIREMENTS
4.1 Software Requirement
C#.Net VB SQL Server 2000 Nokia PC Suite
24
5.2 Disadvantages
1. The system requires image acquisition device like the mobile or web cam 2. Detection is slower.
25
Chapter 6
System Design
Eno Employee Ename
1 Date N Attendence
Designation
Phone
ENo
26
Images
Employee Image
Registration
Attendance
Attendance Database
Employee Database
Working Principal
27
Chapter 7
28
SOFTWARE DETAILS
7.1 Introduction to C#
C# is Microsofts latest object oriented programming language developed for .NET platform & .NET is Microsofts latest platform technology for creating web services. C# is a C++ based language & was developed to provide portability for distributed applications over network & internet .Application development in .NET platform can be done in multiple languages including C# , C++ & visual basic. Programmers developed in all these languages are complied to Microsofts intermediate language (IL) & executed within common language run time (CLR) .We explain the core elements of .NET & how web applications are developed & run with this technology ..NET is not a programming language it is a virtual machine technology (similar to Java virtual machine technology) with a frame work that provides capability to run a verity of web applications. The .NET framework class library provides set of classes that provides essential functionality for applications build within the .NET environment. Web functionality, XML support, database support, threading & distributed computing support is provided by the .NET framework class library. All .NET code is translated to Microsoft intermediate language & run with CLR .CLR is similar to Java virtual machine (JVM) .The IL code is language independent & similar to Java byte code .A single .NET application may consist of several different languages .Two very important features of CLR are language interoperability & language independence.
What is C# ?
C# is a modern ,object oriented language that enables programmers to quickly build a wide range of applications for the new Microsoft .NET platform ,which 29
Why C#?
C# is the new language with the power of C++ & the slickness of visual basic. It cleans up many of the syntactic peculiarities of C++ without diluting much of its flavor (thereby enabling C++ developers to transition to it with little difficulty ) . And its superiority over VB6 in facilitating powerful OO implementation is without question. C# with clean OO syntax & large class library ( in conjunction with .NET & the base class libraries ) could be the most productive mainstream language & it is an ECMA standard language that offers the potential of being available across many platform .For the serious developer wanting Microsofts most productive & mainstream .NET language , C# is the choice.
Properties
Properties will be a familiar concept to Delphi & Visual basic users. The motivation is for the language to formalize the concept of getter/ setter methods, which is an extensively used pattern, particularly in RAD (Rapid Application developments) tools.
30
31
Indexers
C# provides indexers allow objects to be treated like array, except that like properties, each element is exposed with a get and/ or set method. Public class Skyscraper { Story[] stories; Public story this [int index] { get { return stories[index]; } set { if (value !=null ) { Stories [index]=value; } } } Skyscraper empireState = new Skyscraper (); empireState [102] = new story (The top one,);
Delegates
A delegate can be thought of as a type- safe object oriented function pointer, which is able to hold multiple methods rather than just one. Delegates handles problems which would be solved with function pointers in C++ .And interfaces in
32
Events
C# provides direct support for events .Although event handling has been a fundamental part of programming since programming began, there has been surprisingly little efforts made by most languages to formalize this concept, If you look at how todays mainstream frameworks handle events .weve got examples like Delphis function pointers (called closures) ,Javas inner class adapters ,& of course ,the windows APIsmessage system. C# uses delegates along with the event keyword to provide a very clean solution to event handling .I thought the best way to illustrate this was to give an example showing the whole process of declaring ,firing & handling an event .
Pointer arithmetic
Pointer arithmetic can be performed in C# within methods marked with the unsafe modifier. When pointer point to garbage collected objects, the enforces complier the use of fixed word to pin the object .This is because garbage
collectors relay on moving objects around to reclaim memory , but if this happens when you are dealing with raw pointers you will be pointing to garbage . The choice of the word unsafe will be chosen since it discourages developers from using pointers unless they really need to .
33
A sample C# program
Hello world File Hello .Cs Using system ; Class Hello{ Static void Main(){ Consple .WriteLine (Hello world ); } } Uses the namespace System Entry point must be called Main o/p goes to the console file name & class name need not be identical
C# advantages
XML documentation generated from source code comments.(This is coming in VB.NET with Whidbey (the code name for the next version of Visual Studio & . NET), and there are tools which will do it with existing VB.NET code already.) Operator overloading = again, coming to VB.NET in Whidbey. Language support for unsigned types (you can use them from VB.NET, but they arent in the language itself). Again support for these is coming to VB.NET in Whidbey. The using statement ,which makes unmanaged resource disposal simple Explicit interface in a base class can be re implemented separately in a derived class .Arguably this makes the class harder to understand in the same way that member hiding normally does. Unsafe code This allows pointer arithmetic etc ,&can improve performance in Some situations. However, it is not to be used lightly , as a lot of the normal safety of C# is lost (as the name implies) .Note that unsafe code is still managed code, i.e. it is complied to IL, JITted & run with CLR. Boxing & unboxing add performance overhead since they involve dynamic memory allocation & runtime check. Generics can make C# more efficient, type safe & maintainable. Iterators help to create smaller & more efficient code. Using attribute features to express how fields should be seariliased into XML that means you con easily turn a class into XML & than easily reconstruct it again. Eliminates costly programming errors.
35
C# applications
Builder design pattern: The builder pattern allows a client object to
construct a complex object by specifying only its type & content. The client is shielded from the details of the objects construction. Remoting in C#. C# component based development. Reflection in C#: The ability to find out information about objects at run time is called reflection. In reflection we can find out the objects class, details of an objects method, & even create one dynamically at run time. Creating web based code components: There are times when you need to explain the core structure & logic of your program, having an intention to make it encapsulated & hidden at the same time. DB access component: C# is said to be a component oriented language to create a simple database access component. Run time code generation.
36
Ease of installations, deployment, and use. SQL server includes a set of administrative and development tools that improve your ability to install, deploy, manage and use SQL Server across Several sites. Scalability The same database engine can be used across platforms ranging from laptop computers running Microsoft Windows 95/98 to large, multiprocessor servers running Microsoft Windows NT, Enterprise Edition.
37
Chapter-8
Source Code
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; namespace MyAttendence { /// <summary> /// Summary description for MainForm. /// </summary> public class MainForm : System.Windows.Forms.Form { private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.Label label1;
38
39
40
41
42
Chapter - 9
Results
REGISTRATION OF EMPLOYEES
43
Training
Verification
44
Chapter - 10
45
46
47
48
Edge Detection
The extraction of edges or contours from a two dimensional array of pixels (a gray-scale image) is a critical step in many image processing techniques. A variety of computations are available which determine the magnitude of contrast changes and their orientation. Extensive literature exists documenting the available operators and the post-processing methods to modify their output. A trade-off exists, though, between efficiency and quality of the edge detection. Fast and simple edge detection can be performed by filters such as the popular Sobel operator which requires the mere convolution of a small kernel (3x3 pixels) over the image. Alternatively, more computationally intensive contour detection techniques are available such as the Deriche or Canny method. These detectors require that a set of parameters be varied to detect the desired scale and curvature of edges in the image. It is necessary to compare the simple Sobel
49
51
Thresholding If a binary (i.e., black and white) version of the gradient map is desired, it can be obtained by thresholding. All gradient values whose magnitudes are less than a threshold will be set to 0 and all gradient magnitudes greater than a threshold will be set to the maximum edge value (255). Thus, the maximum image contrast is compressed to 1 bit. One strategy for selecting the threshold in question is to first search for the strongest edge magnitude in the image region of interest. Once the peak edge magnitude is found, the threshold is computed as a percentage of this peak (e.g, 10%). A thresholded version of Figure 8.4(a) is Figure 8.5(a).
Non-Maximal Suppression Non-maximal suppression nullifies the gradient value at a pixel if its gradient magnitude is non-maximal vis-a-vis neighbouring gradient magnitudes along the perpendicular to the pixel's gradient orientation. The result is a thinned edge map, as shown in Figure 2.4(b) where only the dominant edges are present. Square Root of Edge Magnitude 52
Multi-Scale Analysis
We note at this point the significance of scale and the scalability of certain types of edge detection. Since structures and objects in an input image can have different sizes and resolutions, most spatial operators (for edge extraction or further processing) will require scalability. As demonstrated previously, the scalability of the Deriche edge detection operation makes it more flexible than the highly local Sobel operator. The objects in an input image and the image itself can have different sizes and resolutions so a scalable operator is necessary to search for edges at different scales. Kelly and Levine have approached edge detection by applying a Deriche-like operator over
53
54
Table 8.1: The annular sampling regions to be used for face detection
Range of Radii 0.75 < r < 2.25 pixels 1.75 < r < 3.25 pixels 2.75 < r < 4.25 pixels 3.75 < r < 5.25 pixels 4.75 < r < 7.25 pixels 6.75 < r < 9.25 pixels
55
We thresholded the output of the interest map so that only attentional peaks exhibiting a certain minimal level of interest will appear in the output. The threshold on the interest map is very tolerant and allows many extremely weak blobs to register. Thus, the precise selection of an interest map threshold is not critical. Furthermore, we only consider the five (5) strongest peaks of interest or the five most significant blobs for each scale in the multi-scalar analysis. This is to prevent the system from spending too much time at each scale investigating blobs. We expect the face to be somewhat dominant in the image so that it will be one of the strongest five blobs in the image (at the scale it resides in). If we expect many faces or other blobs in the image at the same scale, this value can be increased beyond 5. This would be advantageous, for example, when analyzing group photos. Both a threshold on interest value and the limitation on the number of peaks are required since we do not wish to ever process more than 5 blobs per scale for efficiency and we require the blobs to exhibit a minimal level of significance to warrant any investigation whatsoever. Furthermore, we 56
57
Figure 8.8 depicts the use of the local maxima in the interest map to define the search space for the selective symmetry detector. The interest map peaks at scales 28, 20 ,14 and 10 are shown on the left side of the Figure. Note the 5 x 5 window of dots forming a neighbourhood around these peaks in the images on the right. These images on the right side are higher resolution versions of the ones on the left (double the resolution) and will be operated upon by the selective symmetry detector at each of the 25 white points within them. This process is performed first at large scales (at scale 28 in the example). This agrees with the notion that large scales are usually more perceptually significant. Subsequently, we use the selective symmetry operator to compute the structure of the blob more exactly. We also need to guarantee a certain level of overlap between templates. For example, observe Figure 8.9 which displays 3 templates of a head with the following orientations: along the vertical, at +60 degrees from the vertical and at 58
For each blob, we exhaustively attempt each template matching and the strongest template is our final estimate for the facial contour. It must generate a certain minimal value of SE for it to be a legitimate facial contour. We select a threshold on the value of SE at 25%. Recall that the value of SE is expressed as a percentage of the peak value that can trigger the template in question. If the best template at the given peak is weaker than 25%, it will be rejected, indicating
59
There is successful and precise detection of both face contours in cases (d) and (e) despite the variation in scale, focus, pose and illumination. Unfortunately, non-face structures also triggered the face contour detector as seen in cases (a), (b) and (c). The larger contours are triggered in part by the high contrast in the clothing of the individuals. Furthermore, the close proximity of the heads of the two individuals causes the selective symmetry detector to utilize contours from both faces in the image simultaneously. However, had a single face been the dominant object in the image, the contour detection would have triggered fewer
60
Figures and do not show the search space (25 white points) or the facial contour estimate for the two weakest peaks in the interest map at the 10x scale. This is because these points failed to generate values greater than 25% for any of the face/head templates. This is understandable since they are triggered by the clothing of the individuals in the scene (not faces). Thus, this selective symmetry detector stage not only refines the localization of the face's center, it detects facial contour structure and also filters out non-face-like blobs from the output of the interest map. The final output is a collection of possible facial contours whose interior must now be processed to determine the existence of appropriate facial features.
61
62
Table 8.2: The annular sampling regions to be used for eye detection
63
Furthermore, the eye region, eyebrow, and eyelashes are surrounded by skin, and the iris is surrounded by the bright white sclera. Thus, we expect the eye region objects to be darker with respect to their immediate background and can restrict the computation of symmetry to dark symmetry only. Figure 8.13 displays the resulting peaks in the interest maps once the dark symmetry transform has been computed. Usually, the strongest peaks
64
The set of interest peaks (approximately 5) representing the possible eyes has been acquired. However, of these 5 peaks, which ones are the true eyes of the individual? It is possible to merely select the top two peaks in the eye band. Since eyes are such strong interest points, this is satisfactory in the majority of cases. However, it is sometimes possible that the top interest points are generated by other structures. For example, a loop of hair from the head could fall into the eye band and generate a strong interest peak (Thus, we maintain the collection of possible eyes, accepting these false alarms for now. Further testing will isolate the true eyes from this set more reliably than the mere selection of the top two peaks. Figure 8.15: Strong symmetry responses from structures other than eyes
65
We need to consider each pair of eyes in the set of detected peaks in the eye band. If 5 peaks are present, the total number of possible pairs is ( 25) = 10. However, we proceed by testing the strongest pairs first in a sequential manner until we find a pair that passes all tests. We can then stop testing any weaker pairs since we have converged to the two true eyes. Usually, the top two peaks will be the true eyes so we quickly converge without exhaustively testing all 10 pairs of possible eyes.
Geometrical Tests
We test a pair of symmetry peaks to see if their position on the face is geometrically valid. If these peaks are not horizontally aligned or have insufficient intra-ocular distance, they could not be eyes and are to be discarded.
is then computed using Equation. The constant kintra-ocular is typically set to 0.2.
67
68
Mouth Localization
After having found a pair of possible eyes which satisfies the geometrical constraints imposed by the face, it is necessary to test for the presence of the mouth. This will be used not only to check the validity of the eyes but will more importantly localize the face further so that a more precise definition of its coordinates is obtained. We choose to locate the mouth after having located the eyes because it has a non-skin tone texture and stands out more clearly than the skin-covered nose. Furthermore, its position is more stable than the nose since it
69
The 6 scales (r=1 to r=6) form our axial symmetry scale-space. The scale or r represents the vertical thickness of the horizontal symmetries detected in the image. A thin, closed mouth usually would generate a line of symmetry points at r=1. An open mouth, on the other hand, will generate a cloud of points at a larger r within its center. An open mouth's extremities taper off (since it is closed on both ends) regardless of its size. Thus, the mouth's extremities will appear as clouds at small r.
70
to a vertical edge whose normal is along the horizontal). This generates the horizontally projected magnitude value, .
71
Figure 8.19: Nose edge data. (a) Sobel gradient map. (b) Gradient map projected along vertical.
Vertical Signatures
We now consider the use of vertical signatures of the projected gradient map to isolate the nose. This technique is reminiscent of Kanade's signature analysis
72
Figure 8.19: Nose height. (a) Search space. (b) Gradient map projected along upwards vertical with corresponding nose signature. Note that this is not quite a conventional signature since a triangular summation region is used.
We define the spatial search space using the previously localized eyes and mouth. This will restrict the signature analysis so that no facial contours or external edges will affect edge signature analysis. Figure shows the region where 73
window of height of up to
signature value. The nose tip is defined as the closest point in the window with a
depicted in Figure 8.18 a . The positions of the nose bottom and the nose tip are shown as horizontal lines in Figure 8.19 b. Note the effect of this computation is quite minor and the nose-tip is only 2 pixels above the nose-bottom. Although the definition of the nose-tip and the use of the 40% threshold are somewhat arbitrary, we merely wish to move out of the region corresponding to the nose bottom (nostrils and shading) by a marginal amount so that the position detected has a 3D height. In other words, we wish to move upwards a small distance so that we localize a point somewhere on the nose, taking advantage of its 3D protrusion on the face (which specifies pose more exactly than non-protruding features on the face). Furthermore, the small upwards adjustment from nosebottom to nose-tip does not have to be exact as long as we are somewhere on the nose and not on the junction between the nose-bottom and the face (which is not a 3D protrusion). Usually, the nose tip is brighter than the rest of the nose and the nose bottom is darker. However, the transition from nose tip to nose
74
Figure 8.20: Finding the nose tip from the nose bottom using the edge signature.
Thus, we have roughly determined the height of the nose tip with respect to the eyes. However, we are uncertain of the exact horizontal position of the nose. The
75
76
Thus, we have given a procedure for localizing the face and facial features in an image. We begin by finding the face-blob and then estimating a facial contour. From there, we can define the eye-band, a region where the eyes might be present. Eye-blob detection is then performed and the blobs are tested geometrically to see if an adequate pair can be found. If two blobs are ``eye-like'' geometrically, we search for a mouth between them and then, finally, a nose-line.
77
Chapter - 11
Conclusion
The project is an effort to implement a biometric method and to protect the system through the face detection. The technique doesnt take into account of 3d faces. Therefore faces cannot be detected from the web camera. The project enhancement discussed here may be used to improve that project to 3d face recognization, especially from an un-even back ground. industrial project. The project is a simplistic approach and requires complicated filtering to enhance it to an
78
Chapter - 12 BIBLIOGRAPHY
C# and .Net platform by Andrew Troelsen. Inside C# by Tom Archer. Digital Image Processing using MATLAB by Gonzalez Adams Technical papers for pap smear test http://en.wikipedia.org/w/index.php?title=Liquid-based_cytology Medical Image Edge Detection (Fan et al., 2001, Rughooputh & Rughooputh, 1999, Anoraganingrum, 1999).
79