Class MRTDDetector
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<MRTDDetector.Result>
com.microblink.blinkinput.entities.detectors.quad.mrtd.MRTDDetector
- All Implemented Interfaces:
android.os.Parcelable
Detector that can perform detection of Machine Readable Travel Documents (MRTD).
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Create a copy of the entity.voidconsumeResultFrom(Entity other) Consume result from other entity.protected voiddeserializeNativeSettings(byte[] serializedSettings) Returns the array ofMrtdSpecificationobjects that will define which MRTD documents should be detectable.booleanDefines whether full document will be detected.booleanEnable detection correction with card detector.protected byte[]voidsetDetectFullDocument(boolean detectFullDocument) Defines whether full document will be detected.voidsetSpecifications(MrtdSpecification... specifications) Sets one or moreMrtdSpecificationobjects that will define which MRTD documents should be detectable.voidsetUseCardDetector(boolean useCardDetector) Enable detection correction with card detector.protected voidterminateNative(long nativeContext) Methods inherited from class com.microblink.blinkinput.entities.Entity
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
-
Field Details
-
CREATOR
-
-
Constructor Details
-
MRTDDetector
public MRTDDetector()
-
-
Method Details
-
setDetectFullDocument
public void setDetectFullDocument(boolean detectFullDocument) Defines whether full document will be detected. If set to false, result will contain location of Machine Readable Zone only. If set to true, result will contain location of entire document. By default, this is set to 'true' -
isDetectFullDocument
public boolean isDetectFullDocument()Defines whether full document will be detected. If set to false, result will contain location of Machine Readable Zone only. If set to true, result will contain location of entire document. By default, this is set to 'true' -
setUseCardDetector
public void setUseCardDetector(boolean useCardDetector) Enable detection correction with card detector. When this option is enabled, after MRTD detector has found the document, it will internally useDocumentDetectorto additionally correct document location estimated from detected MRZ location. Note that although enabling this option will usually improve detection accuracy, it may be possible that for some use cases accuracy will be lower. By default, this is set to 'false' -
isUseCardDetector
public boolean isUseCardDetector()Enable detection correction with card detector. When this option is enabled, after MRTD detector has found the document, it will internally useDocumentDetectorto additionally correct document location estimated from detected MRZ location. Note that although enabling this option will usually improve detection accuracy, it may be possible that for some use cases accuracy will be lower. By default, this is set to 'false' -
setSpecifications
Sets one or moreMrtdSpecificationobjects that will define which MRTD documents should be detectable. Setting null or empty array will enable all possible specifications.- Parameters:
specifications- specifications for MRTD documents that should be detectable
-
getSpecifications
Returns the array ofMrtdSpecificationobjects that will define which MRTD documents should be detectable.- Returns:
- the array of
MrtdSpecificationobjects that will define which MRTD documents should be detectable.
-
terminateNative
protected void terminateNative(long nativeContext) - Specified by:
terminateNativein classEntity<MRTDDetector.Result>
-
serializeNativeSettings
@Nullable protected byte[] serializeNativeSettings()- Specified by:
serializeNativeSettingsin classEntity<MRTDDetector.Result>
-
deserializeNativeSettings
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings) - Specified by:
deserializeNativeSettingsin classEntity<MRTDDetector.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<MRTDDetector.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<MRTDDetector.Result>- Parameters:
other- Entity from which result should be consumed.
-