Class TemplatingRecognizer<R extends TemplatingRecognizer.Result>
java.lang.Object
com.microblink.blinkid.entities.Entity<T>
com.microblink.blinkid.entities.recognizers.Recognizer<R>
com.microblink.blinkid.entities.recognizers.templating.TemplatingRecognizer<R>
- All Implemented Interfaces:
android.os.Parcelable
,GlareDetectorOptions
,JsonizableEntity
- Direct Known Subclasses:
MrtdRecognizer
public abstract class TemplatingRecognizer<R extends TemplatingRecognizer.Result>
extends Recognizer<R>
implements GlareDetectorOptions
Base of all recognizers that support Templating API.
-
Nested Class Summary
-
Field Summary
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ModifierConstructorDescriptionprotected
TemplatingRecognizer
(long nativeRecognizer, R concreteResult) protected
TemplatingRecognizer
(long nativeRecognizer, R concreteResult, android.os.Parcel in) -
Method Summary
Modifier and TypeMethodDescriptionvoid
consumeResultFrom
(Entity other) Consume result from other entity.protected void
readFromParcel
(android.os.Parcel in) protected abstract void
setNativeTemplatingClasses
(long[] nativeTemplatingClasses) final void
setTemplatingClasses
(TemplatingClass... classes) Sets zero or moreTemplatingClass
that will try to be matched against document that is being recognized.void
writeToParcel
(android.os.Parcel dest, int flags) Methods inherited from class com.microblink.blinkid.entities.recognizers.Recognizer
clone, getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJson
Methods inherited from class com.microblink.blinkid.entities.Entity
describeContents, deserializeNativeSettings, finalize, getNativeContext, getResult, nativeGetNativeResultContext, serializeNativeSettings, terminateNative
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.microblink.blinkid.entities.settings.GlareDetectorOptions
setDetectGlare, shouldDetectGlare
-
Field Details
-
CLASS_NAME
- See Also:
-
-
Constructor Details
-
TemplatingRecognizer
-
TemplatingRecognizer
protected TemplatingRecognizer(long nativeRecognizer, @NonNull R concreteResult, @NonNull android.os.Parcel in)
-
-
Method Details
-
setTemplatingClasses
Sets zero or moreTemplatingClass
that will try to be matched against document that is being recognized.- Parameters:
classes
- Zero or moreTemplatingClass
objects representing specific class of documents.
-
setNativeTemplatingClasses
protected abstract void setNativeTemplatingClasses(@Nullable long[] nativeTemplatingClasses) -
consumeResultFrom
Description copied from class:Entity
Consume 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:
consumeResultFrom
in classEntity<R extends TemplatingRecognizer.Result>
- Parameters:
other
- Entity from which result should be consumed.
-
writeToParcel
public void writeToParcel(@NonNull android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Overrides:
writeToParcel
in classEntity<R extends TemplatingRecognizer.Result>
-
readFromParcel
protected void readFromParcel(@NonNull android.os.Parcel in) - Overrides:
readFromParcel
in classEntity<R extends TemplatingRecognizer.Result>
-