Tuesday, 10 June 2014

MATLAB code for Iris Recognition system (DCT Based).

A biometric system provides automatic recognition of an individual based on some sort of unique feature or characteristic possessed by the individual. Biometric systems have been developed based on fingerprints, facial features, voice, hand geometry, handwriting, the retina, and the one presented in this thesis, the iris. Biometric systems work by first capturing a sample of the feature, such as recording a digital sound signal for voice recognition, or taking a digital color image for face recognition.
The sample is then transformed using some sort of mathematical function into a biometric template. The biometric template will provide a normalized, efficient and highly discriminating representation of the feature, which can then be objectively compared with other templates in order to determine identity. Most biometric systems allow two modes of operation. An enrollment mode for adding templates to a database, and an identification mode, where a template is created for an individual and then a match is searched for in the database of pre-enrolled templates. A good biometric is characterized by use of a feature that is; highly unique – so that the chance of any two people having the same characteristic will be minimal, stable – so that the feature does not change over time, and be easily captured – in order to provide convenience to the user, and prevent misrepresentation of the feature. The iris is an externally visible, yet protected organ whose unique epigenetic pattern remains stable throughout adult life. These characteristics make it very attractive for use as a biometric for identifying individuals. Image processing techniques can be employed to extract the unique iris pattern from a digitized image of the eye, and encode it into a biometric template, which can be stored in a database. This biometric template contains an objective mathematical representation of the unique information stored in the iris, and allows comparisons to be made between templates. When a subject wishes to be identified by iris recognition system, their eye is first photographed, and then a template created for their iris region. This template is then compared with the other templates stored in a database until either a matching template is found and the subject is identified, or no match is found and the subject remains unidentified. Compared with other biometric technologies, such as face, speech and finger recognition, iris recognition can easily be considered as the most reliable form of biometric technology. However, there have been no independent trials of the technology, and source code for systems is not available. Also, there is a lack of publicly available data sets for testing and research, and the test results published have usually been produced using carefully imaged irises under favorable conditions.

Youtube video of the Project:

Discrete Cosine Transform (DCT):
The DCT is a real valued transform, which calculates a truncated Chebyshev series possessing well-known mini-max properties and can be implemented using the Discrete Fourier Transform (DFT). There are several variants but the one most commonly used operates on a real sequence xn of length N to produce coefficients Ck,
Due to its strong energy compaction property, the DCT is widely used for data compression. In addition, the feature extraction capabilities of the DCT coupled with well-known fast computation technique have made it a candidate for pattern recognition problems such as the one addressed here. In particular, the DCT has been shown to produce good results on face recognition, where it has been used as a less computationally intensive replacement for the Karhunen-Loeve transform (KLT), which is an optimal technique according to the least squares metric for projecting a large amount of data onto a small dimensional subspace. The KLT decomposes an image into principal components ordered on the basis of spatial correlation and is statistically optimal in the sense that it minimizes the mean square error between a truncated representation and the actual data. The DCT, with its variance distribution closely resembling that of the KLT, has been shown to approach its optimality with much lower computational complexity. Additionally, its variance distribution decreases more rapidly compared to other deterministic transforms. Although no transform can be said to be optimal for recognition, these well-known properties motivated us to investigate the DCT for effective nonsemantic feature extraction from human iris images.
Location of the pupil and outer iris boundaries starts with the removal of the bright spot in the pupil caused by the reflection of the infrared light source. This reduces the influence of high gray-level values on the gray-scale distribution. Then, the image is scanned to isolate a region containing the pupil and iris. This is done by a heuristic method based on the assumption that the majority of image rows and columns passing through the pupil will have larger gray-level variance than those not passing through the pupil. It is assumed that the pupil is circular and, because the pupil boundary is a distinct edge feature, a Hough transform is used to find the center and radius of the pupil. To locate the outer boundary of the iris (limbus), a horizontal line through the pupil center is scanned for the jumps in gray level on either side of the pupil. The limbus is normally circular but its center does not necessarily coincide with that of the pupil.

Normalization and Enhancement:
Due to the dilation and constriction of the human pupil, the radial size of the iris varies under different illumination conditions and in response to physiological factors. The resulting deformation of the iris texture can be approximated as a linear deformation. Since we know the iris boundaries, we can map a rectangular image array back to an angular and radial position in the iris. This position will not, in general map exactly onto a pixel in the source image, so the normalized gray value is obtained by bilinear interpolation from its four nearest neighbors. Finally, the gray levels are adjusted by removing the peak illumination caused by light sources reflecting from the eye, estimating and subtracting the slowly varying background illumination, and equalizing the gray-level histogram of the iris image. The final normalized image is of resolution 512x80, from which we code only the 48 rows nearest the pupil to mitigate the effect of eyelids.

