I have a project that does biometric identification of a person on the basis of retina. The project has been implemented in Matlab 2015b. The identification accuracy is good. However, unlike the real systems as I increase the size of my data set the matching process takes so long and becomes so slow. Currently my data set has 60 images.

Features are extracted using crossing number technique. And for matching L2 norm is used as a similaity between query image feature matrix and feature matrix of images in database.

Feature matrix is formed by finding distance and angle between a candidate feature point and its four nearest neighbours. Feature matrix dimension is N x 8. where N is number of features. Please suggest me how can I reduce the matching time? And make identification process speed to match with the real identification systems. Below is the code for feature extraction.

function [Color_Image, Skeleton_Image,Cn_Image,Feature_Points,End_Points,Bifurcation,Crossing] = Crossing_Number(Segmented_Image)

%% Crossing Number

bw4 = Segmented_Image;

bw4 = bwmorph(bw4,'skel',Inf);

cn_image = zeros(size(bw4));

img = padarray(bw4, [1,1], 'replicate'); %Padding

Clrimg = zeros(size(bw4,1) , size(bw4,2), 3); % Creating matrix with 3 layers

for i = 2: size(img,1) -1

for j = 2: size(img,2)-1

if (img(i,j) == 1) % Checking the pixel constitute a vessel or not

x = img(i-1:i+1, j-1:j+1);

sub12 = abs(x(1) - x(4));

sub23 = abs(x(4) - x(7));

sub36 = abs(x(7) - x(8));

sub69 = abs(x(8) - x(9));

sub89 = abs(x(9) - x(6));

sub87 = abs(x(6) - x(3));

sub74 = abs(x(3) -x(2));

sub31 = abs( x(2) - x(1));

cn = 0.5*(sub12 + sub23 + sub36 + sub69+ sub89+ sub87+ sub74+sub31);

if (cn == 1)

Clrimg(i,j,1) = 255; % Giving red color to end points

cn_image(i,j) = 1;

elseif (cn == 3)

Clrimg(i,j,2) = 255; % Giving green color to end points

cn_image(i,j) = 3;

elseif (cn > 3)

Clrimg(i,j,3) = 255; % Giving green color to end points

cn_image(i,j) = 4;

end

end

end

end

%Superposition of original and colors ixels

N_Img = im2uint8 (bw4);

S_Img = cat(3, N_Img, N_Img, N_Img);

S_Img = S_Img + uint8(Clrimg);

ep = sum(cn_image(:) == 1); bp = sum(cn_image(:) == 3); cn = sum(cn_image(:) == 4);

N = ep + bp + cn; %Number of rows in feature Matrix

% axes(handles.axes3);

% imshow(S_Img);

Color_Image = S_Img;

Skeleton_Image = bw4;

Feature_Points = N;

End_Points = ep;

Bifurcation= bp;

Crossing = cn;

Cn_Image = cn_image;

Below is the code for matching process. It comapres each row of test image(t) with all the rows of feature matrix stored in databse. The variable "count repitition" keeps the record of number of matches with images in databse. After all the images are compared the max of count repitition is taken. And that is the match.

%% Matching Process

count_repetition = zeros(1,size(S.Data,2)); %

for t = 1: size( Test_image_Featur_Matrix ,1) % Number of rows in

feature matrix of test

image

dita =[];

n = 1;

for i = 1: size(S.Data,2)

for j = 1:size(S.Data(i).Feature_Matrix,2)

for m = 1:size(S.Data(i).Feature_Matrix(j).Img,1) %Image in Database

dita(n,1) = norm (Test_image_Featur_Matrix(t,:)- S.Data(i).Feature_Matrix(j).Img(m,:)); % Distance between row of test_image with every row of image

dita(n,2) = i; %Person

dita(n,3) = j; %image_number of specific person

n = n+1;

end

end

end

val = min(dita(:,1)); %Row with minimum Euclidean distance

if val < 20

in = find(dita(:,1) == val);

% Threshold 1 will be on value. That if the value is greater

% than this, then don't count it.

Result(t).distance = dita(in(1),1); %Minimum_distance

Result(t).Person_Num = dita(in(1),2); %Person Number

Result(t).Image_Number = dita(in(1),3); %Image_Number

count_repetition(Result(t).Person_Num) = count_repetition(Result(t).Person_Num) + 1;

end

end

Matched = max(count_repetition);

if Matched>(size(Test_image_Featur_Matrix,1)/2)

ind_match = find (count_repetition == Matched);

text_fin = ['Authorized Person。 Person is: ' S.Data(ind_match).Name ];

else

text_fin = 'No Match。Unauthorized Person。';

end

set(handles.text4,'string',text_fin);

end

Please guide me how can I make matching process fast that is comaprable with real time system. I cannot attach my dataset here. As it is large also i didnot attach my pre-processing and segmentatiob n oart. I only uploaded the relevant files.

More Sidra Aleem's questions See All
Similar questions and discussions