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() |
byte[] |
binaryHeader() |
ByteFV |
getFeatureVector() |
SIFTGeoKeypoint.SIFTGeoLocation |
getLocation() |
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) |
void |
readBinary(DataInput 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) |
void |
writeBinary(DataOutput 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
readASCII in interface ReadableASCIIIOExceptionpublic String asciiHeader()
asciiHeader in interface ReadableASCIIasciiHeader in interface WriteableASCIIpublic void readBinary(DataInput in) throws IOException
readBinary in interface ReadableBinaryIOExceptionpublic byte[] binaryHeader()
binaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void writeASCII(PrintWriter out) throws IOException
writeASCII in interface WriteableASCIIIOExceptionpublic void writeBinary(DataOutput out) throws IOException
writeBinary in interface WriteableBinaryIOExceptionpublic ByteFV getFeatureVector()
getFeatureVector in interface FeatureVectorProvider<ByteFV>public SIFTGeoKeypoint.SIFTGeoLocation getLocation()
getLocation 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