public class GlobalDocumentBuilder extends java.lang.Object implements DocumentBuilder
| 限定符和类型 | 类和说明 |
|---|---|
static class |
GlobalDocumentBuilder.HashingMode |
FIELD_NAME_ACCID, FIELD_NAME_AUTOCOLORCORRELOGRAM, FIELD_NAME_BINARY_PATTERNS_PYRAMID, FIELD_NAME_CEDD, FIELD_NAME_COLORHISTOGRAM, FIELD_NAME_COLORLAYOUT, FIELD_NAME_CVOPPSIFT, FIELD_NAME_CVSIFT, FIELD_NAME_CVSURF, FIELD_NAME_EDGEHISTOGRAM, FIELD_NAME_FCTH, FIELD_NAME_GABOR, FIELD_NAME_IDENTIFIER, FIELD_NAME_JCD, FIELD_NAME_JOINT_HISTOGRAM, FIELD_NAME_JPEGCOEFFS, FIELD_NAME_LOCAL_BINARY_PATTERNS, FIELD_NAME_LOCAL_BINARY_PATTERNS_AND_OPPONENT, FIELD_NAME_LUMINANCE_LAYOUT, FIELD_NAME_OPPONENT_HISTOGRAM, FIELD_NAME_PHOG, FIELD_NAME_Rank_Opponent, FIELD_NAME_ROTATION_INVARIANT_LOCAL_BINARY_PATTERNS, FIELD_NAME_SCALABLECOLOR, FIELD_NAME_SELF_SIMILARITIES, FIELD_NAME_SELF_SIMILARITIES_ORIG, FIELD_NAME_SIFT, FIELD_NAME_SIMPLE, FIELD_NAME_SURF, FIELD_NAME_TAMURA, HASH_FIELD_SUFFIX, MAX_IMAGE_DIMENSION, NUM_OF_THREADS| 构造器和说明 |
|---|
GlobalDocumentBuilder() |
GlobalDocumentBuilder(boolean hashing) |
GlobalDocumentBuilder(boolean hashing,
GlobalDocumentBuilder.HashingMode hashingMode)
Creates a GlobalDocumentBuilder with the specific hashing mode.
|
GlobalDocumentBuilder(boolean hashing,
GlobalDocumentBuilder.HashingMode hashingMode,
boolean useDocValues)
Creates a GlobalDocumentBuilder with the specific hashing mode.
|
GlobalDocumentBuilder(java.lang.Class<? extends GlobalFeature> globalFeatureClass) |
GlobalDocumentBuilder(java.lang.Class<? extends GlobalFeature> globalFeatureClass,
boolean hashing) |
GlobalDocumentBuilder(java.lang.Class<? extends GlobalFeature> globalFeatureClass,
boolean hashing,
boolean useDocValues)
Use DocValues instead of TextField implementations for storing the feature vector.
|
GlobalDocumentBuilder(ExtractorItem extractorItem) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addExtractor(java.lang.Class<? extends GlobalFeature> globalFeatureClass)
Can be used to add global extractors.
|
void |
addExtractor(ExtractorItem extractorItem)
Can be used to add global extractors.
|
org.apache.lucene.document.Field[] |
createDescriptorFields(java.awt.image.BufferedImage image)
Creates the feature fields for a Lucene Document without creating the document itself.
|
org.apache.lucene.document.Document |
createDocument(java.awt.image.BufferedImage image,
java.lang.String identifier)
Creates a new Lucene document from a BufferedImage.
|
GlobalFeature |
extractGlobalFeature(java.awt.image.BufferedImage image,
GlobalFeature globalFeature)
Images are resized so as not to exceed the
DocumentBuilder.MAX_IMAGE_DIMENSION, after that
the feature is extracted using the given globalFeature. |
public GlobalDocumentBuilder()
public GlobalDocumentBuilder(boolean hashing)
public GlobalDocumentBuilder(boolean hashing,
GlobalDocumentBuilder.HashingMode hashingMode)
hashing - true if you want hashing to be applied.hashingMode - the actual mode, eg. BitSampling or MetricSpaces.public GlobalDocumentBuilder(boolean hashing,
GlobalDocumentBuilder.HashingMode hashingMode,
boolean useDocValues)
hashing - true if you want hashing to be applied.hashingMode - the actual mode, eg. BitSampling or MetricSpaces.useDocValues - set to true if you want to use DocValues instead of Lucene fields.public GlobalDocumentBuilder(java.lang.Class<? extends GlobalFeature> globalFeatureClass)
public GlobalDocumentBuilder(java.lang.Class<? extends GlobalFeature> globalFeatureClass, boolean hashing)
public GlobalDocumentBuilder(java.lang.Class<? extends GlobalFeature> globalFeatureClass, boolean hashing, boolean useDocValues)
globalFeatureClass - hashing - set to true if hashing should be performed.useDocValues - set to true if you want to use DocValues instead of Lucene fields.public GlobalDocumentBuilder(ExtractorItem extractorItem)
public void addExtractor(java.lang.Class<? extends GlobalFeature> globalFeatureClass)
globalFeatureClass - public void addExtractor(ExtractorItem extractorItem)
extractorItem - public GlobalFeature extractGlobalFeature(java.awt.image.BufferedImage image, GlobalFeature globalFeature)
DocumentBuilder.MAX_IMAGE_DIMENSION, after that
the feature is extracted using the given globalFeature.image - is the imageglobalFeature - selected global featurepublic org.apache.lucene.document.Field[] createDescriptorFields(java.awt.image.BufferedImage image)
DocumentBuildercreateDescriptorFields 在接口中 DocumentBuilderimage - the image to analyze.public org.apache.lucene.document.Document createDocument(java.awt.image.BufferedImage image,
java.lang.String identifier)
DocumentBuildercreateDocument 在接口中 DocumentBuilderimage - the image to index. Cannot be NULL.identifier - an id for the image, for instance the filename or a URL. Can be NULL.