画像間でSURFを行った後の対応点のmatched points データの中身について
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
ichiro obayashi
am 15 Mai 2017
Kommentiert: ichiro obayashi
am 16 Mai 2017
画像間でSURFを行った後にワークスペース内に取得される対応点データ(下記のmatched points1.2です)の中を見たいのですが、どの様に見れば良いのでしょうか?SURFのコード自体はMathWorksのSURFに関するサイトに載っているコードをそのまま使用しています。簡単な問題かもしれませんが、宜しくお願い致します。
if true
% code
I1 = imread('1.bmp');
I2 = imread('2.bmp');
% SURF 特徴量を検出
% マッチングしたポイント1
points1 = detectSURFFeatures(I1);
circlePoints1 = points1.Location;
% マッチングしたポイント2
points2 = detectSURFFeatures(I2);
circlePoints2 = points2.Location;
[f1,vpts1] = extractFeatures(I1,points1);
[f2,vpts2] = extractFeatures(I2,points2);
indexPairs = matchFeatures(f1,f2) ;
matchedPoints1 = vpts1(indexPairs(:,1));
matchedPoints2 = vpts2(indexPairs(:,2));
figure; showMatchedFeatures(I1,I2,matchedPoints1,matchedPoints2);
legend('matched points 1','matched points 2');
end
2 Kommentare
michio
am 15 Mai 2017
1. コマンド ウィンドウ — コマンド プロンプトに変数名を入力します。
2. 変数エディター — ワークスペース ブラウザーで変数名をダブルクリックします。
また、関数 openvar を使用することもできます。たとえば、変数 A を開くには「openvar('A')」と入力します。
Akzeptierte Antwort
michio
am 16 Mai 2017
例えば、
pts1 = matchedPoints1.Location;
と実行すれば、座標点を行列として取り出すことができますよ。
ワークスペースにも表示があるかと思いますが、whos コマンドでも確認できる通り
>> whos matchedPoints1
Name Size Bytes Class Attributes
matchedPoints1 20x1 248 cornerPoints
>> matchedPoints1
matchedPoints1 =
20×1 cornerPoints 配列のプロパティ:
Location: [20×2 single]
Metric: [20×1 single]
Count: 20
と、プロパティに Location/Metric/count などを確認できます。上記の pts1 は Location だけを取り出した形ですね。参考になれば。
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Title finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!