Skip to content

Using BlinkID recognizers

juraskrlec edited this page Oct 20, 2017 · 26 revisions

BlinkID recognizers include ID, passport, driver's license recognizers as well as generic recognizers such as MRTD recognizer for scanning MRZ. Concrete recognizers are listed at the bottom of this document.

If you completed Obtaining scanning results guide, you learned that in order to use a specific recognizer, you need to specify Recognizer Settings object in the initialization stage, and collect Recognizer Result object in the success callback.

Here we explain the general usage of BlinkID recognizers.

Back to "Getting started" guide.

Initializing BlinkID recognizers

Below is the sample source code which initializes the scanning for MRTD documents.

// To specify we want to perform MRTD (machine readable travel document) recognition, initialize the MRTD recognizer settings
PPMrtdRecognizerSettings *mrtdRecognizerSettings = [[PPMrtdRecognizerSettings alloc] init];

// Add MRTD Recognizer setting to a list of used recognizer settings
[settings.scanSettings addRecognizerSettings:mrtdRecognizerSettings];

Other BlinkID recognizers can be added the same way. Keep in mind that some recognizers have different properties which enable you to customize the scanning process for your specific use case. If you are using a specific recognizer we highly suggest listing through documentation of it's properties.

Retrieving results

Retrieving results is described in Obtaining scanning results section.

Keep in mind that every specific recognizer has it's own result class. For example PPMrtdRecognizerSettings used for initializing MRZ scanning outputs results as PPMrtdRecognizerResult in scanningViewController:didOutputResults: callback method.

Retrieving dewarped images

BlinkID recognizers can retrieve dewarped images of documents. In addition, some recognizer can also include dewarped images of some specific document parts. For example Singapore ID recognizer can also retrieve dewarped image of owners portrait.

To retrieve dewarped images you need to:

  • Enable output of dewarped images in PPMetadataSettings. This is done when creating PPSettings object. dewarpedImage property must be set to YES:
// Initialization of PPSettings. These settings will later be used for creation of PPCoordinator
PPSettings *settings = [[PPSettings alloc] init];

settings.metadataSettings.dewarpedImage = YES;
  • Enable output dewarped images for your recognizer. This step is not needed for all recognizers. Most recognizers have a property to enable outputting of dewarped images. This property must be set to YES. For example, PPSingaporeIDRecognizerSettings has property named displayFullDocumentImage.

  • Retrieve outputted images in scanningViewController:didOutputMetadata: callback method of PPScanningDelegate protocol. Below is sample source code of how this can be achieved:

- (void)scanningViewController:(UIViewController<PPScanningViewController> *)scanningViewController
             didOutputMetadata:(PPMetadata *)metadata {

    // Check whether outputted metadata is image
    if ([metadata isKindOfClass:[PPImageMetadata class]]) {
        PPImageMetadata *imageMetadata = (PPImageMetadata *)metadata;
		
		/**
		 * Check whether outputted image is dewarped image. If only dewarped images are outputted this condition isn't needed.
		 * However, this can be useful if current or succesful frame outputs are also enabled in PPMetadataSettings explained in first step of this section 
		 */
        if (imageMetadata.imageType == PPImageMetadataTypeDewarpedImage) {
            UIImage *image = imageMetadata.image;
			// process the image as you wish
        }		
    }
}

List of available BlinkID recognizers

