unable to read DataMatrix
I'm having hard time decoding a certain DM barcode.
-
this one is decoded just fine:

-
this one is decoded just after I invert and rotate the bitmap manually until i get the code:

-
but this one is not working:

this is the reader: var options = new DecodingOptions() { TryInverted = true, TryHarder = true, AssumeGS1 = true, PossibleFormats = new List<BarcodeFormat>() { BarcodeFormat.QR_CODE, BarcodeFormat.CODE_39, BarcodeFormat.CODE_93, BarcodeFormat.CODE_128, BarcodeFormat.CODABAR, BarcodeFormat.DATA_MATRIX } };
var reader = new ZXing.BarcodeReader()
{
AutoRotate = true,
Options = options
};
zxingResult = reader.Decode(bitmap);
as you can see, the autoRotate=true, but the second barcode is decoded just when I rotate it manualy.
does anyone have an idea what can i do?
Strange images. No chance to make better ones before decoding?
@micjahn unfortunately no. the images are taking using a camera in production tools. the barcodes are printed in quarts
Datamatrix detection is possibly to blame here. The method in zxing (and in this port) isn’t very good at finding them correctly. Not to make more work for the maintainer here, but porting over the c++ detector (it takes a very different approach to locating datamatrix codes) might help. You can check if this is the case by trying out their reader. (https://github.com/zxing-cpp/zxing-cpp)