public class ObjectFaceLuxandDescriptor extends ObjectByteVector
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
data
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Constructor and Description |
---|
ObjectFaceLuxandDescriptor(BinaryInput input,
BinarySerializator serializator)
Creates a new instance of ObjectFaceLuxandDescriptor loaded from binary input buffer.
|
ObjectFaceLuxandDescriptor(java.io.BufferedReader stream)
Creates a new instance of ObjectFaceLuxandDescriptor from stream.
|
ObjectFaceLuxandDescriptor(byte[] data)
Creates a new instance of ObjectFaceLuxandDescriptor from provided data.
|
Modifier and Type | Method and Description |
---|---|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
Distance function for Luxand descriptors.
|
static boolean |
isIsLibraryLoaded()
Returns true if the Luxand FaceSDK library was successfully loaded.
|
protected void |
writeData(java.io.OutputStream stream)
Store this object's data to a text stream.
|
binarySerialize, cloneRandomlyModify, dataEquals, dataHashCode, getBinarySize, getDimensionality, getMinMaxForEveryCoord, getMinMaxOverCoords, getMinMaxOverCoords, getSize, getVectorData, getVectorDataDimension, getVectorDataItem, getVectorDataItemByte, parseByteHexString, parseByteVector, randomData, toString, writeByteHexString, writeByteVector
clearSurplusData, clone, clone, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getMaxDistance, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, parseObjectComment, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey
public ObjectFaceLuxandDescriptor(byte[] data)
data
- the Luxand data for recognitionpublic ObjectFaceLuxandDescriptor(java.io.BufferedReader stream) throws java.io.IOException, java.io.EOFException, java.lang.NumberFormatException, java.lang.IllegalArgumentException
stream
- the stream to read object's data fromjava.io.IOException
- if there was an error during reading from the given streamjava.io.EOFException
- when end-of-file of the given stream is reachedjava.lang.NumberFormatException
- when the line read from given stream does not consist of comma-separated or space-separated numbersjava.lang.IllegalArgumentException
- if the read data is not validpublic ObjectFaceLuxandDescriptor(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
input
- the buffer to read the ObjectFaceLuxandDescriptor fromserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error reading from the bufferpublic static boolean isIsLibraryLoaded()
distance
method will throw exception.protected void writeData(java.io.OutputStream stream) throws java.io.IOException
LocalAbstractObject
writeData
in class ObjectByteVector
stream
- the stream to store this object tojava.io.IOException
- if there was an error while writing to streamprotected float getDistanceImpl(LocalAbstractObject obj, float distThreshold) throws java.lang.IllegalStateException
getDistanceImpl
in class LocalAbstractObject
obj
- the object to compute distance todistThreshold
- the threshold value on the distancejava.lang.IllegalStateException
- if the Luxand library was not loaded