BlinkID Description
PPPolishIDBackRecognizerSettings Settings class for configuring Polish Back ID Recognizer. Polish Back ID recognizer is used for scanning back side of Polish ID.
PPPolishIDCombinedRecognizerSettings Settings class for configuring Polish ID Combined Recognizer. Polish Combined ID recognizer is used for scanning both front and back side of Polish IDs.
PPPolishIDFrontRecognizerSettings Settings class for configuring Polish Front ID Recognizer. Polish Front ID recognizer is used for scanning front side of Polish ID.
PPMrtdRecognizerSettings Settings class for configuring MRTD Recognizer. MRTD Recognizer recognizer is used for scanning and parsing Machine readable travel documents. Typical MRTDs are passports, visas, ID cards. They can be recognized by two or three lines of monospace text, which contains all personal information. @see https://en.wikipedia.org/wiki/Machine-readable_passport
PPMrtdCombinedRecognizerSettings Settings class for configuring MRTD Combined Recognizer. MRTD Combined recognizer is used for scanning both front and back side of generic IDs.
PPMyKadRecognizerSettings Settings class for configuring MyKad Recognizer. MyKadRecognizer is used for recognizing and extracing data from Malaysian ID documents which is compulsory ID document in Malaysia. Recognizer reads all the contents on the front side of the ID document. @see https://en.wikipedia.org/wiki/Malaysian_identity_card
PPiKadRecognizerSettings Settings class for configuring Malaysian iKad Recognizer. Malaysian iKad recognizer is used for scanning front side of Malaysian iKad.
PPLivenessRecognizerSettings Settings class for configuring Austrian Back ID Recognizer Austrian Back ID recognizer is used for scanning back side of Austrian ID.
PPSerbianIDBackRecognizerSettings Settings class for configuring Serbian Back ID Recognizer. Serbian Back ID recognizer is used for scanning back side of Serbian ID.
PPSerbianIDCombinedRecognizerSettings Settings class for configuring German ID Combined Recognizer. Serbian Combined ID recognizer is used for scanning both front and back side of german IDs.
PPSerbianIDFrontRecognizerSettings Settings class for configuring Serbian Front ID Recognizer. Serbian Front ID recognizer is used for scanning front side of Serbian ID.
PPCroIDBackRecognizerSettings Settings class for configuring Croatian Back ID Recognizer. Croatian Back ID recognizer is used for scanning back side of Croatian ID. It always extracts MRZ zone and address of ID holder while extracting other elements is optional.
PPCroIDCombinedRecognizerSettings Settings class for configuring Croatian ID Combined Recognizer. Croatian Combined ID recognizer is used for scanning both front and back side of croatian IDs.
PPCroIDFrontRecognizerSettings Settings class for configuring Croatian Front ID Recognizer. Croatian Front ID recognizer is used for scanning front side of Croatian ID. It always extracts identity card number, first and last name of ID holder while extracting other elements is optional.
PPAustraliaDLFrontRecognizerSettings Settings class for configuring Asutralian Front DL Recognizer. Australian Front ID recognizer is used for scanning front side of Australian DL. It always extracts identity card number, first and last name of ID holder while extracting other elements is optional.
PPGermanIDBackRecognizerSettings Settings class for configuring German New ID Back side Recognizer. German New ID Back side recognizer is used for scanning back side of new German ID card.
PPGermanPassportRecognizerSettings Settings class for configuring German ID Front Recognizer. German ID Front recognizer is used for scanning front side of German ID.
PPGermanIDCombinedRecognizerSettings Settings class for configuring German ID Combined Recognizer. German Combined ID recognizer is used for scanning both front and back side of german IDs.
PPGermanOldIDRecognizerSettings Settings class for configuring German Old ID Recognizer. German Old ID recognizer is used for scanning front side of German Old ID
PPGermanIDFrontRecognizerSettings Settings class for configuring German ID Front Recognizer. German ID Front recognizer is used for scanning front side of German ID.
PPDocumentFaceRecognizerSettings Settings class for configuring DocumentFace Recognizer. DocumentFace Recognizer recognizers ID documents which contain Face image.
PPSlovakIDBackRecognizerSettings Settings class for configuring Slovakian Back ID Recognizer. Slovakian Back ID recognizer is used for scanning back side of Slovakian ID.
PPSlovakIDCombinedRecognizerSettings Settings class for configuring German ID Combined Recognizer. German Combined ID recognizer is used for scanning both front and back side of german IDs.
PPSlovakIDFrontRecognizerSettings Settings class for configuring Slovakian Front ID Recognizer. Slovakian Front ID recognizer is used for scanning front side of Slovakian ID.
PPSwissIDBackRecognizerSettings Settings class for configuring Swiss Back ID Recognizer. Swiss Back ID recognizer is used for scanning back side of Swiss ID. It always extracts MRZ zone and address of ID holder while extracting other elements is optional.
PPSwissPassportRecognizerSettings Settings class for configuring Swiss Passport Recognizer. Swiss Passport recognizer is used for scanning Swiss Passport.
PPSwissIDFrontRecognizerSettings Settings class for configuring Swiss Front ID Recognizer. Swiss Front ID recognizer is used for scanning front side of Swiss ID.
PPSlovenianIDBackRecognizerSettings Settings class for configuring Slovenian Back ID Recognizer. Slovenian Back ID recognizer is used for scanning back side of Slovenian ID.
PPSlovenianIDCombinedRecognizerSettings Settings class for configuring Slovenian ID Combined Recognizer. German Combined ID recognizer is used for scanning both front and back side of german IDs.
PPSlovenianIDFrontRecognizerSettings Settings class for configuring Slovenian Front ID Recognizer. Slovenian Front ID recognizer is used for scanning front side of Slovenian ID.
PPSingaporeIDBackRecognizerSettings Settings class for configuring Singapore ID Recognizer. Singapore ID recognizer is used for scanning Singapore ID. This recognizer can scan both front and back side of the ID but the results of scanning will be different as some fields are not present on both sides
PPSingaporeIDCombinedRecognizerSettings Settings class for configuring German ID Combined Recognizer. German Combined ID recognizer is used for scanning both front and back side of german IDs.
PPSingaporeIDFrontRecognizerSettings Settings class for configuring Singapore ID front side Recognizer. Singapore ID recognizer is used for scanning front side of Singapore ID.
PPRomanianIDFrontRecognizerSettings Settings class for configuring Romanian Front ID Recognizer Romanian Front ID recognizer is used for scanning front side of Czech ID.
PPEudlRecognizerSettings Settings class for configuring EUDL Recognizer. EUDL Recognizer is used for scanning and parsing the front side of EU Driving licenses: @see https://en.wikipedia.org/wiki/Driving_licence_in_the_United_Kingdom
PPAusIDBackRecognizerSettings Settings class for configuring Austrian Back ID Recognizer. Austrian Back ID recognizer is used for scanning back side of Austrian ID.
PPAusPassportRecognizerSettings Settings class for configuring Austrian Passport Recognizer. Austrian Passport recognizer is used for scanning Austrian Passport.
PPAusIDCombinedRecognizerSettings Settings class for configuring Austrian ID Combined Recognizer. Austrian Combined ID recognizer is used for scanning both front and back side of Austrian IDs.
PPAusIDFrontRecognizerSettings Settings class for configuring Austrian Front ID Recognizer. Austrian Front ID recognizer is used for scanning front side of Austrian ID.
PPCzIDBackRecognizerSettings Settings class for configuring Czech Back ID Recognizer. Czech Back ID recognizer is used for scanning back side of Czech ID.
PPCzIDCombinedRecognizerSettings Settings class for configuring German ID Combined Recognizer. Czech Combined ID recognizer is used for scanning both front and back side of german IDs.
PPCzIDFrontRecognizerSettings Settings class for configuring Czech Front ID Recognizer Czech Front ID recognizer is used for scanning front side of Czech ID.
Clone this wiki locally