Getting the "Count" value of feature matching

1 回表示 (過去 30 日間)
Colin
Colin 2014 年 1 月 24 日
コメント済み: Lekhnath Katuwal 2018 年 1 月 26 日
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?

採用された回答

Amit
Amit 2014 年 1 月 24 日
count1 = matched_points1.count;
  2 件のコメント
Sam O.
Sam O. 2017 年 9 月 28 日
Hi @amit , tried your code in counting the feature matching but i've got an error saying that " No appropriate method or property, or field 'count' for class cornerPoints. " Also there is no function or variable 'count' . Thank you so mych!
Lekhnath Katuwal
Lekhnath Katuwal 2018 年 1 月 26 日
count1 = matched_points1.Count c is capital

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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