API for machine readable zone scanning.

Required licence feature(s): MrzScanner.

Methods

  • Clears the accumulated results. Should be called after a document has been recognized to the customers satisfaction to prevent a poisoned cache.

    Returns Promise<void>

  • Frees up any resources associated with this object. No other methods may be called on this object after destroy has been called.

    Returns Promise<void>

  • Recognize the MRZ in the given image.

    Parameters

    • image: Image

      The image to recognize.

    • Optional consumeImage: Config.ConsumeType

      Controls if the image can still be used after calling this method, or if it will be consumed by the method. See ConsumeType for more details.

    Returns Promise<MrzScannerRunResponse>

    The recognition result.

  • Parameters

    • workerBridge: WorkerBridge
    • Optional configuration: {
          enableDetection?: boolean;
          frameAccumulationConfiguration?: { maximumNumberOfAccumulatedFrames?: number; minimumNumberOfRequiredFramesWithEqualScanningResult?: number; };
          incompleteResultHandling?: MrzIncompleteResultHandling;
          returnCrops?: boolean;
      }
      • Optional enableDetection?: boolean

        Enable MRZ detection. If disabled, the scanner skips the detection step and assumes that the input image is a crop of the MRZ area.

        Default Value

        true;
        
      • Optional frameAccumulationConfiguration?: { maximumNumberOfAccumulatedFrames?: number; minimumNumberOfRequiredFramesWithEqualScanningResult?: number; }

        Configure the frame accumulation process.

        Default Value

        new AccumulatedResultsVerifierConfiguration({});
        
      • Optional incompleteResultHandling?: MrzIncompleteResultHandling

        Defines how to handle incomplete MRZ results (e.g. caused by failed validation).

        Default Value

        "REJECT";
        
      • Optional returnCrops?: boolean

        If true, crops of the detected MRZ and its fields will be returned in the result.

        Default Value

        false;
        

    Returns Promise<MrzScanner>

Generated using TypeDoc