public class Keypoint extends Object implements Serializable, ScaleSpacePoint, LocalFeature<KeypointLocation,ByteFV>, VariableLength, Cloneable
| Modifier and Type | Field and Description |
|---|---|
byte[] |
ivec
keypoint feature descriptor (i.e.
|
float |
ori
dominant orientation of keypoint
|
float |
scale
scale of keypoint
|
float |
x
x-position of keypoint
|
float |
y
y-position of keypoint
|
| Constructor and Description |
|---|
Keypoint()
Construct with the default feature vector length for SIFT (128).
|
Keypoint(float x,
float y,
float ori,
float scale,
byte[] ivec)
Construct with the given parameters.
|
Keypoint(int length)
Construct with the given feature vector length.
|
Keypoint(Keypoint k)
Construct by copying from another
Keypoint |
| Modifier and Type | Method and Description |
|---|---|
static List<Keypoint> |
addGaussianNoise(List<Keypoint> siftFeatures,
double mean,
double sigma)
Add Gaussian noise the feature vectors of some features.
|
String |
asciiHeader() |
byte[] |
binaryHeader() |
Keypoint |
clone() |
Point2d |
copy() |
void |
copyFrom(Point2d p) |
boolean |
equals(Object obj) |
int |
getDimensions() |
ByteFV |
getFeatureVector() |
KeypointLocation |
getLocation() |
Float |
getOrdinate(int dimension) |
static List<Keypoint> |
getRelativeKeypoints(List<Keypoint> keypoints,
float x,
float y)
Create a list of
Keypoints from the input list, but with the
positions offset by the given amount. |
float |
getScale() |
static List<Keypoint> |
getScaledKeypoints(List<Keypoint> keypoints,
int toScale)
Scale a list of keypoints by the given amount.
|
float |
getX() |
float |
getY() |
int |
hashCode() |
boolean |
locationEquals(Object obj)
|
Point2d |
minus(Point2d a) |
void |
readASCII(Scanner in) |
void |
readBinary(DataInput in) |
void |
setLocation(KeypointLocation location)
Set the location of this
Keypoint |
void |
setOrdinate(int dimension,
Number value) |
void |
setScale(float scale) |
void |
setX(float x) |
void |
setY(float y) |
String |
toString() |
Keypoint |
transform(Jama.Matrix transform) |
void |
translate(float x,
float y) |
void |
translate(Point2d v) |
void |
writeASCII(PrintWriter out) |
void |
writeBinary(DataOutput out) |
public byte[] ivec
public float ori
public float scale
public float x
public float y
public Keypoint()
public Keypoint(int length)
length - the length of the feature vectorpublic Keypoint(float x, float y, float ori, float scale, byte[] ivec)
x - the x-ordinate of the keypointy - the y-ordinate of the keypointori - the orientation of the keypointscale - the scale of the keypointivec - the feature vector of the keypointpublic Float getOrdinate(int dimension)
getOrdinate in interface Coordinatepublic int getDimensions()
getDimensions in interface Coordinatepublic float getScale()
getScale in interface ScaleSpacePointpublic void setScale(float scale)
setScale in interface ScaleSpacePointpublic boolean locationEquals(Object obj)
obj - the other keypointpublic void writeBinary(DataOutput out) throws IOException
writeBinary in interface WriteableBinaryIOExceptionpublic void writeASCII(PrintWriter out) throws IOException
writeASCII in interface WriteableASCIIIOExceptionpublic void readBinary(DataInput in) throws IOException
readBinary in interface ReadableBinaryIOExceptionpublic void readASCII(Scanner in) throws IOException
readASCII in interface ReadableASCIIIOExceptionpublic byte[] binaryHeader()
binaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic String asciiHeader()
asciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic ByteFV getFeatureVector()
getFeatureVector in interface FeatureVectorProvider<ByteFV>public KeypointLocation getLocation()
getLocation in interface LocationProvider<KeypointLocation>public void setLocation(KeypointLocation location)
Keypointlocation - the locationpublic static List<Keypoint> getRelativeKeypoints(List<Keypoint> keypoints, float x, float y)
Keypoints from the input list, but with the
positions offset by the given amount.keypoints - the input listx - the x offsety - the y offsetpublic static List<Keypoint> addGaussianNoise(List<Keypoint> siftFeatures, double mean, double sigma)
siftFeatures - the input featuresmean - the mean of the noisesigma - the standard deviation of the noisepublic static List<Keypoint> getScaledKeypoints(List<Keypoint> keypoints, int toScale)
keypoints - the input features.toScale - the scale factorpublic void setOrdinate(int dimension, Number value)
setOrdinate in interface Coordinate