micjahn / ZXing.Net

.Net port of the original java-based barcode reader and generator library zxing
Apache License 2.0
2.7k stars 668 forks source link

Can't read datamatrix #191

Closed sikemullivan closed 5 years ago

sikemullivan commented 5 years ago

Hi,

I have a pretty simple datamatrix that can't be read by Zxing. I've used a few other sites, and there is no issue.

var reader = new BarcodeReader();
reader.Options.TryHarder = true;
reader.Options.PossibleFormats = new List<ZXing.BarcodeFormat>() { ZXing.BarcodeFormat.DATA_MATRIX };

var text = reader.Decode(image)?.Text;

broken_datamatrix

micjahn commented 5 years ago

The datamatrix detector has trouble with the blurry edges of the black rectangles. I have no idea how to fix that. I don't know the detector code enough. Sorry.