We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.BarCodeRecognition

can someone check if the QR code is recognizable in this image.

image was extracted from a PDF file

barcode scanner via smart phone recognize this QR image

thx

Hi Erik,


Thank you for contacting support. I have tested you sample barcode image against the latest build of Aspose.BarCode for .NET 6.2.0. Your barcode image is noised. Aspose.BarCode API offers a few image processing techniques. These techniques include MedianSmoothing that removes the noise from the image while preserving the image edges. Since I’m able to recognize QR code from this image file. Please have a look over helping article: Better and Faster Image Processing for Barcode Recognition

[C#]

// load image<o:p></o:p>

BarCodeReader reader = new BarCodeReader("C:\\AB\\test236\\nekaj.Jpg", BarCodeReadType.QR);

reader.ImageBinarizationHints = RecognitionHints.ImageBinarization.MedianSmoothing;

int j = 0;

while (reader.Read())

{

j++;

Console.WriteLine("Code Text(" + j + "): " + reader.GetCodeText() + " Symbology: " + reader.GetReadType());

}

reader.Close();


Result:
Code Text(1): 18371 Symbology: QR

Please feel free to write us back in case of any confusion or questions.

thx, how about this one

Hi Erik,


Well, I’ve tested your sample barcode image against the latest build of Aspose.BarCode 6.2.0. I can recognize this barcode image as follows:

[C#]

// load image<o:p></o:p>

BarCodeReader reader = new BarCodeReader("C:\\temp\\p4-QR18267-3fbc7d07-993e-462a-8654-8da57266c6b2.jpg", BarCodeReadType.QR);

reader.OrientationHints = RecognitionHints.Orientation.Rotate270;

int j = 0;

while (reader.Read())

{

j++;

Console.WriteLine("Code Text(" + j + "): " + reader.GetCodeText() + " Symbology: " + reader.GetReadType());

}

reader.Close();


Result:
Code Text(1): 18155 Symbology: QR

Please let us know in case of further assistance or questions.

thx, it’s working.

but that means that i’d have to check each rotation of the image.??
I don’t know if the image is rotated or not

Hi Eric,


Well, the read method auto detects the orientation of the barcode. It is quite possible that the barcode is rotated and you are able to detect the barcode without setting orientation. For now, in your case, it is not so. It is better to apply orientation checks in your source code as you are not certain about the rotation. Normally, we recommend to apply the realistic settings as its impact on the performance and quality.