Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF417 and Driver License Scan not detected #11

Closed
djkrut opened this issue Aug 21, 2015 · 6 comments
Closed

PDF417 and Driver License Scan not detected #11

djkrut opened this issue Aug 21, 2015 · 6 comments

Comments

@djkrut
Copy link

djkrut commented Aug 21, 2015

I have tried this sample after implementing other camera solutions (cwac-cam2, native camera). I have not successfully been able to decode a pdf417 or Driver License bar code. I have no problem with 1D or QR codes.

@pchx-zz
Copy link

pchx-zz commented Aug 21, 2015

There is a known issue with driver's licenses from certain states (for example, Illinois) not conforming to the PDF417 spec. We have developed a fix and hope to release it soon.

@hanzo3
Copy link

hanzo3 commented Aug 23, 2015

Awesome, great to hear! Thank you.

@hanzo3
Copy link

hanzo3 commented Aug 27, 2015

You can capture all barcodes and process only the type you need.
You can get the specific type by using the following code:detector = new BarcodeDetector.Builder(getActivity().getApplicationContext())
.setBarcodeFormats(Barcode.DRIVER_LICENSE | Barcode.PDF417)
.build();
You can also check the format type and if it equals what you want to evaluate then continue processing or capture the barcode.
Hope this helps or answers your question. If not, let me know.

 On Tuesday, August 25, 2015 9:47 AM, jianleon <[email protected]> wrote:

How can I only recognize one specific barcode type?—
Reply to this email directly or view it on GitHub.

@pchx-zz
Copy link

pchx-zz commented Aug 27, 2015

hanzo3: We're getting off-topic, but this isn't entirely correct:

detector = new BarcodeDetector.Builder(getActivity().getApplicationContext())
.setBarcodeFormats(Barcode.DRIVER_LICENSE | Barcode.PDF417)
.build();

setBarcodeFormats() only works with the barcode format constants (e.g. Barcode.PDF417). DRIVER_LICENSE is a value format type that is only used in the detector output via Barcode.valueFormat.

@hanzo3
Copy link

hanzo3 commented Aug 28, 2015

Oh yeah, good catch. I was going to test that as it seemed odd since DL is PDF417 but never got the Drivers License to work in my state. I did get it to work from an online example from a different state and should have read the doc instead of assuming with code assist. Thanks!

@pchx-zz
Copy link

pchx-zz commented Mar 17, 2016

The PDF417 decoding fix was released with Play Services 8.3:

https://developers.google.com/vision/release-notes

For drivers license parser improvements, please refer to issue #77.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants