ZXing on android - Decode performance extremely slow?

I only use ZXing via intent and it is very fast that way - to throw an idea in here: perhaps the input image is too large - perhaps reduce the size before throwing it into the decoder ..

Up vote 0 down vote favorite share g+ share fb share tw.

As the title suggests, I am trying to decode QR codes on an android device using ZXing's Barcode Scanner app. I have read multiple threads on the internet about how it is discouraged to integrate the app within one's own project. Instead, one should use IntentIntegrator.

However, this is not an option in my case. Below is a snippet of code which I am calling for every camera frame. LuminanceSource source = new RGBLuminanceSource(bitmap); BinaryBitmap bm = new BinaryBitmap(new HybridBinarizer(source)); try { Result result = reader.

Decode(bm); // This line takes approx. 6seconds if (!result.getText().isEmpty()) { Log. E("MYTAG", "Found something: "+result.getText()); } } catch (NotFoundException e) { e.printStackTrace(); } catch (ChecksumException e) { e.printStackTrace(); } catch (FormatException e) { e.printStackTrace(); } As I said, this process is extremely slow.

Decoding takes anywhere between 5 to 8 seconds. I have tried using both the MultiFormatReader and the QRCodeReader Can anyone shed some light on the subject? Thankyou.

Android qr-code zxing barcode-scanner link|improve this question asked Mar 18 at 13:47swift1691333 86% accept rate.

This is exactly why you want to scan by Intent -- no coding or debugging, and you scan optimally. Here I imagine you are feeding it a full 5MP image or something. Don't do that.

Some additional information: my company's using the zxing library to do decoding from various hardware barcode scanners. 640x480 and 752x480 are the most common preview sizes that we use; both work fine. – Fishbreath Mar 18 at 17:08 That's fine then, those preview sizes are easy to crunch.

A cycle finishes in about 150ms for me. Are you turning on TRY_HARDER? That's also something you shouldn't do on mobile.

– Sean Owen Mar 18 at 17:24 1 Also, why RGBLuminanceSource? You would use YUVPlanarLuminanceSource with preview data. – Sean Owen Mar 18 at 17:25.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions