Struct opencv::core::KeyPoint

source ·
pub struct KeyPoint { /* private fields */ }
Expand 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, #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.

Implementations§

the default constructor

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
C++ default parameters
  • angle: -1
  • response: 0
  • octave: 0
  • 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
C++ default parameters
  • angle: -1
  • response: 0
  • octave: 0
  • class_id: -1

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)
C++ default parameters
  • keypoint_indexes: std::vector()

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)
Overloaded 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
C++ default parameters
  • size: 1
  • response: 1
  • octave: 0
  • class_id: -1

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

Trait Implementations§

Wrap the specified raw pointer Read more
Return an the underlying raw pointer while consuming this wrapper. Read more
Return the underlying raw pointer. Read more
Return the underlying mutable raw pointer Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
coordinates of the keypoints
diameter of the meaningful keypoint neighborhood
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.
the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling
octave (pyramid layer) from which the keypoint has been extracted
object class (if the keypoints need to be clustered by an object they belong to)
coordinates of the keypoints
diameter of the meaningful keypoint neighborhood
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.
the response by which the most strong keypoints have been selected. Can be used for the further sorting or subsampling
octave (pyramid layer) from which the keypoint has been extracted
object class (if the keypoints need to be clustered by an object they belong to)

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.