![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
opencv on mbed
KeyPoint Class Reference
[Basic structures]
Data structure for salient point detectors. More...
#include <types.hpp>
Public Member Functions | |
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) |
Static Public Member Functions | |
static CV_WRAP void | convert (const std::vector< KeyPoint > &keypoints, CV_OUT std::vector< Point2f > &points2f, const std::vector< int > &keypointIndexes=std::vector< int >()) |
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. | |
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) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
static CV_WRAP float | overlap (const KeyPoint &kp1, const KeyPoint &kp2) |
This method computes overlap for pair of keypoints. | |
Data Fields | |
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 |
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. | |
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) |
Detailed Description
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, 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.
Definition at line 632 of file types.hpp.
Constructor & Destructor Documentation
CV_WRAP KeyPoint | ( | ) |
the default constructor
KeyPoint | ( | Point2f | _pt, |
float | _size, | ||
float | _angle = -1 , |
||
float | _response = 0 , |
||
int | _octave = 0 , |
||
int | _class_id = -1 |
||
) |
- Parameters:
-
_pt x & y coordinates of the keypoint _size keypoint diameter _angle keypoint orientation _response keypoint detector response on the keypoint (that is, strength of the keypoint) _octave pyramid octave in which the keypoint has been detected _class_id object id
CV_WRAP KeyPoint | ( | float | x, |
float | y, | ||
float | _size, | ||
float | _angle = -1 , |
||
float | _response = 0 , |
||
int | _octave = 0 , |
||
int | _class_id = -1 |
||
) |
- Parameters:
-
x x-coordinate of the keypoint y y-coordinate of the keypoint _size keypoint diameter _angle keypoint orientation _response keypoint detector response on the keypoint (that is, strength of the keypoint) _octave pyramid octave in which the keypoint has been detected _class_id object id
Member Function Documentation
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] |
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.
- Parameters:
-
keypoints Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB points2f Array of (x,y) coordinates of each keypoint keypointIndexes Array of indexes of keypoints to be converted to points. (Acts like a mask to convert only specified keypoints)
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] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Parameters:
-
points2f Array of (x,y) coordinates of each keypoint keypoints Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORB size keypoint diameter response keypoint detector response on the keypoint (that is, strength of the keypoint) octave pyramid octave in which the keypoint has been detected class_id object id
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.
- Parameters:
-
kp1 First keypoint kp2 Second keypoint
Field Documentation
CV_PROP_RW float angle |
CV_PROP_RW int class_id |
CV_PROP_RW int octave |
CV_PROP_RW float response |
Generated on Tue Jul 12 2022 16:42:43 by
![doxygen](doxygen.png)