OpenCV453
公開メンバ関数 | 静的公開メンバ関数 | 公開変数類 | 全メンバ一覧
cv::KeyPoint クラス

Data structure for salient point detectors. [詳解]

#include <types.hpp>

cv::xfeatures2d::Elliptic_KeyPointに継承されています。

公開メンバ関数

CV_WRAP KeyPoint ()
 the default constructor
 
 KeyPoint (Point2f pt, float size, float angle=-1, float response=0, int octave=0, int class_id=-1)
 
CV_WRAP KeyPoint (float x, float y, float size, float angle=-1, float response=0, int octave=0, int class_id=-1)
 
size_t hash () const
 

静的公開メンバ関数

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

公開変数類

CV_PROP_RW Point2f pt
 coordinates of the keypoints
 
CV_PROP_RW float size
 diameter of the meaningful keypoint neighborhood
 
CV_PROP_RW float angle
 
CV_PROP_RW float response
 the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling
 
CV_PROP_RW int octave
 octave (pyramid layer) from which the keypoint has been extracted
 
CV_PROP_RW int class_id
 object class (if the keypoints need to be clustered by an object they belong to)
 

詳解

Data structure for salient point detectors.

The class instance stores a keypoint, i.e. a point feature found by one of many available keypoint detectors, such as Harris corner detector, FAST, StarDetector, SURF, SIFT etc.

The keypoint is characterized by the 2D position, scale (proportional to the diameter of the neighborhood that needs to be taken into account), orientation and some other parameters. The keypoint neighborhood is then analyzed by another algorithm that builds a descriptor (usually represented as a feature vector). The keypoints representing the same object in different images can then be matched using KDTree or another method.

構築子と解体子

◆ KeyPoint() [1/2]

cv::KeyPoint::KeyPoint ( Point2f  pt,
float  size,
float  angle = -1,
float  response = 0,
int  octave = 0,
int  class_id = -1 
)
引数
ptx & y coordinates of the keypoint
sizekeypoint diameter
anglekeypoint orientation
responsekeypoint detector response on the keypoint (that is, strength of the keypoint)
octavepyramid octave in which the keypoint has been detected
class_idobject id

◆ KeyPoint() [2/2]

CV_WRAP cv::KeyPoint::KeyPoint ( float  x,
float  y,
float  size,
float  angle = -1,
float  response = 0,
int  octave = 0,
int  class_id = -1 
)
引数
xx-coordinate of the keypoint
yy-coordinate of the keypoint
sizekeypoint diameter
anglekeypoint orientation
responsekeypoint detector response on the keypoint (that is, strength of the keypoint)
octavepyramid octave in which the keypoint has been detected
class_idobject id

関数詳解

◆ convert() [1/2]

static CV_WRAP void cv::KeyPoint::convert ( const std::vector< KeyPoint > &  keypoints,
CV_OUT std::vector< Point2f > &  points2f,
const std::vector< int > &  keypointIndexes = std::vector< int >() 
)
static

This method converts vector of keypoints to vector of points or the reverse, where each keypoint is assigned the same size and the same orientation.

引数
keypointsKeypoints obtained from any feature detection algorithm like SIFT/SURF/ORB
points2fArray of (x,y) coordinates of each keypoint
keypointIndexesArray of indexes of keypoints to be converted to points. (Acts like a mask to convert only specified keypoints)

◆ convert() [2/2]

static CV_WRAP void cv::KeyPoint::convert ( const std::vector< Point2f > &  points2f,
CV_OUT std::vector< KeyPoint > &  keypoints,
float  size = 1,
float  response = 1,
int  octave = 0,
int  class_id = -1 
)
static

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

引数
points2fArray of (x,y) coordinates of each keypoint
keypointsKeypoints obtained from any feature detection algorithm like SIFT/SURF/ORB
sizekeypoint diameter
responsekeypoint detector response on the keypoint (that is, strength of the keypoint)
octavepyramid octave in which the keypoint has been detected
class_idobject id

◆ overlap()

static CV_WRAP float cv::KeyPoint::overlap ( const KeyPoint kp1,
const KeyPoint kp2 
)
static

This method computes overlap for pair of keypoints. Overlap is the ratio between area of keypoint regions' intersection and area of keypoint regions' union (considering keypoint region as circle). If they don't overlap, we get zero. If they coincide at same location with same size, we get 1.

引数
kp1First keypoint
kp2Second keypoint

メンバ詳解

◆ angle

CV_PROP_RW float cv::KeyPoint::angle

computed orientation of the keypoint (-1 if not applicable); it's in [0,360) degrees and measured relative to image coordinate system, ie in clockwise.


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