二维条码与一维条码 - 速度、准确性、尺寸

发布于 2024-10-11 04:06:46 字数 234 浏览 7 评论 0原文

我想为我的移动项目需求之一实现条形码。要存储的数据量非常少(<25个字母数字)。我想知道对于这个项目实施一维条形码或二维条形码(特别是二维码)是否更明智。如果有人能从 1d 与 2d 的角度对我进行以下方面的教育,我将非常高兴:

  1. 扫描速度
  2. 尺寸(移动摄像头识别所需的最小显示尺寸 - 这是更重要的)
  3. 精度

从典型的角度考虑处理和SDK角度(最好是zxing)。

I wanted to implement barcode for one of my mobile project requirements. The amount of data that is to be stored is very little (<25 alpha-numeric). I want to know if its wiser to implement a 1d barcode or a 2d barcode (Qr code particularly) for this project. I would be really glad if someone could educate me on the following aspects from a 1d vs 2d perspective:

  1. scanning speed
  2. size (minimum display size that is needed, for the mobile camera to recognize -- this is more crucual)
  3. accuracy

Considered from a typical processing and SDK perspective (zxing preferably).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枉心 2024-10-18 04:06:46

我会使用二维码,特别是如果您打算使用手机摄像头。二维码具有使透视校正等功能变得更容易/更可靠的功能(查找器)。它们还具有 ECC,可以消除误报并纠正各种数量的位检测错误。如果您查看 zxing 测试套件,您会发现许多误报的 1D 案例,因为许多 1D 代码甚至没有校验和。

如果您知道要扫描的内容,那么速度对于这两种情况都可能不是问题。 zxing 中最大的计算成本是当您不知道自己在寻找什么时遍历所有可能的代码。如果您知道代码类型,则它不太可能有显着差异。

关于尺寸的唯一问题是必须捕获的像素数量。换句话说,如果将相机靠近代码,就可以读取小代码。可以从更远的地方读取大代码。所有这些都取决于光线条件、相机对焦(或缺乏对焦)和相机亮度调整。但我看不出这些会对 1D 与 2D 产生什么影响。

I'd go with a qr code, particularly if you're planning on using a phone camera. qr codes have features (finders) that make things like perspective correction easier/more reliable. They also have ECC that enables eliminating false positives and correcting various amounts of bit detection errors. If you look at the zxing test suite, you'll find a number of false positive 1D cases since many 1D codes don't have even a checksum.

Speed's probably not an issue for either case if you know what you're trying to scan. The biggest computational cost in zxing is going through all possible codes when you don't know what you're looking for. If you know the code type, it's not likely to be significantly different.

The only thing about size is the number of pixels that have to be captured. In other words, a small code can be read if you hold the camera close to the code. A large code can be read from further away. All this is subject to light conditions, camera focus (or lack there of), and camera brightness adjustment. I can't see how any of these would impact 1D vs 2D though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文