Can not read QR code from image

could you please try to recognize QR code in the attached image.
without any RecognitionHints.ImageBinarization or RecognitionHints.Orientation changes

problem is, that reader.Read() works forever

regards

Dim lic As New Aspose.BarCode.License
lic.SetLicense(Path.Combine(Application.StartupPath, "Aspose.Total.lic"))

Dim reader As New BarCodeReader("H:\_test SCAN\erik2-p9.jpg", BarCodeReadType.QR)
Dim sw = Stopwatch.StartNew()
While (reader.Read())

Console.WriteLine("BarCode: {0}", reader.GetCodeText())
End While
reader.Close()

sw.Stop()
Console.WriteLine("Read: {0} ms", sw.ElapsedMilliseconds)

Console.ReadKey()

Hi Erik,


Thank you for contacting support. We’ve tested your sample barcode image against the latest build of Aspose.BarCode for .NET 6.3.0. I can’t recognize QR code because the Read method is taking too long. This issue has been logged under ticket id BARCODENET-33926 in our issue tracking system. Your request has also been linked to this issue. We’ll keep you informed regarding any updates. We’re sorry for the inconvenience you faced.

sorry to bother you again, but could you please try to recognize QR code from the attached PDF documents


i’ve also attached txt files with my results; tickentNo should be QR codetext

regards

Hi Erik,

Thank you for sharing the PDF documents. We’ve tested against the latest builds of Aspose.Pdf 9.3.0 and Aspose.BarCode 6.3.0. We can recognize QR codes as follows:

int pageIndex = 0;


// bind the pdf

PdfConverter converter = new PdfConverter();

converter.BindPdf(@"C:\test\2014_06_18_10_44_10_OCR.pdf");

converter.RenderingOptions.BarcodeOptimization = true;

converter.Resolution = new Aspose.Pdf.Devices.Resolution(300);

converter.DoConvert();

while (converter.HasNextImage())

{

pageIndex++;

MemoryStream pageStream = new MemoryStream();

converter.GetNextImage(pageStream, ImageFormat.Png);

Stopwatch stopwatch = new Stopwatch();

stopwatch.Start();


using (BarCodeReader reader = new BarCodeReader(pageStream, BarCodeReadType.QR))

{

while (reader.Read())

{

stopwatch.Stop();

Console.WriteLine("Page#" + pageIndex + " Code Text: " + reader.GetCodeText() + " Type: " + reader.GetReadType());

}

}

}

Results: ( 2014_06_18_10_44_10.pdf )
Page#1 Code Text: 12369 Type: QR
Page#2 Code Text: 12368 Type: QR

Results: ( 2014_06_18_10_44_10_OCR.pdf )
Page#1 Code Text: 12369 Type: QR
Page#2 Code Text: 12368 Type: QR

We hope, this helps. Please feel free to reply us in case of any confusion or questions.

thx, it’s working. I haven’t been using PdfConverter…


but still, for some PDF-s I have to change ImageBinarizationHints and OrientationHints in BarCodeReader object

now i have another one, which BarCodeReader doesn’t recognize

Hi Erik,


Thank you for your inquiry. We have tried out your sample PDF document against the latest builds of Aspose.BarCode 6.3.0 and Aspose.Pdf 9.3.0. We managed to replicate the problem of recognition failure. It looks as the QR code is truncated. However, we have logged this issue under ticket id BARCODENET-33929 in our issue tracking system. Your request has also been linked to this issue. We’ll keep you informed regarding any updates. We’re sorry for the inconvenience you faced.

any news regarding ticket BARCODENET-33926 or maybe a workaround to this problem

what does BarCodeReader.timeout represents. i can’t find any usefull information regarding this property

regards
Hi Erik,

Thank you for your inquiry. We can now recognize the QR and Code128 codes using the latest code base. Our development team has not marked it as resolved because they are in progress to review the code. If everything goes fine through the QA phase, then we may able to include this fix in the upcoming release of Aspose.BarCode for .NET 6.4.0. We'll let you know once it is fixed.
erikg:
what does BarCodeReader.timeout represents. i can't find any usefull information regarding this property
I'm not certain about this property because it is not working as expected. I've logged my comments against the ticket id BARCODENET-33926. I'll let you know once any information is available from them.

thx for the reply

The issues you have found earlier (filed as BARCODENET-33926) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

thx, it’s working

Could you pls try to extract QRcode from this file

Hi Erik,


Thank you for sharing the sample PDFs. We have tested against the latest builds of Aspose.BarCode 6.5.0 and Aspose.Pdf 9.6.0. We can recognize QR codes as follows:

[C#]

string[] files = Directory.GetFiles(@“C:\temp”);
foreach (string file in files)
{
Console.WriteLine(“Recognizing from:” + Path.GetFileName(file));
PDFCls.ReadCodesFromPages(file, false, BarCodeReadType.QR);
}
public static void ReadCodesFromPages(string PDFLocalPath, bool isSavePages, BarCodeReadType type)
{

int pageIndex = 0;
// bind the pdf
PdfConverter converter = new PdfConverter();
converter.BindPdf(PDFLocalPath);
converter.RenderingOptions.BarcodeOptimization = true;
converter.DoConvert();

while (converter.HasNextImage())
{
pageIndex++;
MemoryStream pageStream = new MemoryStream();
converter.GetNextImage(pageStream, ImageFormat.Png);
using (BarCodeReader reader = new BarCodeReader(pageStream, type))
{
while (reader.Read())
{
Console.WriteLine(“Page#” + pageIndex + " Code Text: " + reader.GetCodeText() + " Type: " + reader.GetReadType());
}
}
}
}

Result:
Recognizing from:doc00552620140922133912_assist_130558595513653870.pdf
Page#1 Code Text: 19401 Type: QR
Recognizing from:doc00552620140922133912_OCR.pdf
Page#1 Code Text: 19401 Type: QR

We hope, this helps. Please feel free to reply us in case of any confusion or questions.

thx, it’s working now, but I had to remove the following lines


converter.Resolution = new Aspose.Pdf.Devices.Resolution(300)
converter.ShowHiddenAreas = True

Hi Erik,


It is nice to hear from you that you can now scan QR codes from the source PDFs. However, if you are reading codes from multiple images, then you can apply check on these two lines.

Hi Erik,


Thank you for being patient. We have a good news for you that the issue id BARCODENET-33929 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.BarCode for .NET 6.9.0. We’ll inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as BARCODENET-33929) have been fixed in Aspose.BarCode for .NET 7.0.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.