如何识别实体信用卡和影印本iOS

时间:2019-07-03 08:21:48

标签: ios swift object-detection

我有信用卡原件(实体),并有一份复印件。扫描原始信用卡和复印件。如何识别哪一个是原始的?

我尝试使用Firebase VisionML来检测原稿和影印本上的文本。但可以区分它们。

func firebaseDetectText (image: UIImage, controller: MBDocumentOverlayViewController) {

        textDetector = vision.textDetector()

        let visionImage = VisionImage(image: image)

        textDetector?.detect(in: visionImage) { (features, error) in
            guard error == nil, let features = features, !features.isEmpty else {
                return
            }

            debugPrint("Feature blocks in th image: \(features.count)")

            var detectedText = ""
            for feature in features {
                let value = feature.text
                detectedText.append("\(value) ")
            }

            debugPrint(detectedText)
        }
    }

识别哪个人是原始人

0 个答案:

没有答案