Reads barcode for few codes and certain orientation only

96 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Jaspreet Singh

nieprzeczytany,
21 lut 2017, 00:24:5321.02.2017
do zxing
From the above two image only one with flip is decoded but the straight one does not decodes.Please help me what should i do.It is both encoded and decoded using zxing.
Reads.jpg
DoesNot Reads.jpg

Abel Sierra Sánchez

nieprzeczytany,
21 lut 2017, 08:20:1021.02.2017
do zxing
El martes, 21 de febrero de 2017, 6:24:53 (UTC+1), Jaspreet Singh escribió:
> From the above two image only one with flip is decoded but the straight one does not decodes.Please help me what should i do.It is both encoded and decoded using zxing.

Could you show your code? Did you set to true the AutoRotate var when initializing the BarcodeReader?

Sean Owen

nieprzeczytany,
21 lut 2017, 13:33:1721.02.2017
do zxing
Mirror-imaged QR codes are not valid. One works, the other one doesn't, as expected. Only one is a correct barcode.

Abel Sierra Sánchez

nieprzeczytany,
21 lut 2017, 20:33:2421.02.2017
do zxing
El martes, 21 de febrero de 2017, 19:33:17 (UTC+1), Sean Owen escribió:
> Mirror-imaged QR codes are not valid. One works, the other one doesn't, as expected. Only one is a correct barcode.

Those two barcodes are the exact same code, no mirror. The second one is first one rotated to the left 90 degrees. I can scan both.

Jaspreet Singh

nieprzeczytany,
21 lut 2017, 22:40:3421.02.2017
do zxing
On Tuesday, February 21, 2017 at 10:54:53 AM UTC+5:30, Jaspreet Singh wrote:
> From the above two image only one with flip is decoded but the straight one does not decodes.Please help me what should i do.It is both encoded and decoded using zxing.

LuminanceSource source = new BufferedImageLuminanceSource(bufferedImage);
BinaryBitmap bitmap = new BinaryBitmap(new GlobalHistogramBinarizer(source));
Reader mReader = new MultiFormatReader();
GenericMultipleBarcodeReader reader = new GenericMultipleBarcodeReader(mReader);
results = reader.decodeMultiple(bitmap, hints);
I am using above code.
And both are scanning from any android app but not through the java application and also not from the online zxing decoder.

Abel Sierra Sánchez

nieprzeczytany,
22 lut 2017, 13:35:3622.02.2017
do zxing
I would rather use this instead:

var barcodeReader = new ZXing.BarcodeReader();
barcodeReader.AutoRotate = true;

The code you are using is for reading several codes in one single file, do you really need this or you will only read one code by file? I didn't try it but I guess you cannot use the property barcodeReader.AutoRotate = true; for reading multiple codes in a single file.

Sean could help you better in this, I think he misunderstood your question.
Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0