QrCodeRecognizer dosen’t recognize code from image file?

QrCodeRecognizer dosen’t recognize code from image file?

BY 12 Nov 2013 Native Application Development

Hi

Is it possible to use QrCodeRecognizer to recognized codes from loaded images (JPG/PNG)?

 

According to my tests the engine works ok for camera previvew pixelformat PIXEL_FORMAT_YCbCr420_PLANAR.

But I can’t make it work for files.

 

pBuffer = img.DecodeToBufferN(filePath, BITMAP_PIXEL_FORMAT_ARGB8888 , destImgW, destImgH); // loading image with perfect code quality resolution: 640x640
r = __pQrRecognizer->SetImageSize(destImgW, destImgH);
r = __pQrRecognizer->ProcessImage(pBuffer);  // returns nothing

 

Above I use BITMAP_PIXEL_FORMAT_ARGB8888 but changing to other pixelformat gets not effect as well. The recognizer returns none result.

I suppose there is problem with pixel format inside ByteBuffer. So far it works only for camera overlayformat PIXEL_FORMAT_YCbCr420_PLANAR and NV12

on ref device RD-210.

 

I tested it on UI and separately thread as well – if it has any matter at all.

 

Now I stuck totally. Probably I have to implement external engine like zxing.

 

 

Written by