Getting the "Count" value of feature matching
Afficher commentaires plus anciens
I have a template image which has features identified and I then have a sample image which I identify feature points and then try to match them against the template image.
load('im1.mat');%This loads I1 and points1
I2 = rgb2gray(imread('/home/colin/downloads/matlabImages/small.jpg'));
points2 = detectHarrisFeatures(I2);
[features2, valid_points2] = extractFeatures(I2, points2);
[features1, valid_points1] = extractFeatures(I1, points1);
indexPairs = matchFeatures(features1, features2);
matched_points1 = valid_points1(indexPairs(:, 1), :);
matched_points2 = valid_points2(indexPairs(:, 2), :);
figure; showMatchedFeatures(I1, I2, matched_points1, matched_points2);
disp(matched_points1);
I am looking to get the number of matched points. When I print matched_points1 I get the following print out:
2x1 cornerPoints array with properties:
Location: [2x2 single]
Metric: [2x1 single]
Count: 2
How can I just get the number from the "Count" value stored in a variable?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Detect, Extract, and Match Features dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!