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()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
Keypoint |
clone() |
Point2d |
copy()
Clone the point
|
void |
copyFrom(Point2d p)
Copy the values of the given point into this point.
|
boolean |
equals(Object obj) |
int |
getDimensions() |
ByteFV |
getFeatureVector()
Get the FeatureVector associated with this object.
|
KeypointLocation |
getLocation()
Get the location associated with this object.
|
Float |
getOrdinate(int dimension)
Get the ordinate value for a specific 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()
Get the scale associated with this point.
|
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)
Take point point from another point such that return = this - a
|
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
setLocation(KeypointLocation location)
Set the location of this
Keypoint |
void |
setOrdinate(int dimension,
Number value)
Set the ordinate value for a specific dimension.
|
void |
setScale(float scale)
Set the scale associated with this point.
|
void |
setX(float x)
Set x coordinate of point
|
void |
setY(float y)
Set y coordinate of point
|
String |
toString() |
Keypoint |
transform(Jama.Matrix transform)
Transform the point by the given matrix
|
void |
translate(float x,
float y)
Translate the position of the point by the given amounts
|
void |
translate(Point2d v)
Translate the position of the point by the given amounts
|
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to 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)
CoordinategetOrdinate in interface Coordinatedimension - The index of the dimension we are interested inpublic int getDimensions()
getDimensions in interface Coordinatepublic float getScale()
ScaleSpacePointgetScale in interface ScaleSpacePointpublic void setScale(float scale)
ScaleSpacePointsetScale in interface ScaleSpacePointscale - the scale to set.public boolean locationEquals(Object obj)
obj - the other keypointpublic void copyFrom(Point2d p)
Point2dpublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to outpublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic ByteFV getFeatureVector()
FeatureVectorProvidergetFeatureVector in interface FeatureVectorProvider<ByteFV>public KeypointLocation getLocation()
LocationProvidergetLocation 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 translate(float x, float y)
Point2dpublic Keypoint transform(Jama.Matrix transform)
Point2dpublic Point2d minus(Point2d a)
Point2dpublic void translate(Point2d v)
Point2dpublic void setOrdinate(int dimension, Number value)
CoordinatesetOrdinate in interface Coordinatedimension - The index of the dimension we are interested invalue - The value of the ordinate of the given dimension.