@Namespace(value="cv") @NoOffset @Properties(inherit=opencv_core.class) public class KeyPoint extends Pointer
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.
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
KeyPoint()
the default constructor
|
KeyPoint(float x,
float y,
float _size) |
KeyPoint(float x,
float y,
float _size,
float _angle,
float _response,
int _octave,
int _class_id) |
KeyPoint(long size)
Native array allocator.
|
KeyPoint(Point2f _pt,
float _size) |
KeyPoint(Point2f _pt,
float _size,
float _angle,
float _response,
int _octave,
int _class_id) |
KeyPoint(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
KeyPoint |
angle(float setter) |
int |
class_id()
object class (if the keypoints need to be clustered by an object they belong to)
|
KeyPoint |
class_id(int setter) |
static void |
convert(KeyPointVector keypoints,
Point2fVector points2f) |
static void |
convert(KeyPointVector keypoints,
Point2fVector points2f,
int[] keypointIndexes) |
static void |
convert(KeyPointVector keypoints,
Point2fVector points2f,
IntBuffer keypointIndexes) |
static void |
convert(KeyPointVector keypoints,
Point2fVector points2f,
IntPointer keypointIndexes)
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 void |
convert(Point2fVector points2f,
KeyPointVector keypoints) |
static void |
convert(Point2fVector points2f,
KeyPointVector keypoints,
float size,
float response,
int octave,
int class_id)
\overload
|
long |
hash() |
int |
octave()
octave (pyramid layer) from which the keypoint has been extracted
|
KeyPoint |
octave(int setter) |
static float |
overlap(KeyPoint kp1,
KeyPoint kp2)
This method computes overlap for pair of keypoints.
|
KeyPoint |
position(long position) |
Point2f |
pt()
coordinates of the keypoints
|
KeyPoint |
pt(Point2f setter) |
float |
response()
the response by which the most strong keypoints have been selected.
|
KeyPoint |
response(float setter) |
float |
size()
diameter of the meaningful keypoint neighborhood
|
KeyPoint |
size(float setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public KeyPoint(Pointer p)
Pointer.Pointer(Pointer)
.public KeyPoint(long size)
Pointer.position(long)
.public KeyPoint()
public KeyPoint(@ByVal Point2f _pt, float _size, float _angle, float _response, int _octave, int _class_id)
_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 idpublic KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)
x
- x-coordinate of the keypointy
- 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 idpublic KeyPoint(float x, float y, float _size)
public static void convert(@Const @ByRef KeyPointVector keypoints, @ByRef Point2fVector points2f, @StdVector IntPointer keypointIndexes)
keypoints
- Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORBpoints2f
- Array of (x,y) coordinates of each keypointkeypointIndexes
- Array of indexes of keypoints to be converted to points. (Acts like a mask to
convert only specified keypoints)public static void convert(@Const @ByRef KeyPointVector keypoints, @ByRef Point2fVector points2f)
public static void convert(@Const @ByRef KeyPointVector keypoints, @ByRef Point2fVector points2f, @StdVector IntBuffer keypointIndexes)
public static void convert(@Const @ByRef KeyPointVector keypoints, @ByRef Point2fVector points2f, @StdVector int[] keypointIndexes)
public static void convert(@Const @ByRef Point2fVector points2f, @ByRef KeyPointVector keypoints, float size, float response, int octave, int class_id)
points2f
- Array of (x,y) coordinates of each keypointkeypoints
- Keypoints obtained from any feature detection algorithm like SIFT/SURF/ORBsize
- keypoint diameterresponse
- keypoint detector response on the keypoint (that is, strength of the keypoint)octave
- pyramid octave in which the keypoint has been detectedclass_id
- object idpublic static void convert(@Const @ByRef Point2fVector points2f, @ByRef KeyPointVector keypoints)
public static float overlap(@Const @ByRef KeyPoint kp1, @Const @ByRef KeyPoint kp2)
kp1
- First keypointkp2
- Second keypointpublic float size()
public KeyPoint size(float setter)
public float angle()
public KeyPoint angle(float setter)
public float response()
public KeyPoint response(float setter)
public int octave()
public KeyPoint octave(int setter)
public int class_id()
public KeyPoint class_id(int setter)
Copyright © 2020. All rights reserved.