【发布时间】:2016-11-04 14:54:34
【问题描述】:
如何在 Zxing.net 中为 'GenericMultipleBarcodeReader' 设置提示 'AutoRotate'。我已设置 Try_Harder = true。但没有从旋转图像中检测多个 1d/2d 条形码的结果。如果图像正确对齐,它会给出结果。
编辑:在“GenericMultipleBarcodeReader”中,我使用的是“ByQuadrantReader”。这可以从正确对齐的图像中检测条形码和二维码。对于旋转的图像,它找不到任何东西。
MultiFormatReader multiReader = new MultiFormatReader();
ZXing.Multi.GenericMultipleBarcodeReader byquadReader = new ZXing.Multi.GenericMultipleBarcodeReader(new ByQuadrantReader(multiReader));
Dictionary<DecodeHintType, object> hints = new Dictionary<DecodeHintType, object>();
hints.Add(DecodeHintType.TRY_HARDER, true);
List<BarcodeFormat> formats = new List<BarcodeFormat>();
formats.Add(BarcodeFormat.All_1D);
formats.Add(BarcodeFormat.QR_CODE);
hints.Add(DecodeHintType.POSSIBLE_FORMATS, formats);
****
byquadresults = byquadReader.decodeMultiple(binaryBitmap, hints);
谁能帮帮我。
【问题讨论】: