Class DocumentDetector
java.lang.Object
com.microblink.blinkinput.entities.Entity<R>
com.microblink.blinkinput.entities.detectors.Detector<R>
com.microblink.blinkinput.entities.detectors.quad.QuadDetector<R>
com.microblink.blinkinput.entities.detectors.quad.QuadWithSizeDetector<DocumentDetector.Result>
com.microblink.blinkinput.entities.detectors.quad.document.DocumentDetector
- All Implemented Interfaces:
android.os.Parcelable
Detector that can perform detection of card documents, cheques, papers, etc.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.microblink.blinkinput.entities.detectors.quad.QuadWithSizeDetector
CLASS_NAMEFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionDocumentDetector(DocumentSpecification... specifications) Constructs detector that can perform detection of card documents, cheques, papers, etc. -
Method Summary
Modifier and TypeMethodDescriptionclone()Create a copy of the entity.voidconsumeResultFrom(Entity other) Consume result from other entity.protected voiddeserializeNativeSettings(byte[] serializedSettings) intRetrieves the minimum number of stable detections required for detection to be successfulprotected byte[]voidsetNumStableDetectionsThreshold(int numStableDetectionsThreshold) Sets minimum number of stable detections required for detection to be successfulprotected voidterminateNative(long nativeContext) Methods inherited from class com.microblink.blinkinput.entities.Entity
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
-
Field Details
-
CREATOR
-
-
Constructor Details
-
DocumentDetector
Constructs detector that can perform detection of card documents, cheques, papers, etc.- Parameters:
specifications- Non-empty of non-null specifications describing possible documents that should be detected.
-
-
Method Details
-
setNumStableDetectionsThreshold
public void setNumStableDetectionsThreshold(@IntRange(from=1L,to=255L) int numStableDetectionsThreshold) Sets minimum number of stable detections required for detection to be successful- Parameters:
numStableDetectionsThreshold- minimum number of stable detections required for detection to be successful
-
getNumStableDetectionsThreshold
public int getNumStableDetectionsThreshold()Retrieves the minimum number of stable detections required for detection to be successful- Returns:
- the minimum number of stable detections required for detection to be successful
-
getDocumentSpecifications
-
terminateNative
protected void terminateNative(long nativeContext) - Specified by:
terminateNativein classEntity<DocumentDetector.Result>
-
serializeNativeSettings
@Nullable protected byte[] serializeNativeSettings()- Specified by:
serializeNativeSettingsin classEntity<DocumentDetector.Result>
-
deserializeNativeSettings
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings) - Specified by:
deserializeNativeSettingsin classEntity<DocumentDetector.Result>
-
clone
Description copied from class:EntityCreate a copy of the entity. This is required if properties of the entity must be modified while background thread performs processing. In order to avoid race conditions, changing properties is not allowed while entity is used in background processing. However, you are able to make a copy of the entity, change properties of it and then update theRecognizerRunnerVieworRecognizerRunnerwith the updated entity hierarchy.- Specified by:
clonein classEntity<DocumentDetector.Result>- Returns:
- a copy of the entity
-
consumeResultFrom
Description copied from class:EntityConsume result from other entity. The result from other will be put instead current result of this entity. This method is used insideBaseIntentTransferable.loadFromIntent(Intent)and similar methods to replace the result content of the saved entities with results that have arrived overIntent- Specified by:
consumeResultFromin classEntity<DocumentDetector.Result>- Parameters:
other- Entity from which result should be consumed.
-