Package com.microblink.blinkid.entities.recognizers.blinkid.mrtd

# Class MrtdRecognizer

java.lang.Object
com.microblink.blinkid.entities.Entity<T>
com.microblink.blinkid.entities.recognizers.Recognizer<R>
com.microblink.blinkid.entities.recognizers.templating.TemplatingRecognizer<MrtdRecognizer.Result>
com.microblink.blinkid.entities.recognizers.blinkid.mrtd.MrtdRecognizer

All Implemented Interfaces:
  `android.os.Parcelable`, `FullDocumentImageDpiOptions`, `EncodeFullDocumentImagesOptions`, `FullDocumentImageExtensionOptions`, `FullDocumentImageOptions`, `GlareDetectorOptions`, `JsonizableEntity`

@Deprecated public final class MrtdRecognizer extends TemplatingRecognizer<MrtdRecognizer.Result> implements GlareDetectorOptions, FullDocumentImageOptions, FullDocumentImageDpiOptions, FullDocumentImageExtensionOptions, EncodeFullDocumentImagesOptions
Deprecated.
Recognizer that can recognize Machine Readable Zone (MRZ) of the Machine Readable Travel Document (MRTD)

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `MrtdRecognizer.Result`
  Deprecated.

  ## Nested classes/interfaces inherited from interface android.os.Parcelable

  `android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final android.os.Parcelable.Creator<MrtdRecognizer>`
  `CREATOR`
  Deprecated.

  ### Fields inherited from class com.microblink.blinkid.entities.recognizers.templating.TemplatingRecognizer

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.imageoptions.encode.EncodeFullDocumentImagesOptions

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.recognizers.blinkid.imageoptions.FullDocumentImageOptions

  `CLASS_NAME`

  ### Fields inherited from interface com.microblink.blinkid.entities.settings.GlareDetectorOptions

  `CLASS_NAME`

  ### Fields inherited from interface android.os.Parcelable

  `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MrtdRecognizer()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MrtdRecognizer`
  `clone()`
  Deprecated.
  Create a copy of the entity.
  `void`
  `consumeResultFrom(Entity other)`
  Deprecated.
  Consume result from other entity.
  `protected void`
  `deserializeNativeSettings(byte[] serializedSettings)`
  Deprecated.
  `int`
  `getFullDocumentImageDpi()`
  Deprecated.
  Returns the DPI (Dots Per Inch) for full document image that should be returned.
  `ImageExtensionFactors`
  `getFullDocumentImageExtensionFactors()`
  Deprecated.
  Returns the extension factors for full document image.
  `MrtdSpecification[]`
  `getSpecifications()`
  Deprecated.
  Returns the array of `MrtdSpecification` objects that will define which MRTD documents should be detectable.
  `boolean`
  `isAllowSpecialCharacters()`
  Deprecated.
  Whether special characters are allowed.
  `boolean`
  `isAllowUnparsedResults()`
  Deprecated.
  Whether returning of unparsed results is allowed.
  `boolean`
  `isAllowUnverifiedResults()`
  Deprecated.
  Whether returning of unverified results is allowed.
  `protected void`
  `readFromParcel(android.os.Parcel in)`
  Deprecated.
  `protected byte[]`
  `serializeNativeSettings()`
  Deprecated.
  `void`
  `setAllowSpecialCharacters(boolean allowSpecialCharacters)`
  Deprecated.
  Whether special characters are allowed.
  `void`
  `setAllowUnparsedResults(boolean allowUnparsedResults)`
  Deprecated.
  Whether returning of unparsed results is allowed.
  `void`
  `setAllowUnverifiedResults(boolean allowUnverifiedResults)`
  Deprecated.
  Whether returning of unverified results is allowed.
  `void`
  `setDetectGlare(boolean detectGlare)`
  Deprecated.
  Defines whether glare detector will be used during recognition process.
  `void`
  `setEncodeFullDocumentImage(boolean encodeFullDocumentImage)`
  Deprecated.
  Sets whether full document image should be encoded in JPEG format and written into the corresponding recognition result.
  `void`
  `setFullDocumentImageDpi(int desiredDPI)`
  Deprecated.
  Sets desired DPI (Dots Per Inch) for full document image that should be returned.
  `void`
  `setFullDocumentImageExtensionFactors(ImageExtensionFactors fullDocumentImageExtensionFactors)`
  Deprecated.
  Sets extension factors for full document image.
  `void`
  `setMRZFilter(MrzFilter mrzFilter)`
  Deprecated.
  Sets the `MrzFilter` that can determine whether document should be processed or filtered out.
  `protected void`
  `setNativeTemplatingClasses(long[] nativeTemplatingClasses)`
  Deprecated.
  `void`
  `setReturnFullDocumentImage(boolean returnFullDocumentImage)`
  Deprecated.
  Sets whether full document image should be available in `FullDocumentImageResult`.
  `void`
  `setSpecifications(MrtdSpecification... specifications)`
  Deprecated.
  Sets one or more `MrtdSpecification` objects that will define which MRTD documents should be detectable.
  `boolean`
  `shouldDetectGlare()`
  Deprecated.
  Returns whether glare detector is enabled.
  `boolean`
  `shouldEncodeFullDocumentImage()`
  Deprecated.
  Returns whether encoding of full document images and writing them into the recognition result is enabled.
  `boolean`
  `shouldReturnFullDocumentImage()`
  Deprecated.
  Returns whether full document image will be available in `FullDocumentImageResult`.
  `protected void`
  `terminateNative(long nativeContext)`
  Deprecated.
  `void`
  `writeToParcel(android.os.Parcel dest, int flags)`
  Deprecated.

  ### Methods inherited from class com.microblink.blinkid.entities.recognizers.templating.TemplatingRecognizer

  `setTemplatingClasses`

  ### Methods inherited from class com.microblink.blinkid.entities.recognizers.Recognizer

  `getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJson`

  ### Methods inherited from class com.microblink.blinkid.entities.Entity

  `describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### CREATOR

    public static final android.os.Parcelable.Creator<MrtdRecognizer> CREATOR
    Deprecated.

- ## Constructor Details

  - ### MrtdRecognizer

    public MrtdRecognizer()
    Deprecated.

- ## Method Details

  - ### setAllowSpecialCharacters

    public void setAllowSpecialCharacters(boolean allowSpecialCharacters)
    Deprecated.
    Whether special characters are allowed. By default, this is set to 'false'.

  - ### isAllowSpecialCharacters

    public boolean isAllowSpecialCharacters()
    Deprecated.
    Whether special characters are allowed. By default, this is set to 'false'.

  - ### setDetectGlare

    public void setDetectGlare(boolean detectGlare)
    Deprecated.
    Description copied from interface: `GlareDetectorOptions`
    Defines whether glare detector will be used during recognition process. By default this option is set to `true` and glare detector is used. If the glare detector is used and `GlareCallback` is set to `MetadataCallbacks`, it will receive glare status will. Also when glare is detected OCR will not be performed on the affected document position to prevent errors in the extracted data. By default, this is set to 'true'.
    Specified by:
      `setDetectGlare` in interface `GlareDetectorOptions`
    Parameters:
      `detectGlare` - whether glare detector will be used during recognition process.

  - ### shouldDetectGlare

    public boolean shouldDetectGlare()
    Deprecated.
    Description copied from interface: `GlareDetectorOptions`
    Returns whether glare detector is enabled. By default, this is set to 'true'.
    Specified by:
      `shouldDetectGlare` in interface `GlareDetectorOptions`
    Returns:
      it the glare detector is enabled returns `true`, otherwise returns `false`.

  - ### setAllowUnverifiedResults

    public void setAllowUnverifiedResults(boolean allowUnverifiedResults)
    Deprecated.
    Whether returning of unverified results is allowed. Unverified result is result that is parsed, but check digits are incorrect. By default, this is set to 'false'.

  - ### isAllowUnverifiedResults

    public boolean isAllowUnverifiedResults()
    Deprecated.
    Whether returning of unverified results is allowed. Unverified result is result that is parsed, but check digits are incorrect. By default, this is set to 'false'.

  - ### setReturnFullDocumentImage

    public void setReturnFullDocumentImage(boolean returnFullDocumentImage)
    Deprecated.
    Description copied from interface: `FullDocumentImageOptions`
    Sets whether full document image should be available in `FullDocumentImageResult`. If enabled, get image using `FullDocumentImageResult.getFullDocumentImage()` By default, this is set to 'false'. IMPORTANT NOTE: If you set `MicroblinkSDK.setIntentDataTransferMode(com.microblink.blinkid.intent.IntentDataTransferMode)` to `IntentDataTransferMode.STANDARD` recognizer which contains encoded image cannot be parcelized and passed by `Intent` extras because of Android limitations on intent extras size. If you are using one of the provided scan activities and expect receiving scan results in `Activity.onActivityResult(int, int, android.content.Intent)` method use either `IntentDataTransferMode.OPTIMISED` or `IntentDataTransferMode.PERSISTED_OPTIMISED` By default, this is set to 'false'
    Specified by:
      `setReturnFullDocumentImage` in interface `FullDocumentImageOptions`
    Parameters:
      `returnFullDocumentImage` - whether full document image will be available in `FullDocumentImageResult`.

  - ### shouldReturnFullDocumentImage

    public boolean shouldReturnFullDocumentImage()
    Deprecated.
    Description copied from interface: `FullDocumentImageOptions`
    Returns whether full document image will be available in `FullDocumentImageResult`. By default, this is set to 'false'. By default, this is set to 'false'
    Specified by:
      `shouldReturnFullDocumentImage` in interface `FullDocumentImageOptions`
    Returns:
      whether full document image will be available in `FullDocumentImageResult`.

  - ### setEncodeFullDocumentImage

    public void setEncodeFullDocumentImage(boolean encodeFullDocumentImage)
    Deprecated.
    Description copied from interface: `EncodeFullDocumentImagesOptions`
    Sets whether full document image should be encoded in JPEG format and written into the corresponding recognition result. By default, this is set to 'false'.
    IMPORTANT NOTE: If you set `MicroblinkSDK.setIntentDataTransferMode(com.microblink.blinkid.intent.IntentDataTransferMode)` to `IntentDataTransferMode.STANDARD` recognizer which contains encoded image cannot be parcelized and passed by `Intent` extras because of Android limitations on intent extras size. If you are using one of the provided scan activities and expect receiving scan results in `Activity.onActivityResult(int, int, Intent)` method use either `IntentDataTransferMode.OPTIMISED` or `IntentDataTransferMode.PERSISTED_OPTIMISED`
    Specified by:
      `setEncodeFullDocumentImage` in interface `EncodeFullDocumentImagesOptions`
    Parameters:
      `encodeFullDocumentImage` - whether full document images should be encoded in JPEG format and written into the corresponding recognition result.

  - ### shouldEncodeFullDocumentImage

    public boolean shouldEncodeFullDocumentImage()
    Deprecated.
    Description copied from interface: `EncodeFullDocumentImagesOptions`
    Returns whether encoding of full document images and writing them into the recognition result is enabled. By default, this is set to 'false'.
    Specified by:
      `shouldEncodeFullDocumentImage` in interface `EncodeFullDocumentImagesOptions`
    Returns:
      whether encoding of full document images and writing them into the recognition result is enabled.

  - ### setAllowUnparsedResults

    public void setAllowUnparsedResults(boolean allowUnparsedResults)
    Deprecated.
    Whether returning of unparsed results is allowed. By default, this is set to 'false'.

  - ### isAllowUnparsedResults

    public boolean isAllowUnparsedResults()
    Deprecated.
    Whether returning of unparsed results is allowed. By default, this is set to 'false'.

  - ### getFullDocumentImageDpi

    public int getFullDocumentImageDpi()
    Deprecated.
    Returns the DPI (Dots Per Inch) for full document image that should be returned. By default, this is set to '250'.
    Specified by:
      `getFullDocumentImageDpi` in interface `FullDocumentImageDpiOptions`
    Returns:
      DPI for full document image that should be returned.

  - ### setFullDocumentImageDpi

    public void setFullDocumentImageDpi(@IntRange(from=100L,to=400L) int desiredDPI)
    Deprecated.
    Sets desired DPI (Dots Per Inch) for full document image that should be returned. By default, this is set to '250'.
    Specified by:
      `setFullDocumentImageDpi` in interface `FullDocumentImageDpiOptions`
    Parameters:
      `desiredDPI` - desired DPI in range [100, 400]

  - ### setFullDocumentImageExtensionFactors

    public void setFullDocumentImageExtensionFactors(@NonNull ImageExtensionFactors fullDocumentImageExtensionFactors)
    Deprecated.
    Sets extension factors for full document image. By default, this is set to '[0.0, 0.0, 0.0, 0.0]'.
    Specified by:
      `setFullDocumentImageExtensionFactors` in interface `FullDocumentImageExtensionOptions`
    Parameters:
      `fullDocumentImageExtensionFactors` - extension factors for full document image.

  - ### getFullDocumentImageExtensionFactors

    @NonNull public ImageExtensionFactors getFullDocumentImageExtensionFactors()
    Deprecated.
    Returns the extension factors for full document image. By default, this is set to '[0.0, 0.0, 0.0, 0.0]'.
    Specified by:
      `getFullDocumentImageExtensionFactors` in interface `FullDocumentImageExtensionOptions`
    Returns:
      extension factors for full document image.

  - ### setNativeTemplatingClasses

    protected void setNativeTemplatingClasses(@Nullable long[] nativeTemplatingClasses)
    Deprecated.
    Specified by:
      `setNativeTemplatingClasses` in class `TemplatingRecognizer<MrtdRecognizer.Result>`

  - ### setSpecifications

    public void setSpecifications(@Nullable @Size(min=1L) MrtdSpecification... specifications)
    Deprecated.
    Sets one or more `MrtdSpecification` objects 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

    @NonNull public MrtdSpecification[] getSpecifications()
    Deprecated.
    Returns the array of `MrtdSpecification` objects that will define which MRTD documents should be detectable. By default, this is set to '[]'.
    Returns:
      the array of `MrtdSpecification` objects that will define which MRTD documents should be detectable.

  - ### setMRZFilter

    public void setMRZFilter(@Nullable MrzFilter mrzFilter)
    Deprecated.
    Sets the `MrzFilter` that can determine whether document should be processed or filtered out.
    Parameters:
      `mrzFilter` - `MrzFilter` that can determine whether document should be processed or filtered out or null to allow processing of all documents.

  - ### writeToParcel

    public void writeToParcel(@NonNull android.os.Parcel dest, int flags)
    Deprecated.
    Specified by:
      `writeToParcel` in interface `android.os.Parcelable`
    Overrides:
      `writeToParcel` in class `TemplatingRecognizer<MrtdRecognizer.Result>`

  - ### readFromParcel

    protected void readFromParcel(@NonNull android.os.Parcel in)
    Deprecated.
    Overrides:
      `readFromParcel` in class `TemplatingRecognizer<MrtdRecognizer.Result>`

  - ### terminateNative

    protected void terminateNative(long nativeContext)
    Deprecated.
    Specified by:
      `terminateNative` in class `Entity<MrtdRecognizer.Result>`

  - ### serializeNativeSettings

    @Nullable protected byte[] serializeNativeSettings()
    Deprecated.
    Specified by:
      `serializeNativeSettings` in class `Entity<MrtdRecognizer.Result>`

  - ### deserializeNativeSettings

    protected void deserializeNativeSettings(@NonNull byte[] serializedSettings)
    Deprecated.
    Specified by:
      `deserializeNativeSettings` in class `Entity<MrtdRecognizer.Result>`

  - ### clone

    public MrtdRecognizer clone()
    Deprecated.
    Description copied from class: `Entity`
    Create 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 the `RecognizerRunnerView` or `RecognizerRunner` with the updated entity hierarchy.
    Specified by:
      `clone` in class `Recognizer<MrtdRecognizer.Result>`
    Returns:
      a copy of the entity

  - ### consumeResultFrom

    public void consumeResultFrom(@NonNull Entity other)
    Deprecated.
    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`
    Overrides:
      `consumeResultFrom` in class `TemplatingRecognizer<MrtdRecognizer.Result>`
    Parameters:
      `other` - Entity from which result should be consumed.