OpenCV  2.4.13.7
Open Source Computer Vision
cv::KeyPoint Class Reference

#include <features2d.hpp>

Public Member Functions

 KeyPoint ()
 the default constructor More...
 
 KeyPoint (Point2f _pt, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1)
 the full constructor More...
 
 KeyPoint (float x, float y, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1)
 another form of the full constructor More...
 
size_t hash () const
 

Static Public Member Functions

static void convert (const vector< KeyPoint > &keypoints, CV_OUT vector< Point2f > &points2f, const vector< int > &keypointIndexes=vector< int >())
 converts vector of keypoints to vector of points More...
 
static void convert (const vector< Point2f > &points2f, CV_OUT vector< KeyPoint > &keypoints, float size=1, float response=1, int octave=0, int class_id=-1)
 converts vector of points to the vector of keypoints, where each keypoint is assigned the same size and the same orientation More...
 
static float overlap (const KeyPoint &kp1, const KeyPoint &kp2)
 

Public Attributes

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

Detailed Description

The Keypoint Class

The class instance stores a keypoint, i.e. a point feature found by one of many available keypoint detectors, such as Harris corner detector, cv::FAST, cv::StarDetector, cv::SURF, cv::SIFT, cv::LDetector 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 cv::KDTree or another method.

Constructor & Destructor Documentation

§ KeyPoint() [1/3]

cv::KeyPoint::KeyPoint ( )
inline

the default constructor

§ KeyPoint() [2/3]

cv::KeyPoint::KeyPoint ( Point2f  _pt,
float  _size,
float  _angle = -1,
float  _response = 0,
int  _octave = 0,
int  _class_id = -1 
)
inline

the full constructor

§ 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 
)
inline

another form of the full constructor

Member Function Documentation

§ convert() [1/2]

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

converts vector of keypoints to vector of points

§ convert() [2/2]

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

converts vector of points to the vector of keypoints, where each keypoint is assigned the same size and the same orientation

§ hash()

size_t cv::KeyPoint::hash ( ) const

§ overlap()

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

computes overlap for pair of keypoints; overlap is a ratio between area of keypoint regions intersection and area of keypoint regions union (now keypoint region is circle)

Member Data Documentation

§ angle

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.

§ class_id

int cv::KeyPoint::class_id

object class (if the keypoints need to be clustered by an object they belong to)

§ octave

int cv::KeyPoint::octave

octave (pyramid layer) from which the keypoint has been extracted

§ pt

Point2f cv::KeyPoint::pt

coordinates of the keypoints

§ response

float cv::KeyPoint::response

the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling

§ size

float cv::KeyPoint::size

diameter of the meaningful keypoint neighborhood


The documentation for this class was generated from the following file: