public class FloatKeypoint extends Object implements Serializable, ScaleSpacePoint, LocalFeature<KeypointLocation,FloatFV>, VariableLength, Cloneable
| Modifier and Type | Field and Description |
|---|---|
float |
ori
dominant orientation of keypoint
|
float |
scale
scale of keypoint
|
float[] |
vector
keypoint feature descriptor (i.e.
|
float |
x
x-position of keypoint
|
float |
y
y-position of keypoint
|
| Constructor and Description |
|---|
FloatKeypoint()
Construct with the default feature vector length for SIFT (128).
|
FloatKeypoint(float x,
float y,
float ori,
float scale,
float[] ivec)
Construct with the given parameters.
|
FloatKeypoint(FloatKeypoint k)
Construct by copying from another
FloatKeypoint |
FloatKeypoint(int length)
Construct with the given feature vector length.
|
FloatKeypoint(Keypoint k)
Construct from a
Keypoint. |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
FloatKeypoint |
clone() |
static MemoryLocalFeatureList<FloatKeypoint> |
convert(List<? extends Keypoint> keys)
Convert a list of
Keypoints to FloatKeypoints. |
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() |
FloatFV |
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.
|
float |
getScale()
Get the scale associated with this point.
|
float |
getX() |
float |
getY() |
int |
hashCode() |
boolean |
locationEquals(Object obj)
Test whether the location of this
FloatKeypoint and another
FloatKeypoint is the same. |
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
FloatKeypoint |
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() |
FloatKeypoint |
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 float[] vector
public float ori
public float scale
public float x
public float y
public FloatKeypoint()
public FloatKeypoint(int length)
length - the length of the feature vectorpublic FloatKeypoint(float x, float y, float ori, float scale, float[] 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 FloatKeypoint(FloatKeypoint k)
FloatKeypointk - the FloatKeypoint to copy frompublic FloatKeypoint(Keypoint k)
Keypoint.k - public 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)
FloatKeypoint and another
FloatKeypoint is the same.obj - the other keypointpublic FloatKeypoint clone()
public 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 FloatFV getFeatureVector()
FeatureVectorProvidergetFeatureVector in interface FeatureVectorProvider<FloatFV>public KeypointLocation getLocation()
LocationProvidergetLocation in interface LocationProvider<KeypointLocation>public void setLocation(KeypointLocation location)
FloatKeypointlocation - the locationpublic void translate(float x, float y)
Point2dpublic FloatKeypoint transform(Jama.Matrix transform)
Point2dpublic Point2d minus(Point2d a)
Point2dpublic void translate(Point2d v)
Point2dpublic static MemoryLocalFeatureList<FloatKeypoint> convert(List<? extends Keypoint> keys)
Keypoints to FloatKeypoints.keys - the Keypoints to convert.FloatKeypoints.public 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.