我在使用.NET平台上的zxing工具包取得了很大的成功,现在我想尽可能地提高解码QR条形码的速度(因为我有1.8M个要处理)。我正在使用以下代码:
// Create Barcode decoder
BarcodeReader q = new BarcodeReader();
q.PossibleFormats = new List<BarcodeFormat>();
q.PossibleFormats.Add(BarcodeFormat.QR_CODE);
q.AutoRotate = true; // Not necessary for QR?
q.TryHarder = false;
// Decode result
Result[] r = q.DecodeMultiple(imageFile);
我的代码比较聪明,它在循环中运行,如果一次没有找到,就会更加努力地尝试。
有没有办法添加区域、ROI或者较小的区域以加快检测速度呢?
还有其他推荐来提高性能吗?