ZBar vs. zxing - 二维码识别对比

发布于 2024-12-27 17:22:59 字数 187 浏览 2 评论 0原文

谁能告诉我哪个库在低光照条件下识别小二维码更好? 平台是iPhone 4/iOS 5 我尝试了 Barcodes (zxing) 和 ZBar 应用程序,似乎 zxing 在“困难”条件下识别代码方面明显更好。也就是说,这不是一个非常大的样本测试。

关于两个库的实际图像识别能力(速度+质量)的任何输入都会有所帮助。

TIA。

Can anyone tell which library is better in small QR Codes recognition under low lighting conditions?
Platform is iPhone 4/iOS 5
I tried both Barcodes (zxing) and the ZBar apps and it seems that zxing was noticeably better in recognizing the codes under "hard" conditions. That said, it wasn't a very large sample test.

Any inputs on the actual image recognition capabilities (speed+quality) of both libraries would be helpful.

TIA.

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

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

发布评论

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

评论(4

爱情眠于流年 2025-01-03 17:23:00

对我来说ZXing比较好。我在 iOS 应用程序的工作中使用过它们。

  1. 使用 ZBar 时,我在处理大型 QRCode 时遇到了问题。

  2. ZXing 在 iPhone 4 和 3GS 上运行良好,但 Zbar 在 3GS 上运行较差,有时它无法捕获代码。

As for me ZXing is better. I have used them both at work for iOS application.

  1. With ZBar I had problems with large QRCodes.

  2. ZXing works fine on iPhone 4 and 3GS, but Zbar works worse on 3GS, some times it just can't capture the code.

晚风撩人 2025-01-03 17:23:00

您应该查看此链接。从性能角度来看,使用 ZBar 默认值会导致大型 v40 QRCode 出现问题 - 解决方案是将 videoQuality 属性设置为 UIImagePickerControllerQualityTypeHigh 而不是默认的 640x480(Apple 文档)。根据文档,条形码模块的大小需要至少为 3 个像素才能扫描。我大约一年前尝试过这两个 SDK,我喜欢 ZXing 示例应用程序,但最终在应用程序商店提交之前,我发现它生成了很多我发现很难删除的警告消息。切换到 ZBar 使我能够清理消息并向我的应用程序添加扫描多种一维条形码类型的功能。如前所述,默认设置不会为您提供最佳性能,但您需要查看选项,关闭不需要的选项,裸露它应该表现得相当好。

目前我对 ZBar 非常满意,但如果 ZXing 支持其他条形码类型,特别是 DataMatrix、PDF417、Aztec 和 Maxi Code,我可能会切换。

You should take a look at this link. Performance wise, using the ZBar defaults will create issues with large v40 QRCodes - the solution is to set the videoQuality property to UIImagePickerControllerQualityTypeHigh instead of the default 640x480 (Apple docs). As per documentation, the barcode module size need to be at least 3 pixels in size to scan. I tried both SDK around a year ago, I like the ZXing sample app, but in the end prior to appstore submission, I found it generated a lot of warning messages that I find hard to remove. Switching to ZBar allowed me to cleanup the message and add capability to scan several 1D Barcode types to my app. As mentioned the default settings will not give you optimal performance but you need to look into the options, turn off the ones you don't need, stripped bare it should perform reasonably well.

I am pretty happy with ZBar at the moment but will likely switch if ZXing support for other barcode types particularly DataMatrix, PDF417, Aztec and Maxi Code become available.

雨后彩虹 2025-01-03 17:23:00

我发现Zxing在后来的iPad和iPhone上非常好用。 iPad 2 的相机在使用 Zxing 时速度非常慢,但后来的相机速度更快,并且具有更好的对焦能力,这大大提高了速度。

我在 iPad 2 上使用 Zxing 进行的一项“修改”是更改代码中的矩形。每次尝试时我都会逐渐缩小,因此我不会使用所示的矩形,而是逐步将其扩展,因此每次扫描我会检查 5 次。结果有了很大的改善。在 iPad 3 等上,这不是那么必要,但我仍然有代码,而且速度很快。

我在 Windows 中使用扫描仪 (300 DPI) 使用 ZBar 和 ZXing,发现密集的 QRCodes 对于 ZXIng 来说是一个问题,因此必须包含 ZBar 支持。实现 ZBar 支持非常棘手,如果有人感兴趣的话,我必须编写自己的 API。

I have found that Zxing very good on the later iPads and iPhones. The iPad 2 camera was very slow with Zxing, but the later cameras were much faster and have better focusing, which improved speed considerably.

One "hack" I did with Zxing on iPad 2 is to change the rectangle in code. I would progressively zoom out on each attempt, so rather than use the rectangle shown I would expand it out in steps, so I would check 5 times for each scan. The results were much much improved. On the iPad 3 etc this was not so necessary, but still I have the code in there and it is fast.

I have used both ZBar and ZXing in Windows using scanners (300 DPI), and found dense QRCodes a problem for ZXIng and had to include ZBar support. Implementing ZBar support was very tricky and had to write my own API, if anyone is interested.

二货你真萌 2025-01-03 17:23:00

我都用过。如果你想扫描数据矩阵码,你必须使用ZXing。但如果您不需要数据矩阵,使用 ZBar 是一种快速且简单的方法。
此外,iOS 7 中有一个内置的扫描仪 API,AVCaptureMetaDataOutput 扫描除数据矩阵外的一维和二维码。因为简单,我更喜欢 AVCaptureMetaDataOutput。以下是 AVCaptureMetaDataOutput 的指南。

I've used both of them. You have to use ZXing if you want scan data matrix codes. But if you don't need data matrix, using ZBar is a fast and easy way.
Also, there is a built-in scanner API in iOS 7, AVCaptureMetaDataOutput that scans 1D and 2D codes except data matrix. I'd prefer AVCaptureMetaDataOutput because of simplicity. Here is a guide for AVCaptureMetaDataOutput.

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