Skip to main content

Scanning a machine-readable zone from an image

MRZ Scanner also has the ability to perform detection on a static image. It quickly analysis the image and identify any MRZ present within it. Once the detection is done, the scanner returns the result of type SBSDKMachineReadableZoneRecognizerResult.

Example for detecting MRZ on the Image

import Foundation
import ScanbotSDK

func detectMRZOnImage() {

// Image containing MRZ.
guard let image = UIImage(named: "mrzImage") else { return }

// Creates an instance of `SBSDKMachineReadableZoneRecognizer`.
let detector = SBSDKMachineReadableZoneRecognizer()

// Returns the result after running detector on the image.
let result = detector.recognizePersonalIdentity(from: image)

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?