Open wellhenrique opened 3 months ago
Guten Tag, Hans here. 🍻
Thank you for your detailed report about the barcode scanning issue in portrait mode. It sounds like you've put in some thought, which is appreciated! However, to properly assist you, please check that you are using the latest version of the library and try reproducing the issue in the VisionCamera Example app, as stated in the issue template.
Also, make sure you've gathered relevant logs specifically from adb logcat
while reproducing the issue. This will help mrousavy diagnose the problem more effectively.
Sponsoring the project could also help ensure that your issue receives timely attention. You can do so by clicking here.
Looking forward to your updates!
Note: If you think I made a mistake, please ping
@mrousavy
to take a look.
Try adjusting your camera settings. Your scan result is unstable which usually means you are feeding MLKit with subpar images.
I tried your barcode with our RNVC-based code scanner and I'm getting consistent all 1s.
Also you may want to read MLKit docs about what is a "good image" for barcode detection.
You may have to check the results multiple times to have a steady result or use an advanced library like this one: https://github.com/tony-xlh/vision-camera-dynamsoft-barcode-reader/
What's happening?
When using react-native-vision-camera to scan a CODE-128 barcode on an Android device held in a portrait orientation, the scanned values are returned incorrectly. For example, a barcode with the value 11111111111111111111111.... is incorrectly recognized as 11134231111122313111111... This issue does not occur when the device is held landscape mode. This behavior has been consistently reproduced on multiple Android devices. Does anyone have any idea what might be causing this problem?
Reproduceable Code
Relevant log output
Camera Device
Device
moto X4
VisionCamera Version
4.5.1
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (⚠️ your issue might get ignored & closed if you don't try this)
Additional information