简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM