Narendra Kumar R
Narendra Kumar R

Reputation: 79

MicroBlink SDK's USDL combined recognizer documentDataMatch returns always true

Here the code for used in app,

    //setup recognizer
let usdlRecognizer = MBUsdlCombinedRecognizer()
usdlRecognizer.returnFullDocumentImage = true
usdlRecognizer.scanUncertain = false

// delegate
func documentVerificationOverlayViewControllerDidFinishScanning(_ documentVerificationOverlayViewController: MBDocumentVerificationOverlayViewController, state: MBRecognizerResultState) {

        if state == MBRecognizerResultState.valid {
            // first, pause scanning until we process all the results
            documentVerificationOverlayViewController.recognizerRunnerViewController?.pauseScanning()

            DispatchQueue.main.async(execute: {() -> Void in
                documentVerificationOverlayViewController.dismiss(animated: false, completion: {

                })

                self.parseResult(recognizer: self.recognizer)
                if let recognizer = self.recognizer as? MBUsdlCombinedRecognizer, recognizer.result.documentDataMatch == true {
                 // *********** Its always coming here even with mismatched cards ****************
                   print("both sides of cards matched.. success")
                } else {
                        showAlert(title: "Error", message: "Data not matched", vc: self, okAction: {

                        })
                }
            })
        }
    }

Its always going to success block of the if statement even we scan with different person's US driving license.

Upvotes: 1

Views: 245

Answers (1)

culoi
culoi

Reputation: 41

That's because the MBUSDLCombinedRecognizer scans only the face and document image on the front. It doesn't read the fields, all other fields are read from the pdf417 barcode on the backside, so it can't compare front and back side results. We are working on support for the front side of the USDL and in Q2 of the 2019 we will have some exciting news! A small hint: Autodetection

Kind regards

Upvotes: 1

Related Questions