public class ShapeContext extends java.lang.Object implements LocalFeature
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
SHAPE_CONTEXT_FIELD |
| 构造器和说明 |
|---|
ShapeContext()
needed for instantiation via getInstance()
|
ShapeContext(double[] histogram,
double x,
double y) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
getByteArrayRepresentation()
Returns a compact byte[] based representation of the feature vector.
|
java.lang.Class<?> |
getClassOfExtractor() |
double |
getDistance(LireFeature lireFeature)
The distance function for this type of feature
|
java.lang.String |
getFeatureName()
Gives a descriptive name of the feature, i.e. a name to show up in benchmarks, menus, UIs, etc.
|
double[] |
getFeatureVector()
Convenience method to get the feature vector as double[] array.
|
java.lang.String |
getFieldName()
Returns the preferred field name for indexing.
|
double |
getSize()
not used
|
double |
getX()
not preserved over byte array representation
|
double |
getY()
not preserved over byte array representation
|
void |
setByteArrayRepresentation(byte[] bytes)
Sets the feature vector values based on the byte[] data.
|
void |
setByteArrayRepresentation(byte[] bytes,
int i,
int i1)
Sets the feature vector values based on the byte[] data.
|
public static final java.lang.String SHAPE_CONTEXT_FIELD
public ShapeContext()
public ShapeContext(double[] histogram,
double x,
double y)
public double getX()
getX 在接口中 LocalFeaturepublic double getY()
getY 在接口中 LocalFeaturepublic double getSize()
getSize 在接口中 LocalFeaturepublic java.lang.Class<?> getClassOfExtractor()
getClassOfExtractor 在接口中 LocalFeaturepublic java.lang.String getFeatureName()
LireFeaturegetFeatureName 在接口中 LireFeaturepublic java.lang.String getFieldName()
LireFeaturegetFieldName 在接口中 LireFeaturepublic byte[] getByteArrayRepresentation()
LireFeaturegetByteArrayRepresentation 在接口中 LireFeatureLireFeature.setByteArrayRepresentation(byte[])public void setByteArrayRepresentation(byte[] bytes)
LireFeatureLireFeature.getByteArrayRepresentation()
to generate a compatible byte[] array.setByteArrayRepresentation 在接口中 LireFeaturebytes - the byte[] data.LireFeature.getByteArrayRepresentation()public void setByteArrayRepresentation(byte[] bytes,
int i,
int i1)
LireFeatureLireFeature.getByteArrayRepresentation()
to generate a compatible byte[] array.setByteArrayRepresentation 在接口中 LireFeaturebytes - the byte[] array containing the data.i - the offset, i.e. where the feature vector starts.i1 - the length of the data representing the feature vector.LireFeature.getByteArrayRepresentation()public double getDistance(LireFeature lireFeature)
LireFeaturegetDistance 在接口中 LireFeaturelireFeature - the feature vector to compare the current instance to.public double[] getFeatureVector()
FeatureVectorgetFeatureVector 在接口中 FeatureVector