public class ObjectFaceMPEG7AdvancedDescriptor extends LocalAbstractObjectParametric implements BinarySerializable
LocalAbstractObject.DataEqualObject, LocalAbstractObject.TextStreamFactory<T extends LocalAbstractObject>, LocalAbstractObject.TrivialDistanceFunction
Modifier and Type | Field and Description |
---|---|
protected int[] |
centralCompositeFeature
Face central composite features
|
protected int[] |
centralFourierFeature
Face central Fourier features
|
protected int[] |
compositeFeature
Face composite features
|
protected int |
extensionFlag
Flag whether the composite features extension is used
|
protected int[] |
fourierFeature
Face Fourier features
|
counterDistanceComputations, counterLowerBoundDistanceComputations, counterPrecomputedDistanceSavings, counterUpperBoundDistanceComputations, MAX_DISTANCE, MIN_DISTANCE, suppData, trivialDistanceFunction, UNKNOWN_DISTANCE
Constructor and Description |
---|
ObjectFaceMPEG7AdvancedDescriptor(BinaryInput input,
BinarySerializator serializator) |
ObjectFaceMPEG7AdvancedDescriptor(java.io.BufferedReader stream)
Creates a new instance of ObjectFaceMPEG7AdvancedDescriptor from stream.
|
ObjectFaceMPEG7AdvancedDescriptor(java.io.BufferedReader stream,
java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters)
Creates a new instance of ObjectFaceMPEG7AdvancedDescriptor from stream.
|
ObjectFaceMPEG7AdvancedDescriptor(java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters,
int extensionFlag,
int[] fourierFeature,
int[] centralFourierFeature,
int[] compositeFeature,
int[] centralCompositeFeature)
Creates a new instance of ObjectFaceMPEG7AdvancedDescriptor with the given data.
|
Modifier and Type | Method and Description |
---|---|
int |
binarySerialize(BinaryOutput output,
BinarySerializator serializator)
Binary-serialize this object into the
output . |
boolean |
dataEquals(java.lang.Object obj)
Indicates whether some other object has the same data as this one.
|
int |
dataHashCode()
Returns a hash code value for the data of this object.
|
int |
getBinarySize(BinarySerializator serializator)
Returns the exact size of the binary-serialized version of this object in bytes.
|
protected float |
getDistanceImpl(LocalAbstractObject obj,
float distThreshold)
The actual implementation of the metric function (see
LocalAbstractObject.getDistance(messif.objects.LocalAbstractObject) for full explanation). |
float |
getMaxDistance()
Returns a maximal possible distance for this class.
|
int |
getSize()
Returns the size of this object in bytes.
|
protected void |
writeDataImpl(java.io.OutputStream stream)
Store this object's data to a text stream.
|
clearSurplusData, containsParameter, getParameter, getParameter, getParameter, getParameterCount, getParameterMap, getParameterNames, getRequiredParameter, getRequiredParameter, parseObjectComment, removeParameter, setParameter, writeData
clone, clone, cloneRandomlyModify, create, create, createMetaDistancesHolder, excludeUsingPrecompDist, getDistance, getDistance, getDistance, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceFilter, getDistanceLowerBound, getDistanceLowerBoundImpl, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceStorePrecomputed, getDistanceUpperBound, getDistanceUpperBoundImpl, getFieldsForNames, getNormDistance, getPrecomputedDistance, getPrecomputedDistance, getRandomChar, getRandomNormal, chainDestroy, chainFilter, includeUsingPrecompDist, isDistanceCompatible, peekNextChar, readAttributesFromStream, readObjectComments, readObjectCommentsWithoutData, unchainFilter, write, write, writeAttributesToStream, writeObjectComment
clone, getLocatorURI, getNoDataObject, getObjectKey, getObjectKey, getObjectLocatorURI, setObjectKey, toString
protected int extensionFlag
protected int[] fourierFeature
protected int[] centralFourierFeature
protected int[] compositeFeature
protected int[] centralCompositeFeature
public ObjectFaceMPEG7AdvancedDescriptor(java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters, int extensionFlag, int[] fourierFeature, int[] centralFourierFeature, int[] compositeFeature, int[] centralCompositeFeature)
additionalParameters
- additional parameters for this meta objectextensionFlag
- the flag whether the composite features extension is usedfourierFeature
- the face Fourier feature vectorcentralFourierFeature
- the face central Fourier feature vectorcompositeFeature
- the face composite feature vectorcentralCompositeFeature
- the face central composite feature vectorpublic ObjectFaceMPEG7AdvancedDescriptor(java.io.BufferedReader stream) throws java.io.EOFException, java.io.IOException, java.lang.IllegalArgumentException
stream
- the text stream to read one object fromjava.io.EOFException
- is thrown when the end-of-file is reachedjava.io.IOException
- if there is an error during reading from the given stream;java.lang.IllegalArgumentException
- if the text stream contains invalid values for this objectpublic ObjectFaceMPEG7AdvancedDescriptor(java.io.BufferedReader stream, java.util.Map<java.lang.String,? extends java.io.Serializable> additionalParameters) throws java.io.EOFException, java.io.IOException, java.lang.IllegalArgumentException
stream
- the text stream to read one object fromadditionalParameters
- additional parameters for this meta objectjava.io.EOFException
- is thrown when the end-of-file is reachedjava.io.IOException
- if there is an error during reading from the given stream;java.lang.IllegalArgumentException
- if the text stream contains invalid values for this objectpublic ObjectFaceMPEG7AdvancedDescriptor(BinaryInput input, BinarySerializator serializator) throws java.io.IOException
java.io.IOException
protected void writeDataImpl(java.io.OutputStream stream) throws java.io.IOException
LocalAbstractObjectParametric
writeDataImpl
in class LocalAbstractObjectParametric
stream
- the stream to store this object tojava.io.IOException
- if there was an error while writing to streampublic int getSize()
LocalAbstractObject
getSize
in class LocalAbstractObject
public boolean dataEquals(java.lang.Object obj)
LocalAbstractObject
dataEquals
in class LocalAbstractObject
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.public int dataHashCode()
LocalAbstractObject
dataHashCode
in class LocalAbstractObject
protected float getDistanceImpl(LocalAbstractObject obj, float distThreshold)
LocalAbstractObject
LocalAbstractObject.getDistance(messif.objects.LocalAbstractObject)
for full explanation).
The implementation should not increment distanceComputations statistics.getDistanceImpl
in class LocalAbstractObject
obj
- the object to compute distance todistThreshold
- the threshold value on the distancepublic float getMaxDistance()
LocalAbstractObject
LocalAbstractObject.MAX_DISTANCE
.getMaxDistance
in class LocalAbstractObject
public int binarySerialize(BinaryOutput output, BinarySerializator serializator) throws java.io.IOException
LocalAbstractObjectParametric
output
.binarySerialize
in interface BinarySerializable
binarySerialize
in class LocalAbstractObjectParametric
output
- the output that this object is binary-serialized intoserializator
- the serializator used to write objectsjava.io.IOException
- if there was an I/O error during serializationpublic int getBinarySize(BinarySerializator serializator)
LocalAbstractObjectParametric
getBinarySize
in interface BinarySerializable
getBinarySize
in class LocalAbstractObjectParametric
serializator
- the serializator used to write objects