Is there any java library to read the vin number barcodes from image? [closed]
Asked Answered
N

3

6

I am building a application to read vin number barcodes using camera from android phone.I do not know how to read the barcodes from the image captured from the camera.(i.e) Is there any class to read the barcode of vin number format.I have tried zxing and other libs no use for me.Thanks

Note: I tried searching in DDG.gg and Stackoverflow but no proper solution.

Nekton answered 4/4, 2011 at 6:57 Comment(0)
P
2

According to this thread on google code, zxing should support it. They say, the issue could be related to camera resolution. And they mention "auqoniq VIN scanner", which seems to be an android app based on zxing.

Passim answered 4/4, 2011 at 7:49 Comment(0)
E
1

I just integrated zxing into my app as a library, and I got my app to properly scan and decode a VIN. I even changed the mask to widen the available scan area.

The problem is definitely camera resolution. Large, clear VINS scan without a hitch. Dingy VINS do not.

I'm making my VIN field available for manual entry if it does not scan. Remember to run a check digit method to make sure it's a valid VIN.

I found one I may use here: http://introcs.cs.princeton.edu/java/31datatype/VIN.java.html

Eolic answered 4/3, 2012 at 18:14 Comment(0)
A
1

I have successfully used zxing's source code to decode to valid VIN strings and encode VIN strings back into barcodes via intent (with a little help).

Here's the key -

  1. Integrate your zxing source code as a library. Here is the step-by-step link:

    http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/

    Note, there is also a nice discussion here as to why this should not be done from a developer's standpoint, but the code is free-open-use and we need to modify it in a fashion that cannot currently be done via intent. So on we go.

  2. In your project, call zxing via intent (just as they recommend); specify intent.putExtra("SCAN_MODE","ONE_D_MODE");

    I have actually had it work both ways (with and without this line) but it's up to you if you see better results including it. I usually get a VIN to scan in less than 1/4 second of focus once it's in frame.

  3. Preview resolution matters, as the camera preview sends frames to the decoder to search for a valid barcode.

    so... in CameraConfigurationManager.java, specify a larger MAX_PREVIEW_PIXELS (that does not exceed your screen resolution). I used "1024 * 600" - my devices resolution. This may take some tweaking.

  4. in CameraManager.java, edit your framing rectangle to widen for the size of the larger barcode, via private static final int MAX_FRAME_WIDTH = screenpixelsinteger;, mine is 1000.

  5. in public Rect getFramingRect() {, edit int width to be = screenResolution.x * 1 (or * nothing), instead of * 3 / 4. This will widen the framing rectangle to be as wide as the screen resolution, but no wider than MAX_FRAME_WIDTH specified above (it will be clamped if the MFW is lower).

Finally, SCAN!

I don't believe I've edited any other variables, but if I find that I did to make this work, I will update this answer.

Anuska answered 29/5, 2012 at 20:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.