Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about QRCodeRecognize #149

Open
HIIgor opened this issue Aug 11, 2022 · 1 comment
Open

Question about QRCodeRecognize #149

HIIgor opened this issue Aug 11, 2022 · 1 comment

Comments

@HIIgor
Copy link

HIIgor commented Aug 11, 2022

你好,最近在做识别二维码的功能,看到EFQRCode识别这块的逻辑有2个疑问.

为什么 CIDetectorAccuracyLow 低精度的识别要放到高精度的后面呢,我理解低精度的速度较快,高精度应该做兜底.

另外一个疑问是 取得图片的灰度这块是必须的吗

private func getQRString() -> [String] {
    let result = image.ciImage().recognizeQRCode(
        options: [CIDetectorAccuracy: CIDetectorAccuracyHigh]
    )
    if result.isEmpty, let grayscaleImage = image.grayscale {
        return grayscaleImage.ciImage().recognizeQRCode(
            options: [CIDetectorAccuracy: CIDetectorAccuracyLow]
        )
    }
    return result
}
@ZYHshao
Copy link

ZYHshao commented Apr 8, 2024

me too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants