public class SIFTGeoKeypoint extends Object implements LocalFeature<SIFTGeoKeypoint.SIFTGeoLocation,ByteFV>, VariableLength, Cloneable, Serializable
LocalFeature based on the .siftgeo format
developed by Krystian Mikolajczyk for his tools.
Because the .siftgeo file-format is custom, it isn't directly compatible with
that read by
MemoryLocalFeatureList.read(java.io.BufferedInputStream, Class) or
written with IOUtils. To work-around these issues, this class
implements a set of static I/O methods for reading and writing multiple
features to/from a standard .siftgeo file.
| Modifier and Type | Class and Description |
|---|---|
class |
SIFTGeoKeypoint.SIFTGeoLocation
The location of a
SIFTGeoKeypoint. |
| Modifier and Type | Field and Description |
|---|---|
byte[] |
descriptor
The descriptor
|
SIFTGeoKeypoint.SIFTGeoLocation |
location
The location of the point
|
| Constructor and Description |
|---|
SIFTGeoKeypoint(float x,
float y,
float orientation,
float scale,
float cornerness,
Jama.Matrix affine,
byte[] descriptor)
Construct with the given parameters
|
SIFTGeoKeypoint(int len)
Construct with the location set to zero, and with an empty descriptor of
the given length.
|
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
ByteFV |
getFeatureVector()
Get the FeatureVector associated with this object.
|
SIFTGeoKeypoint.SIFTGeoLocation |
getLocation()
Get the location associated with this object.
|
static LocalFeatureList<SIFTGeoKeypoint> |
read(DataInputStream stream)
Read .siftgeo file from a stream.
|
static LocalFeatureList<SIFTGeoKeypoint> |
read(File file)
Read a .siftgeo file.
|
static LocalFeatureList<SIFTGeoKeypoint> |
read(InputStream stream)
Read .siftgeo file from a stream.
|
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
String |
toString() |
static void |
write(List<SIFTGeoKeypoint> keys,
DataOutputStream stream)
Write a .siftgeo stream
|
static void |
write(List<SIFTGeoKeypoint> keys,
File file)
Write a .siftgeo file
|
static void |
write(List<SIFTGeoKeypoint> keys,
OutputStream stream)
Write a .siftgeo stream
|
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 SIFTGeoKeypoint.SIFTGeoLocation location
public byte[] descriptor
public SIFTGeoKeypoint(int len)
len - the descriptor lengthpublic SIFTGeoKeypoint(float x, float y, float orientation, float scale, float cornerness, Jama.Matrix affine, byte[] descriptor)
x - x-ordinate of featurey - y-ordinate of featurescale - scale of featureorientation - orientation of featurecornerness - the saliency of the interest pointaffine - affine parametersdescriptor - the descriptorpublic void readASCII(Scanner in) throws IOException
ReadableASCIIreadASCII in interface ReadableASCIIin - source to read from.IOException - an error reading inputpublic String asciiHeader()
ReadableASCIIasciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void writeASCII(PrintWriter out) throws IOException
WriteableASCIIwriteASCII in interface WriteableASCIIout - sink to write toIOException - an error writing to outpublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to outpublic ByteFV getFeatureVector()
FeatureVectorProvidergetFeatureVector in interface FeatureVectorProvider<ByteFV>public SIFTGeoKeypoint.SIFTGeoLocation getLocation()
LocationProvidergetLocation in interface LocationProvider<SIFTGeoKeypoint.SIFTGeoLocation>public static LocalFeatureList<SIFTGeoKeypoint> read(File file) throws IOException
file - the fileSIFTGeoKeypointsIOException - if an error occurs during readingpublic static LocalFeatureList<SIFTGeoKeypoint> read(InputStream stream) throws IOException
stream - the streamSIFTGeoKeypointsIOException - if an error occurs during readingpublic static LocalFeatureList<SIFTGeoKeypoint> read(DataInputStream stream) throws IOException
stream - the streamSIFTGeoKeypointsIOException - if an error occurs during readingpublic static void write(List<SIFTGeoKeypoint> keys, File file) throws IOException
keys - the SIFTGeoKeypoints to writefile - the fileIOException - if an error occurs whilst writingpublic static void write(List<SIFTGeoKeypoint> keys, OutputStream stream) throws IOException
keys - the SIFTGeoKeypoints to writestream - the streamIOException - if an error occurs whilst writingpublic static void write(List<SIFTGeoKeypoint> keys, DataOutputStream stream) throws IOException
keys - the SIFTGeoKeypoints to writestream - the streamIOException - if an error occurs whilst writing