phil
phil

Reputation: 537

AVFoundation can't scan low-contrast QR code

The native AVFoundation QR code scanner just can't see a low-contrast QR code that I need to be able to scan. I know it's possible to scan the code though, because it works fine with WeChat's QR scanner.

How do I scan this QR code? Is there a way to adjust my AVCaptureSession to allow for lower-constrast QR codes? Is there a package I can use that would be better?

Upvotes: 0

Views: 585

Answers (2)

phil
phil

Reputation: 537

I got it working with 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

Upvotes: 0

Lumialxk
Lumialxk

Reputation: 6379

Try to set capture quality to high.

session.sessionPreset = .high

Upvotes: 1

Related Questions