Feature Extraction:
As in our Fourier-based iris coding work, we start from a general paradigm whereby the feature vectors will be derived from the zero crossings of the differences between 1D DCT coefficients calculated in rectangular image patches. Averaging across the width of these patches with appropriate windowing helps to smooth the data and mitigate the effects of noise and other image artifacts. This then enables us to use a 1D DCT to code each patch along its length, giving low-computational cost. The selection of the values for the various parameters was done by extensive experimentation over the CASIA and Bath databases to obtain the best predicted Equal Error Rate (EER). The two data sets were used in their entirety to optimize the parameters of the method. Experimentally, overlapping patches gave the best EER in combination with the other parameters. It was also found that horizontally aligned patches worked best, and a rotation of 45 degrees was better than 0 degrees or 90 degrees. This distinctive feature of our code introduces a blend of radial and circumferential texture allowing variations in either or both directions to contribute to the iris code. To form image patches, we select bands of pixels along 45 degree lines through the image. A practical way of doing this is to slew each successive row of the image by one pixel compared to its predecessor. Patches are then selected in 11 overlapping horizontal bands as in Fig. 5. Each patch has eight pixels vertically (overlapping by four) and 12 horizontally (overlapping six). In the horizontal direction, a weighted average under a 1/4 Hanning window is formed. In effect, the resolution in the horizontal (iris circumferential) direction is reduced by this step. Averaging across the width of the patch helps to reduce the degrading effects of noise and the use of broad patches makes for easier iris registration. In the vertical direction (45 degrees from the iris radial), eight pixels from each patch form a 1D patch vector, which is then windowed using a similar Hanning window prior to application of the DCT in order to reduce spectral leakage during the transform. The differences between the DCT coefficients of adjacent patch vectors are then calculated and a binary code is generated from their zero crossings. These 8-bit code fragments (code lets) are the basis of our matching process.

For comparing two iris codes, a nearest-neighbor approach is taken, where the distance between two feature vectors is measured using the product-of-sum (POS) of individual sub feature Hamming distances (HD). This can be defined as follows:

Here, we consider the iris code as a rectangular block of size M x N, M being the number of bits per sub feature and N the total number of sub features in a feature vector. Corresponding sub feature bits are XORed and the resultant N-length vector is summed and normalized by dividing by N. This is done for all M sub feature bits and the geometric mean of these M sums give the normalized HD lying in the range of 0 to 1. For a perfect match, where every bit from Feature 1 matches with every corresponding bit of Feature 2, all M sums are 0 and so is the HD, while, for a total opposite, where every bit from the first Feature is reversed in the second, MN/Ns are obtained with a final HD of 1. Since a total bit reversal is highly unlikely, it is expected that a random pattern difference should produce an HD of around 0.5. While our previous approach based the HD calculation on a weighted sum of EXOR-ed bits, the new POS method provides for better separation by skewing the matching distribution toward 0 and the non matching one toward 0.5.A side-effect of taking the geometric mean is that an identical match between any two corresponding sets of N sub feature bits will give an overall HD of 0 and, thus, a perfect match. Although this might seem radical, it is highly unlikely that all N bits, 713 in this case, will match identically for any two iris templates. Even if such a situation were to occur, it is very likely that both templates originated from the same class. Rotation invariance is achieved by storing six additional iris codes for three rotations on either side by horizontal (iris circumferential) shifts of 4, 8, and 12 pixels each way in the normalized images. During verification, the test iris code is compared against all seven stored ones and the minimum distance is chosen for each of the three separately enrolled images. These three minima are then averaged to give the matching HD.


Suppose we want to match iris image no3 as a test image and image is as follows.

Edge Detection and Matching Process:

  Normalization                                                         Overlap patched
Hanning vertical                                                     Hanning horozontal

After processing Given Iris Image is matched with 10th Template (10th Person) stored in database.

MATLAB Implementation: 
Entry of New User:

IRIS Matching:
if you want this code then contact us on....
Mobile Number: +91-9637253197
Whatsup Number: +91-9637253197
Email ID: matlabprojects07@gmail.com

1 comment: