J4L QRCode Vision for the Java Platform [TM]

Copyright J4L (http://www.java4less.com) 2012

Installation

J4L QRCode Vision is a Java component which can read (scan) qrcode barcodes images. It support the following features:

The requirements are:

Know limitations are:

 

Installation

 

In order to use the component you only need to add rvision.jar and rqrvision.jar to your classpath. If you need to scan large images and get an outOfMemory error you will need to increase the Java heap Size using the Java.exe parameter -Xmx.

 

Javadoc pages

The Javadoc pages are located in the javadoc subdirectory of the component's ZIP file.

 

Examples

The use of the component is very simple. You must follow these steps:

  1. Create QRCodeReader instance:

    QRCodeReader reader=new QRCodeReader();


  2. Load your image into a BufferedImage class. The application QRCodeSample.java includes a method called loadImage() you can use for this purpose.

    Image image=loadImage("myFile.gif");

  3. Create a RImage instance and call the read() method of theQRCodeReader

    QRCodeData[] barcodes=reader.scan(new RImage((BufferedImage) im));

  4. Read the result. The QRCodeData objects contain the following information: Value ( of the barcode) and position of the 3 finder patterns ( x1 , y1, x2 , y2, x3 and y3). If the decoding failed the isDecodingSuccessfull() method will return false.

    If no barcode has been found the array returned by read() will be empty.

The component includes a simple test program called QRCodeSample.java that will scan all files located in the images subdiretory. You can use that application as starting point.

You can optimize the scanning process by setting some properties of the reader, this helps the component finding the finder patterns of the correct size, discarding too small or too large ones:

Depending on the size of the object and the image resolution you use, you can modify these values to speed up the scanning process.