L - The type of Locationpublic class FloatLocalFeatureAdaptor<L extends Location> extends Object implements LocalFeature<L,FloatFV>
FloatFV, without the
cost of necessarily storing the underlying feature as a FloatFV. For
example, this can be used to make a Keypoint look like it's backed by a float
array rather than a byte array, without incurring the four-times increase in
storage this would incur.
The implementation also allows a normalisation process to occur during
conversion through a Normaliser.
| Constructor and Description |
|---|
FloatLocalFeatureAdaptor(LocalFeature<L,?> localFeature)
Construct a new
FloatLocalFeatureAdaptor with the given
underlying feature |
FloatLocalFeatureAdaptor(LocalFeature<L,?> localFeature,
Normaliser<FloatFV> normaliser)
Construct a new
FloatLocalFeatureAdaptor with the given
underlying feature and normaliser. |
| Modifier and Type | Method and Description |
|---|---|
String |
asciiHeader()
Header for ascii input.
|
byte[] |
binaryHeader()
Header for binary input.
|
boolean |
equals(Object obj) |
FloatFV |
getFeatureVector()
Get the FeatureVector associated with this object.
|
L |
getLocation()
Get the location associated with this object.
|
int |
hashCode() |
void |
readASCII(Scanner in)
Read internal state from in.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
static <L extends Location> |
wrap(List<? extends LocalFeature<L,?>> list)
Produce a
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand. |
static <L extends Location> |
wrap(List<? extends LocalFeature<L,?>> list,
Normaliser<FloatFV> normaliser)
Produce a
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand. |
static List<FloatLocalFeatureAdaptor<?>> |
wrapUntyped(List<? extends LocalFeature<?,?>> list)
Produce a
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand. |
static List<FloatLocalFeatureAdaptor<?>> |
wrapUntyped(List<? extends LocalFeature<?,?>> list,
Normaliser<FloatFV> normaliser)
Produce a
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand. |
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 FloatLocalFeatureAdaptor(LocalFeature<L,?> localFeature)
FloatLocalFeatureAdaptor with the given
underlying featurelocalFeature - the underlying featurepublic FloatLocalFeatureAdaptor(LocalFeature<L,?> localFeature, Normaliser<FloatFV> normaliser)
FloatLocalFeatureAdaptor with the given
underlying feature and normaliser.localFeature - the underlying featurenormaliser - the normaliserpublic 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 FloatFV getFeatureVector()
FeatureVectorProvidergetFeatureVector in interface FeatureVectorProvider<FloatFV>public L getLocation()
LocationProvidergetLocation in interface LocationProvider<L extends Location>public static <L extends Location> List<FloatLocalFeatureAdaptor<L>> wrap(List<? extends LocalFeature<L,?>> list)
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand.list - the input listpublic static List<FloatLocalFeatureAdaptor<?>> wrapUntyped(List<? extends LocalFeature<?,?>> list)
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand.list - the input listpublic static <L extends Location> List<FloatLocalFeatureAdaptor<L>> wrap(List<? extends LocalFeature<L,?>> list, Normaliser<FloatFV> normaliser)
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand.list - the input listnormaliser - the normaliserpublic static List<FloatLocalFeatureAdaptor<?>> wrapUntyped(List<? extends LocalFeature<?,?>> list, Normaliser<FloatFV> normaliser)
LocalFeatureList of FloatLocalFeatureAdaptor by
wrapping the input list, and dynamically wrapping with the
FloatLocalFeatureAdaptors on demand.list - the input listnormaliser - the normaliser