Randoms "No barcode found"

Jun 19, 2014 at 9:53 AM
Hi, when I try to recognise a set of QR Codes obtained from a scanner, it happens sometimes it recognises the QR code and some other times doesn't (the same one).

My first guess is that is due to the random rotation of the image introduced by the scanner.

In my code I set Autorotate and TryInverted options to True but it seems as if it were not working.
BarcodeReader barcodeReader = new BarcodeReader();
barcodeReader.AutoRotate=true;
barcodeReader.TryInverted=true;
barcodeReader.Options.TryHarder = true;
barcodeReader.Options.PureBarcode = true;
barcodeReader.Options.PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.QR_CODE };

Result result = barcodeReader.Decode(image);
if (result != null){
    Console.OutputEncoding = System.Text.Encoding.UTF8;
    Console.Out.Write(result.Text);
}
However, If I use DecodeMultiple instead of Decode, to the moment,it works like a charm.
BarcodeReader barcodeReader = new BarcodeReader();
barcodeReader.AutoRotate=true;
barcodeReader.TryInverted=true;
barcodeReader.Options.TryHarder = true;
barcodeReader.Options.PureBarcode = true;
barcodeReader.Options.PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.QR_CODE };
Result[] results = null;
results = barcodeReader.DecodeMultiple(image);
if (results[0] != null){
    Console.OutputEncoding = System.Text.Encoding.UTF8;
    Console.Out.Write(results[0].Text);
}
Could someone explain me what's happening? Am I using wrong the Decode function?

Thanks in advance,

Regards,
Coordinator
Jun 19, 2014 at 6:24 PM
Don't use the setting
barcodeReader.Options.PureBarcode = true;
That one should only be used with synthetic images (like an image from the BarcodeWriter class).
Jun 20, 2014 at 6:42 AM
Hi, thank you for the reply!. I have removed the setting and have made the tests again but I get the same behaviour.

I think "AutoRotate" and/or "TryInverted" settings are not working for the first example. If I manually invert one of the images now it's able to decode it
Coordinator
Jun 24, 2014 at 7:02 PM
Can you send me a sample image which works after manually inverting?
Jun 25, 2014 at 7:14 AM
I have sent you a private message
Jul 11, 2014 at 2:58 PM
Edited Jul 11, 2014 at 3:02 PM
I should have read this discussion before posting this "issue":

issue

I'm sure the "issue" is mine, but this discussion is very close to my problem. ejidosoft - did you resolve this?