Similariy matrics in SIFT or SURF

2 ビュー (過去 30 日間)
Muhammad Awais Ali
Muhammad Awais Ali 2022 年 3 月 6 日
回答済み: Moksh 2023 年 9 月 13 日
In LOCAL BINARY PATTERNS, the extracted vector have fixed row and col (1x59) so it is easy to compute the distance between two images using Euclidean. However,In SIFT the points are vary image to image. How can calculate the distance or dis(similarity) between Sift Features?

回答 (1 件)

Moksh
Moksh 2023 年 9 月 13 日
Hi Awais,
I understand while extracting LBP features, vectors have fixed dimensions so Euclidean distance can be computed. But while extracting SURF features, the SURF points may vary from image to image which may cause the dimensions of features to vary.
You can use the “matchFeatures” function in MATLAB, which returns the indices of matching features for the two input feature sets. This function supports binary features as well as matrices as features.
Below is an example code for finding similar SURF features for two images:
% Defining two images
I1 = imread("cameraman.tif");
I2 = imresize(imrotate(I1, -20), 1.2); % Rotated cameraman image
% Extracting SURF features for both images
p1 = detectSURFFeatures(I1);
p2 = detectSURFFeatures(I2);
[f1, v1] = extractFeatures(I1, p1);
[f2, v2] = extractFeatures(I2, p2);
% Extracting indexes of matched features
indexPairs = matchFeatures(f1, f2);
MatchedPtsI1 = v1(indexPairs(:, 1)); % Matching points on I1
MatchedPtsI2 = v2(indexPairs(:, 2)); % Matching points on I2
Please refer to the below documentation for more information about the “matchFeatures”, “detectSURFFeatures” and “extractFeatures” functions respectively:
Hope this helps!
Best Regards,
Moksh Aggarwal

カテゴリ

Help Center および File ExchangeFeature Detection and Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by