Public Member Functions | Static Public Member Functions | Public Attributes

# cv::KeyPoint Class Reference

`#include <features2d.hpp>`

List of all members.

## Public Member Functions
CV_WRAP | KeyPoint ()
| the default constructor
CV_WRAP | 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
| KeyPoint (Point2f _pt, float _size, float _angle=-1, float _response=0, int _octave=0, int _class_id=-1)
| the full constructor
## Static Public Member Functions
static void | convert (const std::vector< KeyPoint > &keypoints, CV_OUT std::vector< Point2f > &points2f, const std::vector< int > &keypointIndexes=std::vector< int >())
| converts vector of keypoints to vector of points
static 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)
| converts vector of points to the vector of keypoints, where each keypoint is assigned the same size and the same orientation
static float | overlap (const KeyPoint &kp1, const KeyPoint &kp2)
## Public Attributes
CV_PROP_RW float | angle
| computed orientation of the keypoint (-1 if not applicable)
CV_PROP_RW int | class_id
| object class (if the keypoints need to be clustered by an object they belong to)
CV_PROP_RW int | octave
| octave (pyramid layer) from which the keypoint has been extracted
CV_PROP_RW Point2f | pt
| coordinates of the keypoints
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 float | size
| diameter of the meaningfull keypoint neighborhood

## 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

CV_WRAP cv::KeyPoint::KeyPoint | ( | ) | `[inline]`

the default constructor

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

the full constructor

CV_WRAP 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

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

converts vector of keypoints to vector of points

static 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]`

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

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

CV_PROP_RW float cv::KeyPoint::angle

computed orientation of the keypoint (-1 if not applicable)

CV_PROP_RW int cv::KeyPoint::class_id

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

CV_PROP_RW int cv::KeyPoint::octave

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

CV_PROP_RW Point2f cv::KeyPoint::pt

coordinates of the keypoints

CV_PROP_RW float cv::KeyPoint::response

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

CV_PROP_RW float cv::KeyPoint::size

diameter of the meaningfull keypoint neighborhood

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

- C:/opt/OpenCV-2.2.0/modules/features2d/include/opencv2/features2d/features2d.hpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines