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 列の配列として指定します。

プロパティ

すべて展開する

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

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

オブジェクト関数

plot 点のプロット
isempty 点オブジェクトが空かどうかの判別
length Number of stored points
selectStrongest Select points with strongest metrics
size Return size of points object
selectUniform Select uniformly distributed subset of feature points
gather GPU からの cornerPoints の取得

すべて折りたたむ

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

I = imread('cameraman.tif');

特徴点を検出します。

points = detectHarrisFeatures(I);

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

strongest = selectStrongest(points,10); imshow(I) holdonplot(strongest)

Figure contains an axes. The axes contains 2 objects of type image, line.

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

strongest.Location
ans =10x2 single matrix112.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)on情节(分)

Figure contains an axes. The axes contains 2 objects of type image, line.

ヒント

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

拡張機能

R2012a で導入