ZXing on Android PDF417

断了今生、忘了曾经 提交于 2019-12-05 02:51:26
Sean Owen

It really depends on what you expect. Simple PDF417 reads pretty instantly, like... this or this.

This will never be scanned.

Borderline is stuff that is small or moderately complex: example 1 and example 2.

I can read the first but not the second, even though the first is denser -- size helps.

  • Make sure to enable PDF 417 decoding; it's off by default
  • Quiet zone (white space around the code) is required
  • Focus and light help a lot

You can try PDF417.mobi SDK. It should work on low-end phones if equipped with auto-focus camera. It's a commercial library, but free for developers and non-commercial purposes.

You can try the demo here or play with code directly from GitHub. Official web site is here http://pdf417.mobi/

Disclaimer: I'm part of the team working on PDF417.mobi

Have used , It can scan PDF417 format. Make sure you give a try with a Gadget containing Auto Focus camera. Have tried It on Samsung Galaxy Tab it works like a charm.

Zxing's solution did not work for me. I used DataSymbol Decoder (turn on 2d codes, by default they are off) on my samsung charge. In less than a second I captured my drivers license...

AM_

Google's Barcode API which is part of google's Mobile Vision library lists support for PDF-417 Barcodes.

It automatically parses QR Codes, Data Matrix, PDF-417, and Aztec values, for the following supported formats:

  • URL
  • Contact information (VCARD, etc.)
  • Calendar event
  • Email
  • Phone
  • SMS
  • ISBN
  • WiFi
  • Geo-location (latitude and longitude)
  • AAMVA driver license/ID

Review the Getting Started Page or clone the sample code to get started.

I got similar results as described by @sean-owen in that only the simple PDF417 were being read. It feels like the ZXing library doesn't have the same error correction for PDF417 that it does for QR Codes. However, with user assistance we were able to eliminate noise and create an artificial quiet zone by:

  • require the user to hold the phone in landscape mode (this maximizes the pixels captured from the camera, even in 640x480 mode)
  • require the user to fit the barcode inside a 50:18 clipping rectangle (this ratio seems to best fit the US Driver's License and such a clipping rectangle will empower the user to clip away most of the noise)
  • allow the user control focus, tilt distortions

By following the above, even some of the notoriously difficult PDF417 images can be scanned.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!