从图像中检测到的 Aztec 代码无法快速工作

知乎

我在检测图像上的 Aztec 代码时遇到问题。首先,我尝试使用 QR 码,它可以正常工作,我将 UIImage 转换为 CIImage,然后检测功能。使用二维码,它检测一切正常,但使用 Aztec 码,它根本不起作用,在苹果文档中,它说它应该读取所​​有二维条码。

这是我的代码:

func detectData(ciImage: CIImage) -> String {
       let detector: CIDetector=CIDetector(ofType: CIDetectorTypeQRCode, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyHigh])!

       var qrCodeLink=""

       let features=detector.features(in: ciImage)

       for feature in features as! [CIQRCodeFeature] {
           qrCodeLink += feature.messageString!
       }

       if qrCodeLink=="" {
           return "nothing"
       } else {
          return "message: \(qrCodeLink)"
       }
   }
飞利士马

我想说,使用内置软件框架无法检测到阿兹台克代码。在链接的文档中,它说“二维码是使用 ISO/IEC 18004:2006 标准的二维条码。”但维基百科指出“阿兹台克代码也作为 ISO/IEC 24778:2008 标准发布”。所以我猜它只是不支持(还)。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章