Is there any java library for reading barcodes of wine numbers from an image?

I am creating an application for reading barcodes of vin numbers using a camera from an Android phone. I do not know how to read barcodes from an image taken from a camera. (i.e. is there any class for reading the barcode of the wine number format.I tried zxing and other libs not to use for me. Thanks

Note. I tried searching in DDG.gg and Stackoverflow, but could not find a suitable solution.

+6
java android image-processing barcode vin
source share
3 answers

According to this thread in Google code , zxing should support it. They say the problem may be related to the resolution of the camera. And they mention the β€œauqoniq VIN scanner,” which seems to be a zxing-based android application.

+2
source share

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

The problem is, of course, the resolution of the camera. Large, clean VINS scan without a hitch. Dingy Vins no.

I make my VIN field available for manual input if it is not scanned. Remember to run the check digit method to make sure it is a valid VIN.

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

+1
source share

I have successfully used the zxing source code to decode to valid VIN strings and encoded the VIN strings back to barcodes using intent (with a little help).

Here the key is

  • Integrate zxing source code as a library. Here is a step-by-step link:

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

    Please note that it is also discussed here why this should not be done from the developer's point of view, but the code is open and open, and we need to modify it in a way that cannot be executed by intention at present, so here we go.

  • In your project, call zxing using intent (as they recommend); specify intent.putExtra("SCAN_MODE","ONE_D_MODE");

    I really worked in both directions (with and without this line), but it is up to you if you see better results, including it. I usually get a VIN to scan in less than 1/4 of the focus when it is in the frame.

  • Preview resonance matters because a camera preview sends frames to a decoder to search for a valid barcode.

    therefore ... in CameraConfigurationManager.java, specify a larger MAX_PREVIEW_PIXELS (which does not exceed the screen resolution). I used "1024 * 600" - the resolution of my devices. This may take some time.

  • in CameraManager.java, edit the frame rectangle to expand the size of the larger barcode, via private static final int MAX_FRAME_WIDTH = screenpixelsinteger; mine is 1000.

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

Finally, SCAN!

I do not believe that I edited any other variables, but if I find that I did this to do this work, I will update this answer.

+1
source share

All Articles