What does .Metric do?
Mostrar comentarios más antiguos
I have been analyzing codes from a certain project I found and there is one line of code that I do not understand and cannot find any answer on Google. What does .Metric do in line 28? Thank you!
%For Figure 1&2
I1 = rgb2gray(imread('sir1.jpg'));
I2 = rgb2gray(imread('sir2.jpg'));
subplot(2,1,1)
imshow(I1)
figure;
subplot(2,1,2);
imshow(I2)
%For Figure 3
figure;
points1 = detectHarrisFeatures(I1); plot(points1);
%For Figure 4
figure;
points2 = detectHarrisFeatures(I2); plot(points2);
[features1,valid_points1] = extractFeatures(I1,points1);
[features2,valid_points2] = extractFeatures(I2,points2);
indexPairs = matchFeatures(features1,features2);
matchedPoints1 = valid_points1(indexPairs(:,1),:);
matchedPoints2 = valid_points2(indexPairs(:,2),:);
%For Figure 5
figure;
showMatchedFeatures(I1,I2,matchedPoints1,matchedPoints2);
%For the Results
u=matchedPoints2.Metric-matchedPoints1.Metric;
if abs(u)<=0.04
disp("Matched");
else
disp("Not Matched");
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Video Formats and Interfaces en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!