Struct opencv::features2d::KeyPoint
[−]
[src]
pub struct KeyPoint { pub pt: Point2f, pub size: f32, pub angle: f32, pub response: f32, pub octave: i32, pub class_id: i32, }
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.
Fields
pt | |
size | |
angle | |
response | |
octave | |
class_id |
Methods
impl KeyPoint
fn default() -> Result<KeyPoint, String>
the default constructor
fn new_point(_pt: Point2f, _size: f32, _angle: f32, _response: f32, _octave: i32, _class_id: i32) -> Result<KeyPoint, String>
the full constructor
default value for arguments: - _angle: default -1 - _response: default 0 - _octave: default 0 - _class_id: default -1
fn new_coords(x: f32, y: f32, _size: f32, _angle: f32, _response: f32, _octave: i32, _class_id: i32) -> Result<KeyPoint, String>
another form of the full constructor
default value for arguments: - _angle: default -1 - _response: default 0 - _octave: default 0 - _class_id: default -1
fn hash(self) -> Result<size_t, String>
fn convert_from(self, keypoints: &VectorOfKeyPoint, points2f: &VectorOfPoint2f, keypointIndexes: &VectorOfint) -> Result<(), String>
converts vector of keypoints to vector of points
default value for arguments:
- keypointIndexes: default vector
fn convert_to(self, points2f: &VectorOfPoint2f, keypoints: &VectorOfKeyPoint, size: f32, response: f32, octave: i32, class_id: i32) -> Result<(), String>
converts vector of points to the vector of keypoints, where each keypoint is assigned the same size and the same orientation
default value for arguments: - size: default 1 - response: default 1 - octave: default 0 - class_id: default -1
fn overlap(self, kp1: KeyPoint, kp2: KeyPoint) -> Result<f32, String>
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)