MRZ Reader SDK Android

This is a Fully Functional Sample app. Just Load it With Android Studio, Build and Install it and Follow the On-screen Instructions

Setup

MrzScanner requires to be initialized before use:

MrzScanner mrzScanner = MrzScanner();
mrzScanner.init(context); // late init so mrzScanner can be final

Then, as soon as information about the camera frame is available, the region of interest needs to be set:

mrzScanner.setRegionOfInterest(
		frameWidth, // native width of unrotated camera frame
		frameHeight, // native height of unrotated camera frame
		frameOrientation, // rotation in degrees of camera frame
		previewRect, // rectangle of camera preview in view coordinates
		roiRect // region of interest in view coordinates
);

Scanning the MRZ

To recognize an MRZ in a camera frame do:

String mrz = mrzScanner.find(
		framePixels, // camera pixels in YUV format
		frameWidth, // native width of unrotated camera frame
		frameHeight, // native height of unrotated camera frame
		frameOrientation, // rotation in degrees of camera frame
		canvas // null or a canvas over the camera preview to draw into
);

Parsing the MRZ String

To parse the MRZ and get a MrzInfo object with all the parts of an MRZ, you can use MrzParser from the included mrzparser-java library like this:

MrzInfo mrzInfo = MrzParser.parse(mrz);

Check the sample app to see this in action.

Get more information about
secure identity verification

Contact

    First Name *

    Last Name *

    Company *

    Position

    E-Mail *

    Phone *

    Message *

    *

    I agree that my data from the contact form will be collected and processed to answer my request. You can find more information in our privacy policy.

    Contact
    Close