Locating/decoding data matrix with Java

瀏覽次數:60 次
跳到第一則未讀訊息

Marshall Pierce

未讀,
2013年8月5日 下午5:35:152013/8/5
收件者:zx...@googlegroups.com
I'm having trouble getting data matrix decoding to work. Eventually I'll want to locate and decode a data matrix that's part of a larger image, but for now I'm just trying to get a data matrix roundtrip (some text -> data matrix -> back to text).


A quick 'gradle test' should show that testDataMatrix is failing, while testQR (which is identical except for the barcode format) succeeds. 

What am I doing wrong? Thanks for any suggestions.

-Marshall
zxing.png

Sean Owen

未讀,
2013年8月5日 下午5:52:482013/8/5
收件者:zx...@googlegroups.com
My guess is that it's the lack of quiet zone. It works fine with PURE_BARCODE mode, which is what you should use when decoding synthetic images like this. You could look into the code to see about relaxing the assumption about quiet zone -- so that beyond the edge of the image is implicitly quiet zone. This is how others work.

Marshall Pierce

未讀,
2013年8月5日 下午6:24:302013/8/5
收件者:zx...@googlegroups.com
Ah, I see. I didn't realize that sort of thing varied between the various decoders. Interestingly, I see that the QRCodeReader does have different behavior for PURE_BARCODE, yet it worked fine without it.

Anyway, thanks for clarifying.
回覆所有人
回覆作者
轉寄
0 則新訊息