0
我試圖讀取由usb相機獲取的圖像中的QR碼。 在其他文章中,我讀過最好的開源庫ZXing。C#使用ZXING.NET解碼實際圖像的QRCodeE
如果qrcode來自數字生成的圖像,該庫運行良好,但是如果qrcode來自真實情況,其中圖像由相機獲取,則解析庫存在一些困難。
獲取的圖像受到一些眩光或代碼變形或對比度緩慢的干擾。
你知道一些參數來設置更好的讀者嗎? 或者一些過濾器在闡述之前添加到圖像中?
例如:
BarcodeReader reader = new BarcodeReader();
reader.AutoRotate = true;
reader.Options.TryHarder = true;
reader.Options.PureBarcode = false;
reader.Options.PossibleFormats = new List<BarcodeFormat>();
reader.Options.PossibleFormats.Add(BarcodeFormat.QR_CODE);
var result = reader.Decode(image);
謝謝