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
Keypoint s to FloatKeypoint s. |
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)
FloatKeypoint
k
- the FloatKeypoint
to copy frompublic FloatKeypoint(Keypoint k)
Keypoint
.k
- public Float getOrdinate(int dimension)
Coordinate
getOrdinate
in interface Coordinate
dimension
- The index of the dimension we are interested inpublic int getDimensions()
getDimensions
in interface Coordinate
public float getScale()
ScaleSpacePoint
getScale
in interface ScaleSpacePoint
public void setScale(float scale)
ScaleSpacePoint
setScale
in interface ScaleSpacePoint
scale
- 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)
Point2d
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
out
- sink to write toIOException
- an error writing to outpublic void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic void readASCII(Scanner in) throws IOException
ReadableASCII
readASCII
in interface ReadableASCII
in
- source to read from.IOException
- an error reading inputpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public String asciiHeader()
ReadableASCII
asciiHeader
in interface ReadableASCII
asciiHeader
in interface WriteableASCII
public FloatFV getFeatureVector()
FeatureVectorProvider
getFeatureVector
in interface FeatureVectorProvider<FloatFV>
public KeypointLocation getLocation()
LocationProvider
getLocation
in interface LocationProvider<KeypointLocation>
public void setLocation(KeypointLocation location)
FloatKeypoint
location
- the locationpublic void translate(float x, float y)
Point2d
public FloatKeypoint transform(Jama.Matrix transform)
Point2d
public Point2d minus(Point2d a)
Point2d
public void translate(Point2d v)
Point2d
public static MemoryLocalFeatureList<FloatKeypoint> convert(List<? extends Keypoint> keys)
Keypoint
s to FloatKeypoint
s.keys
- the Keypoint
s to convert.FloatKeypoint
s.public void setOrdinate(int dimension, Number value)
Coordinate
setOrdinate
in interface Coordinate
dimension
- The index of the dimension we are interested invalue
- The value of the ordinate of the given dimension.