Matching algorithm in Fingerprint authentication

1 view (last 30 days)
How I can calculate the Euclidean distance between two finger templates, where the lengths of two features are not same? e.g F1 has 61 minutia points and F2 has 190 points

Answers (1)

Shivam Singh
Shivam Singh on 4 Feb 2022
Hello,
It is my understanding that you are trying to calculate the Euclidian distance between two features vectors of different length.
In order to calculate the Euclidian distance, the length of the two feature vectors should be same. You may reduce the length of the larger length feature vector to the length of smaller one by using random sampling. For random sampling, you may refer the “datasample” function. Then, you may repeat the experiment for some iterations, and average the Euclidian distances observed in each iteration to get your final Euclidian distance.
You may refer the below example:
%The two input feature vectors of length 61 and 191
smallerFeature = rand(1, 61);
LargerFeature = rand(1,191);
averageEuclidianDistance=0;
%iteration is the number of times you want to repeat the experiment
iterations=100;
for i=1:iterations
sampledLargerFeature = datasample(LargerFeature, 61);
%Calculating Euclidian distance for each iteration
iterationEuclidianDistance= sqrt(sum((sampledLargerFeature-smallerFeature).^2));
averageEuclidianDistance = averageEuclidianDistance + iterationEuclidianDistance;
end
averageEuclidianDistance=averageEuclidianDistance/iterations
%averageEuclidianDistance is the required Euclidian distance.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!