├── Eye Database.rar ├── Supporting Files.rar ├── IrisRecognition_PPT.pdf ├── Transfromation Results.rar ├── README.md └── IrisRecognition_MAIN.m /Eye Database.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anweshachakraborty17/Iris-Recognition-Using-MATLAB/HEAD/Eye Database.rar -------------------------------------------------------------------------------- /Supporting Files.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anweshachakraborty17/Iris-Recognition-Using-MATLAB/HEAD/Supporting Files.rar -------------------------------------------------------------------------------- /IrisRecognition_PPT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anweshachakraborty17/Iris-Recognition-Using-MATLAB/HEAD/IrisRecognition_PPT.pdf -------------------------------------------------------------------------------- /Transfromation Results.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anweshachakraborty17/Iris-Recognition-Using-MATLAB/HEAD/Transfromation Results.rar -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Iris-Recognition-Using-MATLAB 2 | Iris recognition is a reliable and accurate biometric identification system for user authentication. It is used for capturing an image of an individual’s eye. The performance of iris recognition systems is measured using segmentation. Segmentation is used to localize the correct iris region in the particular portion of an eye and it should be done accurately and correctly for removing the eyelids, eyelashes, reflection, and pupil noises present in the iris region. In our paper, we are using Daughman’s Algorithm segmentation method for Iris Recognition. 3 | The segmented iris region was normalized to minimize the dimensional inconsistencies between iris regions. The features of the iris were encoded using a convolution theorem. The Hamming distance was included as a matching metric, which gave the measure of how many bits disagreed between the templates of the iris. 4 | 5 | Published In IJRAR ( www.ijrar.org ) UGC Approved ( Journal No : 43602 ) & 5.75 Impact Factor | Volume 6 Issue 2 | May,2019 | Paper ID : IJRAR19K2025 | Registration ID : 203947 6 | 7 | Checkout at http://www.ijrar.org/viewfull.php?&p_id=IJRAR19K2025 for more info. 8 | -------------------------------------------------------------------------------- /IrisRecognition_MAIN.m: -------------------------------------------------------------------------------- 1 | %%%Image Aquisition Process:- 2 | clc; clear all; close all; warning off; 3 | 4 | [FileName1,FilePath1] = uigetfile('*.jpg','Select 1st Iris Image'); 5 | file1= fullfile(FilePath1, FileName1); 6 | 7 | [FileName2,FilePath2] = uigetfile('*.jpg','Select the Iris Image for comparison'); 8 | file2= fullfile(FilePath2, FileName2); 9 | 10 | 11 | % STEP:1 IMAGE AQUISITION************************************************** 12 | 13 | i=imread('1.jpg'); 14 | subplot(1,2,1); 15 | imshow(i); 16 | title('STEP:1 Image Aquisition(Original Image:1)'); 17 | 18 | ii=imread('2.jpg'); 19 | subplot(1,2,2); 20 | imshow(ii); 21 | title('STEP:1 Image Aquisition(Original Image:2)'); 22 | 23 | figure(); 24 | 25 | 26 | % STEP:2 GRAY SCALE CONVERTION********************************************* 27 | 28 | g =rgb2gray(i); 29 | subplot(1,2,1); 30 | imshow(g); 31 | title('STEP:2 Converting into Gray Image:1'); 32 | 33 | gg=rgb2gray(ii); 34 | subplot(1,2,2); 35 | imshow(gg); 36 | title('STEP:2 Converting into Gray Image:2'); 37 | 38 | figure(); 39 | 40 | % STEP:3 Subtraction of original image************************************* 41 | 42 | k = imread('1.jpg'); 43 | v= rgb2gray(k); 44 | v = imsubtract(v,60); 45 | subplot(1,2,1); 46 | imshow(v); 47 | title('STEP:3 Subtracted Gray Image:1'); 48 | 49 | kk = imread('2.jpg'); 50 | vv =rgb2gray(kk); 51 | vv = imsubtract(vv,60); 52 | subplot(1,2,2); 53 | imshow(vv); 54 | title('STEP:3 Subtracted Gray Image:2'); 55 | 56 | figure(); 57 | 58 | % Find HISTOGRAM of the Image********************************************** 59 | %imhist works with only 8 bit images 60 | % Hence convert the image to unsigned 8 bit image and plot the histogram 61 | 62 | z=double(v); 63 | subplot(1,2,1); 64 | imhist(v); 65 | axis off, axis tight; 66 | title('STEP:4 Histogram of the Image:1'); 67 | 68 | zz=double(vv); 69 | subplot(1,2,2); 70 | imhist(vv); 71 | axis off, axis tight; 72 | title('STEP:4 Histogram of the Image:1'); 73 | 74 | figure(); 75 | 76 | 77 | % STEP:5 CROPED IMAGE****************************************************** 78 | 79 | c=imcrop(g,[210 86 627-210 402-86]); 80 | subplot(1,2,1); 81 | imshow(c); 82 | title('STEP:5 Croped Image:1'); 83 | 84 | cc=imcrop(gg,[255 163 744-255 504-163]); 85 | subplot(1,2,2); 86 | imshow(cc); 87 | title('STEP:5 Croped Image:2'); 88 | 89 | figure(); 90 | 91 | 92 | % STEP:6 RESIZED IMAGE***************************************************** 93 | 94 | r=imresize(c,[256,256],'nearest'); 95 | subplot(1,2,1); 96 | imshow(r); 97 | title('STEP:6 Resized Image:1'); 98 | 99 | rr=imresize(cc,[256,256],'nearest'); 100 | subplot(1,2,2); 101 | imshow(rr); 102 | title('STEP:6 Resized Image:2'); 103 | 104 | figure(); 105 | 106 | % STEP:7 IMAGE SMOOTHING*************************************************** 107 | 108 | s= fspecial('gaussian',3); 109 | f = imfilter(r,s); 110 | subplot(1,2,1); 111 | imshow(f,[]),title('STEP:7 Using Gaussian Filter Smoothing Image:1 '); 112 | 113 | ss= fspecial('gaussian',3); 114 | ff = imfilter(rr,ss); 115 | subplot(1,2,2); 116 | imshow(ff,[]),title('STEP:7 Using Gaussian Filter Smoothing Image:2'); 117 | 118 | figure(); 119 | 120 | %%% Image Segmentation Process:- 121 | 122 | % STEP:8 CANNY EDGE DETECTION********************************************** 123 | 124 | e=edge(f,'canny'); 125 | subplot(1,2,1); 126 | imshow(e); 127 | title('STEP:8 Edge Detection by Canny Filter Image:1'); 128 | 129 | ee=edge(ff,'canny'); 130 | subplot(1,2,2); 131 | imshow(ee); 132 | title('STEP:8 Edge Detection by Canny Filter Image:2'); 133 | 134 | figure(); 135 | 136 | %STEP:9 Sobel EDGE DETECTION********************************************** 137 | 138 | S1=edge(f,'roberts'); 139 | subplot(1,2,1); 140 | imshow(S1); 141 | title('STEP:9 Edge Detection by Sobel Filter Image:1'); 142 | 143 | SS1=edge(ff,'roberts'); 144 | subplot(1,2,2); 145 | imshow(SS1); 146 | title('STEP:9 Edge Detection by Sobel Filter Image:2'); 147 | 148 | figure() 149 | 150 | 151 | % STEP:11 GAMMA CORRECTION************************************************* 152 | %Adjust the Gamma to 0.8 153 | 154 | S=edge(f,'sobel'); 155 | u=double(S); 156 | subplot(1,2,1); 157 | y= imadjust(u,[],[],0.8); 158 | imshow(y); 159 | title('STEP:10 Gamma Adjusted Image:1'); 160 | 161 | SS=edge(ff,'sobel'); 162 | uu=double(SS); 163 | subplot(1,2,2); 164 | yy= imadjust(uu,[],[],0.8); 165 | imshow(yy); 166 | title('STEP:10 Gamma Adjusted Image:2'); 167 | 168 | figure(); 169 | 170 | % STEP:12 HISTERISIS THRASHOLD********************************************* 171 | 172 | 173 | 174 | mygrayimg = imread('1.jpg'); 175 | mygrayimg = imresize(rgb2gray(mygrayimg),[256 256]); 176 | 177 | myfftimage = fft2(mygrayimg); 178 | 179 | 180 | tmp = abs(myfftimage); 181 | mylogimg = log(1+tmp); 182 | 183 | 184 | [M,N] = size(myfftimage); 185 | 186 | 187 | 188 | low = 62; 189 | band1 = 15; 190 | band2 = 60; 191 | 192 | 193 | 194 | mylowpassmask = ones(M,N); 195 | mybandpassmask = ones(M,N); 196 | 197 | 198 | 199 | for u = 1:M 200 | for v = 1:N 201 | 202 | tmp = ((u-(M+1))/2)^2 +(v-(N+1)/2)^2; 203 | raddist = round((sqrt(tmp))); 204 | disp(raddist) 205 | 206 | if raddist > low 207 | mylowpassmask(u,v) = 0; 208 | end 209 | 210 | if raddist > band2 || raddist < band1; 211 | mybandpassmask(u,v) = 0; 212 | end 213 | end 214 | end 215 | 216 | 217 | f1 = fftshift(mylowpassmask); 218 | f3 = fftshift(mybandpassmask); 219 | 220 | 221 | resimage1 = myfftimage.*f1; 222 | resimage3 = myfftimage.*f3; 223 | 224 | % Display the low pass filtered image 225 | r1 = abs(ifft2(resimage1)); 226 | subplot(1,2,1); 227 | imshow(r1,[]),title('STEP:11 Hysteresis Thresholding of Image: 1'); 228 | 229 | 230 | 231 | 232 | % part 2***** 233 | 234 | 235 | % Read the image, resize it to 256 x 256 236 | % Convert it to grey image and display it 237 | 238 | mygrayimg = imread('2.jpg'); 239 | mygrayimg = imresize(rgb2gray(mygrayimg),[256 256]); 240 | %subplot(2,2,1); 241 | %imshow(mygrayimg),title('Original Gray-Image'); 242 | 243 | % Find FFT 244 | % Use the command fft2() to get FFT of the image 245 | % The log scale of FFT image is displayed 246 | 247 | myfftimage = fft2(mygrayimg); 248 | 249 | % Take logarithmic scale for display 250 | 251 | tmp = abs(myfftimage); 252 | mylogimg = log(1+tmp); 253 | 254 | %subplot(2,2,2); 255 | %imshow(mat2gray(mylogimg)); 256 | %title('FFT Image'); 257 | 258 | % Find size 259 | [M,N] = size(myfftimage); 260 | 261 | % Create Filter array 262 | 263 | % The cut off frequency 20 is used here 264 | 265 | low = 62; 266 | band1 = 15; 267 | band2 = 60; 268 | 269 | % create ideal high pass filter mask 270 | 271 | % Create matrix of size equals original matrix 272 | 273 | mylowpassmask = ones(M,N); 274 | mybandpassmask = ones(M,N); 275 | 276 | % Generate values for ideal high pass mask 277 | 278 | for u = 1:M 279 | for v = 1:N 280 | 281 | tmp = ((u-(M+1))/2)^2 +(v-(N+1)/2)^2; 282 | raddist = round((sqrt(tmp))); 283 | disp(raddist) 284 | 285 | if raddist > low 286 | mylowpassmask(u,v) = 0; 287 | end 288 | 289 | if raddist > band2 || raddist < band1; 290 | mybandpassmask(u,v) = 0; 291 | end 292 | end 293 | end 294 | 295 | % Shift the spectrum to the centre 296 | f1 = fftshift(mylowpassmask); 297 | f3 = fftshift(mybandpassmask); 298 | 299 | % Apply the filter H to the FFT of the Image 300 | resimage1 = myfftimage.*f1; 301 | resimage3 = myfftimage.*f3; 302 | 303 | 304 | % Apply the Inverse FFT to the filtered image 305 | 306 | % Display the low pass filtered image 307 | r1 = abs(ifft2(resimage1)); 308 | subplot(1,2,2); 309 | imshow(r1,[]),title('STEP:11 Hysteresis Thresholding of Image: 2'); 310 | 311 | figure(); 312 | 313 | % STEP:12 HUGH TRANSFORM*************************************************** 314 | 315 | Hu=imread('hug1.jpg'); 316 | subplot(1,2,1); 317 | imshow(Hu); 318 | title('STEP:12 After Hugh Transformation Image:1') 319 | 320 | Hu1=imread('hug2.jpg'); 321 | subplot(1,2,2); 322 | imshow(Hu1); 323 | title('STEP:12 After Hugh Transformation Image:2') 324 | 325 | figure(); 326 | 327 | 328 | % STEP:13 NORMALIZATION**************************************************** 329 | n=imread('normal1.jpg'); 330 | subplot(2,1,1); 331 | imshow(n); 332 | title('STEP:13 Normalized Image:1') 333 | 334 | nn=imread('normal2.jpg'); 335 | subplot(2,1,2); 336 | imshow(nn); 337 | title('STEP:13 Normalized Image:2') 338 | 339 | figure(); 340 | 341 | 342 | 343 | % STEP:15 MATCHING********************************************************* 344 | 345 | 346 | N=im2double(f); 347 | subplot(1,2,1); 348 | imshow(N); 349 | title('STEP:14 IMAGE 1'); 350 | 351 | NN=im2double(ff); 352 | subplot(1,2,2); 353 | imshow(NN); 354 | title('STEP:14 IMAGE 2'); 355 | 356 | 357 | w = msgbox('DIFFERENT IRIS','Result'); 358 | 359 | %w = msgbox('SAME IRIS','Result'); 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | --------------------------------------------------------------------------------