Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

cornerPoints

コーナー ポイントを格納するオブジェクト

説明

このオブジェクトには、2 次元グレースケール イメージから検出された特徴点に関する情報が格納されます。

作成

説明

points = cornerPoints(location) は、位置の座標 [x y] の M 行 2 列の配列から cornerPoints オブジェクトを構築します。

points = cornerPoints(location,Name,Value) は、1 つ以上の名前と値のペアを使用してプロパティを設定します。各プロパティ名を引用符で囲みます。たとえば、points = cornerPoints('Metric',0.0) です。

入力引数

すべて展開する

点の位置。[x y] 座標の M 行 2 列の配列として指定します。

プロパティ

すべて展開する

この プロパティ は読み取り専用です。

キーポイントの位置。M 行 2 列の行列として指定します。各行は [x y] の形式で、キーポイントの位置を表します。M はキーポイントの数です。このプロパティを設定することはできません。代わりに location 入力引数を使用します。

コーナー ポイント オブジェクトが保持する点の数。数値として指定します。

検出された特徴の強度。数値として指定します。アルゴリズムは、近似されたヘッシアンの行列式を使用します。

オブジェクト関数

plot点のプロット
isempty点オブジェクトが空かどうかの判別
lengthNumber of stored points
selectStrongestメトリクスが最も強い点の選択
sizeReturn size of points object
selectUniformSelect uniformly distributed subset of point features
gatherGPU からの cornerPoints の取得

すべて折りたたむ

イメージを読み取ります。

I = imread('cameraman.tif');

特徴点を検出します。

points = detectHarrisFeatures(I);

最も強い 10 個の点を表示します。

strongest = selectStrongest(points,10);
imshow(I)
hold on
plot(strongest)

Figure contains an axes object. The axes object contains 2 objects of type image, line. One or more of the lines displays its values using only markers

最も強い点の (x,y) 座標を表示します。

strongest.Location
ans = 10x2 single matrix

  112.4516  208.4412
  108.6510  228.1681
  136.6969  114.7962
  181.4160  205.9876
  135.5823  123.4529
  100.4951  174.3253
  146.7581   94.7393
  135.2899   92.6485
  129.8439  110.0350
  130.5716   91.0424

チェッカーボード イメージを作成します。

I = checkerboard(50,2,2);

コーナー ポイントの位置を読み込みます。

location = [51    51    51   100   100   100   151   151   151; ...
            50   100   150    50   101   150    50   100   150]';

点を cornerPoints オブジェクトに保存します。

points = cornerPoints(location);

チェッカーボードに点を表示します。

imshow(I)
hold on
plot(points)

Figure contains an axes object. The axes object contains 2 objects of type image, line. One or more of the lines displays its values using only markers

ヒント

cornerPoints は多くの点を保持できますが、スカラー オブジェクトです。そのため、numel(cornerPoints) は常に 1 を返します。この値は、オブジェクトに保持されている点の実際の数を返す length(cornerPoints) とは異なる場合があります。

拡張機能

バージョン履歴

R2012a で導入