AVFoundation 无法扫描低对比度二维码

AVFoundation can't scan low-contrast QR code

原生 AVFoundation QR 码扫描器无法看到我需要扫描的低对比度 QR 码。不过我知道扫码是可以的,因为微信的二维码扫描器可以正常使用。

如何扫描这个二维码?有没有办法调整我的 AVCaptureSession 以允许较低对比度的二维码?有没有我可以使用的更好的软件包?

尝试将捕获质量设置为高。

session.sessionPreset = .high

我用 Zbar. Super easy to use, too. Here's a tiny demo (Xcode 9.3 and Swift 4.1): https://github.com/philipshen/ZBar-Demo-Swift-4

得到了它