简体   繁体   English

用于数据矩阵解码的 Libdmtx 与 ZXing?

[英]Libdmtx vs ZXing for DataMatrix Decoding?

How reliable is ZXing's barcode localization for DataMatrix decoding compared to libdmtx?与 libdmtx 相比,ZXing 用于 DataMatrix 解码的条码本地化有多可靠?

I have a set of png image files of stickers (proprietary, so unfortunately I'm not able to share them) containing DataMatrix barcodes.我有一组包含 DataMatrix 条形码的贴纸的 png 图像文件(专有,所以很遗憾我无法共享它们)。 These stickers sit on flat surfaces, have very nice quiet zones and are generally centered in the image, but suffer from inequal lighting conditions and slight dust, likely the largest obstacle to reliable decoding.这些贴纸贴在平坦的表面上,有非常好的安静区域,通常位于图像的中心,但受光照条件不均和轻微灰尘的影响,这可能是可靠解码的最大障碍。

I'd like to use a modifiable Java library to decode them and it seems that ZXing is the only open-source option (open to other suggestions).我想使用可修改的 Java 库来解码它们,似乎 ZXing 是唯一的开源选项(对其他建议开放)。 However, upon running these images through the ZXing online decoder , I consistently get NO BARCODE FOUND, even on the cleanest images.但是,通过ZXing 在线解码器运行这些图像后,即使在最干净的图像上,我也始终找不到条形码。 In contrast, when I run the same images through proprietary online decoders, like Inlite's Free Online Barcode Reader , I get reliable decodes for all the images.相比之下,当我通过专有的在线解码器(如Inlite 的免费在线条形码阅读器)运行相同的图像时,我可以获得所有图像的可靠解码。 My company has implemented a library in C that also reliable decodes the barcode images by processing them and calling libdmtx .我的公司在 C 中实现了一个库,它也通过处理和调用libdmtx 来可靠地解码条形码图像。 Similarly, this online DataMatrix decoder built on libdmtx can also reliably read my image files.同样,这个基于 libdmtx 的在线 DataMatrix 解码器也可以可靠地读取我的图像文件。

Is the barcode localization in ZXing significantly inferior to libdmtx? ZXing中的条码本地化是否明显不如libdmtx? If I attempt the same preprocessing on the image files before I run them through ZXing, could I achieve similar results?如果我在通过 ZXing 运行图像文件之前尝试对图像文件进行相同的预处理,是否可以获得类似的结果? I have a strong preference for a Java library (ZXing), but I may have no choice but to use libdmtx.我非常喜欢 Java 库 (ZXing),但我可能别无选择,只能使用 libdmtx。 Would appreciate any insight, thanks!希望有任何见解,谢谢!

I had similar problem as you but on encoding side.我和你有类似的问题,但在编码方面。 As per my findings Zxing is certainly inferior to Libdmtx.根据我的发现,Zxing 肯定不如 Libdmtx。 We are using both libraries in house in C++ and Java project.我们在 C++ 和 Java 项目中同时使用这两个库。

There is a case when Zxing breaks while generating barcode look at my comments here: https://github.com/zxing/zxing/issues/624 Zxing 在生成条码时出现中断的情况,请查看我的评论: https : //github.com/zxing/zxing/issues/624

However Libdmtx works flowless.然而 Libdmtx 工作流畅。 The other free options you have in java world are (they are for encoding):您在 Java 世界中拥有的其他免费选项是(它们用于编码):

  • barcode4j条码4j
  • OkapiBarcode Okapi条码

Another alternative is the relatively new ZXing cpp port here: https://github.com/nu-book/zxing-cpp .另一种选择是这里相对较新的 ZXing cpp 端口: https : //github.com/nu-book/zxing-cpp

It contains a completely new DataMatrix detector that was meant to fix serious limitations of the Java upstream version.它包含一个全新的 DataMatrix 检测器,旨在修复 Java 上游版本的严重限制。 It was specifically designed to deal with low resolution images (module size as low as around 2 pixels) and symbols that have just the required 1 module quite zone and a busy background.它专门设计用于处理低分辨率图像(模块大小低至约 2 个像素)和仅具有所需的 1 个模块安静区域和繁忙背景的符号。

The following comparison is certainly not 'fair' but I just had the dmtxread utility of the libdmtx try my test set of images and it missed 3 of 17 samples and took a whooping 300 times as long compared to my code :).下面的比较当然不“公平”,但我只是让dmtxread实用程序尝试了我的测试图像集,但它错过了 17 个样本中的 3 个,并且与我的代码相比,它花费了 300 倍的时间:)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM