opencv/modules/java/src/java/features2d+KeyPoint.java
Andrey Kamaev 1991440cf7 Java API:
* fixed manually ported classes;
* added vector<vector<Point>> support;
* changed argument types for 3 functions;
* finished tests for org.opencv.core.Core class.
2011-08-06 09:22:07 +00:00

84 lines
2.3 KiB
Java

package org.opencv.features2d;
import org.opencv.core.Point;
//javadoc: KeyPoint
public class KeyPoint {
/**
* coordinates of the keypoint
*/
public Point pt;
/**
* diameter of the meaningful keypoint neighborhood
*/
public float size;
/**
* computed orientation of the keypoint (-1 if not applicable)
*/
public float angle;
/**
* the response by which the most strong keypoints have been selected. Can
* be used for further sorting or subsampling
*/
public float response;
/**
* octave (pyramid layer) from which the keypoint has been extracted
*/
public int octave;
/**
* object id that can be used to clustered keypoints by an object they
* belong to
*/
public int class_id;
// javadoc:KeyPoint::KeyPoint(x,y,_size,_angle,_response,_octave,_class_id)
public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id)
{
pt = new Point(x, y);
size = _size;
angle = _angle;
response = _response;
octave = _octave;
class_id = _class_id;
}
// javadoc: KeyPoint::KeyPoint()
public KeyPoint()
{
this(0, 0, 0, -1, 0, 0, -1);
}
// javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response, _octave)
public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave)
{
this(x, y, _size, _angle, _response, _octave, -1);
}
// javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response)
public KeyPoint(float x, float y, float _size, float _angle, float _response)
{
this(x, y, _size, _angle, _response, 0, -1);
}
// javadoc: KeyPoint::KeyPoint(x, y, _size, _angle)
public KeyPoint(float x, float y, float _size, float _angle)
{
this(x, y, _size, _angle, 0, 0, -1);
}
// javadoc: KeyPoint::KeyPoint(x, y, _size)
public KeyPoint(float x, float y, float _size)
{
this(x, y, _size, -1, 0, 0, -1);
}
@Override
public String toString() {
return "KeyPoint [pt=" + pt + ", size=" + size + ", angle=" + angle
+ ", response=" + response + ", octave=" + octave
+ ", class_id=" + class_id + "]";
}
}