Sam
Sam

Reputation: 29009

WP7 zxing scan not reliable

I've printed a few short qr-codes (like "HAEB16653") on a page using this algorythm:

private void CreateQRCodeFile(int size, string filename, string codecontent)
{
  QRCodeWriter writer = new QRCodeWriter();
  com.google.zxing.common.ByteMatrix matrix;
  matrix = writer.encode(codecontent, BarcodeFormat.QR_CODE, size, size, null);
  Bitmap img = new Bitmap(size, size);
  Color Color = Color.FromArgb(0, 0, 0);
  for (int y = 0; y < matrix.Height; ++y)
  {
    for (int x = 0; x < matrix.Width; ++x)
    {
      Color pixelColor = img.GetPixel(x, y);
      //Find the colour of the dot 
      if (matrix.get_Renamed(x, y) == -1)
      {
        img.SetPixel(x, y, Color.White);
      }
      else
      {
        img.SetPixel(x, y, Color.Black);
      }
    }
  }
  img.Save(filename, ImageFormat.Png);
}

The printed barcodes work very well and fast with the integrated WP7 bing scan&search.

When I try to scan the very same printed qrcodes with Stéphanie Hertrichs sample app, scanning is very slow, most do not scan at all, or will only be recognized when I slowly rotate the camera around.

How do I get my scanning to be as reliable as the integrated barcode recognition? I only need to scan QrCodes, so I disabled all the others, still it does not work most of the time.

Is there maybe some other barcode scanning library which is working better?

Upvotes: 0

Views: 419

Answers (3)

Michael
Michael

Reputation: 2506

The silverlight port in Stéphanie Hertrichs sample app is very old. It seems to me that the project at codeplex isn't maintained anymore since more then 1 year. You should try one of the newer and maintained ports like ZXing.Net

Upvotes: 2

Sean Owen
Sean Owen

Reputation: 66896

zxing works very well -- just try it on Android. I would not be surprised if it is what powers the Bing search.

The problems are likely in the port. Any non-Java port is at best old and incomplete. I also can't speak to the efficiency of the approach used in the sample you are looking at. For example, is it really binarizing the image from the APIs correctly? Also make sure it is not using TRY_HARDER mode.

Upvotes: 1

Philip Daubmeier
Philip Daubmeier

Reputation: 14964

There is no objective answer to this question...

My personal opinion is that the ZXing lib that you tried (Stéphanie Hertrichs sample app) is the best you can get. As far as I know it is used on the other plattforms, too (e.g. Android).

As I tested the lib a few months ago, I had the impression it worked very reliable and quick, but it may be that you had other circumstances (lighting, camera, angle, etc...)

Upvotes: 0

Related Questions