2
当我尝试使用CIDetector
在iPhone或iPod读取QR码,探测器总是返回nil
:CIDetector与CIDetectorTypeQRCode工作在iPad上,但不能在iPhone和iPod
NSDictionary *detectorOptions = @{@"CIDetectorAccuracy": @"CIDetectorAccuracyHigh"};
CIDetector * detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:nil options:detectorOptions];
上运行该代码iPad的作品。 所有设备都是iOS上的9,使用的Xcode 7.0.1
其他探测器工作正常,像人脸检测成功:
detector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:detectorOptions];
是否有额外的设置/库获得探测器QR码在iPhone上工作/ iPod?
究竟是什么设备?你是否扫描完全相同的图像?例如,如果它来自相机,相机可能太穷而无法扫描小QR码,并且每个设备都不相同。 – Larme
我的问题不是检测器在图像中找不到qr码;问题是CIDetector甚至没有在我的物理iPhone 5和iPod 5代上实例化,仅在我的iPad Air 2上实例化。我添加了确切的硬件版本,因为这可能是GPU相关的问题? –
我也面临着同样的问题,我已经尝试过使用ipad和iphone,我不能在CIDetectorTypeQRCode模式下实例化CIDetector。 –