Matching algorithm in Fingerprint authentication

2 次查看(过去 30 天)
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

回答(1 个)

Shivam Singh
Shivam Singh 2022-2-4
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.

类别

Help CenterFile Exchange 中查找有关 Text Analytics Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by