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.
  • Field Details

  • Constructor Details

    • TemplatingRecognizer

      protected TemplatingRecognizer(long nativeRecognizer, @NonNull R concreteResult)
    • TemplatingRecognizer

      protected TemplatingRecognizer(long nativeRecognizer, @NonNull R concreteResult, @NonNull android.os.Parcel in)
  • Method Details

    • setTemplatingClasses

      public final void setTemplatingClasses(@Nullable TemplatingClass... classes)
      Sets zero or more TemplatingClass that will try to be matched against document that is being recognized.
      Parameters:
      classes - Zero or more TemplatingClass objects representing specific class of documents.
    • setNativeTemplatingClasses

      protected abstract void setNativeTemplatingClasses(@Nullable long[] nativeTemplatingClasses)
    • consumeResultFrom

      @CallSuper public void consumeResultFrom(@NonNull Entity other)
      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 inside BaseIntentTransferable.loadFromIntent(Intent) and similar methods to replace the result content of the saved entities with results that have arrived over Intent
      Specified by:
      consumeResultFrom in class Entity<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 interface android.os.Parcelable
      Overrides:
      writeToParcel in class Entity<R extends TemplatingRecognizer.Result>
    • readFromParcel

      protected void readFromParcel(@NonNull android.os.Parcel in)
      Overrides:
      readFromParcel in class Entity<R extends TemplatingRecognizer.Result>