Does CIDetector For other Barcode Types

匆匆过客 提交于 2019-12-07 12:10:27

问题


I am looking at CIDetectorTypeQRCode. How can I detect other types of barcodes? I can read other barcode types via AVMetadataObjectType, however I want to do the same with CIDetector. I am trying to achieve real time highlighting of the barcode.

Trying for a sort of zoom in effect before my AVCaptureMetadataOutputObjectsDelegate achieves a full lock and read of the code.


回答1:


CIDetector has only following types to detect, So we can't use it to detect another type of barcodes.

  • CIDetectorTypeFace
  • CIDetectorTypeRectange
  • CIDetectorTypeQRCode
  • CIDetectorTypeText

But since iOS 11 has introduced a new set of Vision API's. Now it is possible to read barcodes from an image.

if you are targeting >iOS 11, you can use VNDetectBarcodesRequest to read barcode results.



来源:https://stackoverflow.com/questions/36365710/does-cidetector-for-other-barcode-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!