OpenCV 4.13.0
Open Source Computer Vision
読み込み中...
検索中...
見つかりません
🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
cv::KeyPoint クラス

顕著点検出器のためのデータ構造。続き...

#include <opencv2/core/types.hpp>

Collaboration diagram for cv::KeyPoint:

公開メンバ関数

 KeyPoint ()
 デフォルトコンストラクタ
 
 KeyPoint (float x, float y, float size, float angle=-1, float response=0, int octave=0, int class_id=-1)
 
 KeyPoint (Point2f pt, float size, float angle=-1, float response=0, int octave=0, int class_id=-1)
 
size_t hash () const
 

静的公開メンバ関数

static void convert (const std::vector< KeyPoint > &keypoints, std::vector< Point2f > &points2f, const std::vector< int > &keypointIndexes=std::vector< int >())
 
static void convert (const std::vector< Point2f > &points2f, std::vector< KeyPoint > &keypoints, float size=1, float response=1, int octave=0, int class_id=-1)
 
static float overlap (const KeyPoint &kp1, const KeyPoint &kp2)
 

公開変数類

float angle
 
int class_id
 オブジェクトクラス(キーポイントを所属するオブジェクトごとにクラスタリングする必要がある場合)
 
int octave
 キーポイントが抽出されたオクターブ(ピラミッド層)
 
Point2f pt
 キーポイントの座標
 
float response
 最も強いキーポイントを選択する際に用いられるレスポンス。さらなるソートやサブサンプリングに利用できる
 
float size
 意味のあるキーポイント近傍の直径
 

詳細説明

顕著点検出器のためのデータ構造。

このクラスのインスタンスはキーポイント、すなわち Harris コーナー検出器、FAST、StarDetector、SURF、SIFT など、多数あるキーポイント検出器のいずれかによって検出された点特徴を格納する。

キーポイントは2次元位置、スケール(考慮すべき近傍の直径に比例する)、向き、その他いくつかの引数によって特徴づけられる。次に、キーポイント近傍は記述子(通常は特徴ベクトルとして表現される)を構築する別のアルゴリズムによって解析される。異なる画像において同じオブジェクトを表すキーポイントは、KDTree やその他の手法を用いてマッチングできる。

構築子と解体子の詳解

◆ KeyPoint() [1/3]

cv::KeyPoint::KeyPoint ( )
Python:
cv.KeyPoint() -> <KeyPoint object>
cv.KeyPoint(x, y, size[, angle[, response[, octave[, class_id]]]]) -> <KeyPoint object>

デフォルトコンストラクタ

◆ KeyPoint() [2/3]

cv::KeyPoint::KeyPoint ( Point2f pt,
float size,
float angle = -1,
float response = 0,
int octave = 0,
int class_id = -1 )
Python:
cv.KeyPoint() -> <KeyPoint object>
cv.KeyPoint(x, y, size[, angle[, response[, octave[, class_id]]]]) -> <KeyPoint object>
引数
ptキーポイントの x および y 座標
sizeキーポイントの直径
angleキーポイントの方向
responseキーポイント上でのキーポイント検出器の応答(すなわちキーポイントの強度)
octaveキーポイントが検出されたピラミッドのオクターブ
class_idオブジェクトID

◆ KeyPoint() [3/3]

cv::KeyPoint::KeyPoint ( float x,
float y,
float size,
float angle = -1,
float response = 0,
int octave = 0,
int class_id = -1 )
Python:
cv.KeyPoint() -> <KeyPoint object>
cv.KeyPoint(x, y, size[, angle[, response[, octave[, class_id]]]]) -> <KeyPoint object>
引数
xキーポイントのx座標
yキーポイントのy座標
sizeキーポイントの直径
angleキーポイントの方向
responseキーポイント上でのキーポイント検出器の応答(すなわちキーポイントの強度)
octaveキーポイントが検出されたピラミッドのオクターブ
class_idオブジェクトID

