jenly1314 / ZXingLite

🔥 ZXing的精简极速版,优化扫码和生成二维码/条形码,内置闪光灯等功能。扫描风格支持:微信的线条样式,支付宝的网格样式。几句代码轻松拥有扫码功能 ,ZXingLite让集成更简单。(扫码识别速度快如微信)
https://jenly1314.github.io/ZXingLite/
Apache License 2.0
3.03k stars 470 forks source link

Preferred settings for fast scan #215

Closed Agmcz closed 1 year ago

Agmcz commented 1 year ago

What are preferred camerascan settings for fast scan

jenly1314 commented 1 year ago

What are preferred camerascan settings for fast scan

There are many default settings for CameraScan. What parameter settings do you mean by the preferred settings for fast scan?

Agmcz commented 1 year ago

For example: https://github.com/ahuyangdong/QrCodeLib when i scan same barcode with QrCodeLib and ZXingLite i notice that QrCodeLib is faster i asked for a preferred setting to have the scan like QrCodeLib.

jenly1314 commented 1 year ago

You can refer to the following configuration examples:

        DecodeConfig decodeConfig = new DecodeConfig();
        // The set of hints to use for subsequent calls to decode(image)
        decodeConfig.setHints(DecodeFormatManager.QR_CODE_HINTS);

       // ResolutionCameraConfig or AspectRatioCameraConfig
       cameraScan.setCameraConfig(new ResolutionCameraConfig(this))
                .setAnalyzer(new MultiFormatAnalyzer(decodeConfig));

See example: QRCodeActivity

Agmcz commented 1 year ago

Thanks.