-
Notifications
You must be signed in to change notification settings - Fork 90
Using BlinkID recognizers
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.
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 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.
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 creatingPPSettings
object.dewarpedImage
property must be set toYES
:
// 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 nameddisplayFullDocumentImage
. -
Retrieve outputted images in
scanningViewController:didOutputMetadata:
callback method ofPPScanningDelegate
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
}
}
}
BlinkID | Description | Documentation |
---|---|---|
PPAusIDBackRecognizerSettings |
Settings class for configuring Austrian Back ID Recognizer Austrian Back ID recognizer is used for scanning back side of Austrian ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPAusIDBackRecognizerSettings.html |
PPAusIDFrontRecognizerSettings |
Settings class for configuring Austrian Front ID Recognizer Austrian Front ID recognizer is used for scanning front side of Austrian ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPAusIDFrontRecognizerSettings.html |
PPCroIDBackRecognizerSettings |
Settings class for configuring CroIDBack Recognizer CroIDBack 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. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPCroIDBackRecognizerSettings.html |
PPCroIDFrontRecognizerSettings |
Settings class for configuring CroIDFront Recognizer CroIDFront 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. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPCroIDFrontRecognizerSettings.html |
PPCzIDBackRecognizerSettings |
Settings class for configuring Czech Back ID Recognizer Czech Back ID recognizer is used for scanning back side of Czech ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPCzIDBackRecognizerSettings.html |
PPCzIDFrontRecognizerSettings |
Settings class for configuring Czech Front ID Recognizer Czech Front ID recognizer is used for scanning front side of Czech ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPCzIDFrontRecognizerSettings.html |
PPEudlRecognizerSettings |
Settings class for configuring EUDL Recognizer EUDL Recognizer 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 | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPEudlRecognizerSettings.html |
PPGermanIdFrontRecognizerSettings |
Settings class for configuring German ID Front Recognizer CroIDFront recognizer is used for scanning front side of German ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPGermanIdFrontRecognizerSettings.html |
PPGermanIdMrzRecognizerSettings |
Settings class for configuring German ID MRZ Recognizer GermanIdMrz recognizer is used for scanning back side of German ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPGermanIdMrzRecognizerSettings.html |
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 | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPMyKadRecognizerSettings.html |
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 | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPMrtdRecognizerSettings.html |
PPSingaporeIDRecognizerSettings |
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 | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPSingaporeIDRecognizerSettings.html |
PPSlovakIdBackRecognizerSettings |
Settings class for configuring Slovakian Back ID Recognizer Slovakian Back ID recognizer is used for scanning back side of Slovakian ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPSlovakIdBackRecognizerSettings.html |
PPSlovakIdFrontRecognizerSettings |
Settings class for configuring Slovakian Front ID Recognizer Slovakian Front ID recognizer is used for scanning front side of Slovakian ID. | http://cocoadocs.org/docsets/PPBlinkID/2.3.0/Classes/PPSlovakIdFrontRecognizerSettings.html |
- Getting Started with BlinkID SDK
- Obtaining scanning results
- Using Direct Processing API
- Customizing Camera UI
- Creating customized framework
- Upgrading from older versions
- Troubleshoot