This project has moved and is read-only. For the latest updates, please go here.

WP8 performance vs. phones bing QR-scanner?

Oct 17, 2013 at 12:44 PM

First, thanks for this great library!

But... Is there anyone else who are using this on Windows Phone 8? How well is your solution performing when comparing to integrated Bing QR code scanner of windows phone?

In my solution the performance is much worse. It does recognize QR codes (and other barcodes also), but it usually takes 1-5 seconds. Bing reads the same QR codes basically instantly. I have tried a lot of different approaches, first with timer - now with onfocus, different previewbuffer sizes, rgb vs Y, tryharder, etc. Also with different phones (Lumia 800, 720, 920, 925). But at the end I think it is because of the of the Decode -method itself - it just usually fails to recognize the QR-code, even when it is the only thing that is in the picture on white background. Then suddenly when I move the phone just a bit, it will recognize the code.

Any ideas anyone?
Oct 18, 2013 at 8:27 AM
Dear iivana,

I'm working on a new sample at the moment. The recognition fails because of the PhotoCaptureDevice. I'm switching it to a PhotoCamera and it will just work fine.

Try to use the PhotoCamera instead of the PhotoCaptureDevice.
Oct 18, 2013 at 1:50 PM

I think I solved the problem with PhotoCaptureDevice. I want to use that because of more features/options available.

You should use same aspect ratio for initializing PhotoCaptureDevice and reading the previewBuffer. BUT those don't need to be the same resolution. I think the PhotoCaptureDevice resolution just needs to be bigger than preview resolution. So I separated these two resolutions. Now the used preview resolution in my Lumia 920 is 1024x768, PhotoCaptureDevice is initialized with some higher resolution.

For PhotoCaptureDevice.OpenAsync I use this:
        Size resolution = await Task.Factory.StartNew(() => captureResolutions.Last(
            c => (c.Width > 1000.0 || c.Height > 1000.0) && previewResolutions.Any(p => (c.Width / c.Height).Equals(p.Width / p.Height))));
And for reading previewBuffer this:
        var width = (int) PhotoCaptureDevice.PreviewResolution.Width;
        var height = (int) PhotoCaptureDevice.PreviewResolution.Height;

Also reading the barcode is now a bit better because of these basics:
  1. Do not test barcode reading while debugging with VS. :)
  2. Noticed that the phone must be really well in same angle with the barcode. Even like 10 degree difference will produce much worse result. Still Bing reader is much-much better reading QR code in different angles.
Oct 18, 2013 at 1:58 PM
BTW - as I understand the "DetectBarcodeAsync"-method in example is not really async; it does not do "return await"?