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

从相册加载图片偶尔不能识别 #50

Closed
vanezkw opened this issue Jun 17, 2024 · 1 comment
Closed

从相册加载图片偶尔不能识别 #50

vanezkw opened this issue Jun 17, 2024 · 1 comment

Comments

@vanezkw
Copy link

vanezkw commented Jun 17, 2024

BarcodeDecoder.process(inputImage, Barcode.FORMAT_QR_CODE).addOnSuccessListener(barcodes -> {
if (barcodes.size() > 0) { // 此处返回 barcodes.size() == 0,同一张图片使用相机扫码是可以识别的,这个问题如何处理呢
scanSuccess(barcodes.get(0).getDisplayValue());
}
});

@jenly1314
Copy link
Owner

这种问题,你继续往深处想想就应该知道其中的原因吧;主要是存在客观因素影响,包括但不限于:环境,角度,识别区域,图片大小等等。(扫码时这些因素都是变量,在没识别成功前,会多次进行识别;并且只需识别成功一次即可,而从相册选择图片进行识别时,这些客观因素都相对固定;所以二者并不一样。)

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