我打印短短QR码(如“HAEB16653”)在使用本algorythm在页面上:WP7斑马线扫描不可靠
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);
}
打印的条形码与集成WP7很好地工作和快速扫描&搜索。
当我尝试扫描与Stéphanie Hertrichs sample app完全相同的打印qrcodes时,扫描速度非常慢,大多数根本不扫描,或者只有在缓慢旋转相机时才能识别。
如何让我的扫描与集成条形码识别一样可靠?我只需要扫描QrCodes,所以我禁用了所有其他的,但大多数情况下它仍然不起作用。
是否有其他的条码扫描库可以更好地工作?
当我使用windows phone的集成扫描和搜索功能时,我感到惊讶的是识别能力如何。所以我确定QrCodes,灯光和角度都很好,并且在lib中有一些问题。 – Sam
我同意你bing视觉QR检测更好(虽然它有时有一些设计QR码,如[这里](https://www.facebook.com/Design.QR.code)),但是,我不认为有任何API或库在第三方应用程序中使用它。 –