メンバ関数詳解

◆ convert() [1/2]

static void cv::KeyPoint::convert ( const std::vector< KeyPoint > & keypoints,
std::vector< Point2f > & points2f,
const std::vector< int > & keypointIndexes = std::vector< int >() )
static
Python:
cv.KeyPoint.convert(keypoints[, keypointIndexes]) -> points2f
cv.KeyPoint.convert(points2f[, size[, response[, octave[, class_id]]]]) -> keypoints
cv.KeyPoint_convert(keypoints[, keypointIndexes]) -> points2f
cv.KeyPoint_convert(points2f[, size[, response[, octave[, class_id]]]]) -> keypoints

このメソッドはキーポイントのベクトルを点のベクトルに変換する、あるいはその逆を行う。各キーポイントには同じサイズと同じ向きが割り当てられる。

引数
keypointsSIFT/SURF/ORB などの任意の特徴検出アルゴリズムから得られたキーポイント
points2f各キーポイントの (x,y) 座標の配列
keypointIndexes点に変換するキーポイントのインデックスの配列。(指定したキーポイントのみを変換するためのマスクとして機能する)

◆ convert() [2/2]

static void cv::KeyPoint::convert ( const std::vector< Point2f > & points2f,
std::vector< KeyPoint > & keypoints,
float size = 1,
float response = 1,
int octave = 0,
int class_id = -1 )
static
Python:
cv.KeyPoint.convert(keypoints[, keypointIndexes]) -> points2f
cv.KeyPoint.convert(points2f[, size[, response[, octave[, class_id]]]]) -> keypoints
cv.KeyPoint_convert(keypoints[, keypointIndexes]) -> points2f
cv.KeyPoint_convert(points2f[, size[, response[, octave[, class_id]]]]) -> keypoints

これは利便性のために提供されているオーバーロードされたメンバ関数である。上記の関数とは、受け取る引数のみが異なる。

引数
points2f各キーポイントの (x,y) 座標の配列
keypointsSIFT/SURF/ORB などの任意の特徴検出アルゴリズムから得られたキーポイント
sizeキーポイントの直径
responseキーポイント上でのキーポイント検出器の応答(すなわちキーポイントの強度)
octaveキーポイントが検出されたピラミッドのオクターブ
class_idオブジェクトID

◆ hash()

size_t cv::KeyPoint::hash ( ) const

◆ overlap()

static float cv::KeyPoint::overlap ( const KeyPoint & kp1,
const KeyPoint & kp2 )
static
Python:
cv.KeyPoint.overlap(kp1, kp2) -> retval
cv.KeyPoint_overlap(kp1, kp2) -> retval

このメソッドはキーポイントのペアの重なりを計算する。重なりは、キーポイント領域の積集合の面積と和集合の面積の比(キーポイント領域を円とみなす)である。重ならない場合は0になる。同じ位置で同じサイズに一致する場合は1になる。

引数
kp11つ目のキーポイント
kp22つ目のキーポイント

メンバ変数詳解

◆ angle

float cv::KeyPoint::angle

計算されたキーポイントの向き(該当しない場合は-1)。[0,360) 度の範囲で、画像座標系を基準に時計回りで測定される。

◆ class_id

int cv::KeyPoint::class_id

オブジェクトクラス(キーポイントを所属するオブジェクトごとにクラスタリングする必要がある場合)

◆ octave

int cv::KeyPoint::octave

キーポイントが抽出されたオクターブ(ピラミッド層)

◆ pt

Point2f cv::KeyPoint::pt

キーポイントの座標

◆ response

float cv::KeyPoint::response

最も強いキーポイントを選択する際に用いられるレスポンス。さらなるソートやサブサンプリングに利用できる

◆ size

float cv::KeyPoint::size

意味のあるキーポイント近傍の直径


このクラス詳解は次のファイルから抽出されました: