问题
Am currently trying out zxing to develop a MultiFormat Barcode reading supporting android platform, To get Started have downladed zxing 1.7 and builded.
It works fine with EAN format codes and QR Codes, But It fails to scan a Barcode when it comes to real scanning of products which has small UPC barcodes.
Is this a problem with device?
Am Testing it on my Samsung GT-S5570, Android Version 2.2.1, With Autofocus enabled Camera 3.1 MP.
Kindly advice.
Thanks Sam
回答1:
If you can scan EAN barcodes, but not small UPC barcodes, it is probably because the camera can't get enough detail to distinguish the barcode from the background. Here are some things you could try:
- Hold the camera closer to, or further away from, the barcode. Too close, and the auto focus mechanism is unable to compensate. Too far away, and the barcode becomes too small for detection.
- Use more light. ZXing can activate the flash-light on some phones, but not all. If the lightning conditions are too poor, the contrast between the background and the barcode becomes too small.
- Try with a different phone, with different/better camera.
来源:https://stackoverflow.com/questions/8103279/zxing-unable-to-scan-small-upc-codes