J4L Aztec Code Vision for the Java Platform [TM]
Copyright J4L (http://www.java4less.com)
2012
Installation
J4L Aztec Code Vision is a Java component
which can read (scan) aztec code barcodes images. It support the following features:
- Finding all barcodes in large
images (for example in a scanned page or document)
- Supports binary and text
encoding
The requirements are:
- Java 1.4 or later (let us know if
you need a version for 1.3 or 1.2)
Know limitations are:
- Best result are achieved with
black barcodes on white background.
- Shadowed or blurred barcodes can
be unreadable.
- Barcodes can be rotated but better
results will be achieved in the upright position.
Installation
In order to use the component you
only need to add rvision.jar and razvision.jar to your classpath. If you
need to scan large images and get a 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:
- Create AztecCodeReader instance:
AztectCodeReader reader=new
AztectCodeReader();
- Load your image into a BufferedImage
class. The application AztecSample.java includes a method called loadImage()
you can use for this purpose.
Image image=loadImage("myFile.gif");
- Create a RImage instance and call
the read() method of the AztecCodeReader
AztecData[] barcodes=reader.scan(new
RImage((BufferedImage) im));
- Read the result array. The members
of the array are AztecData objects which contain the following information:
- Value ( of the barcode) and position
( x , y) of the barcode center
- Error Correction Level (getECLevel()
method). Returns the maximum number of errors that can be corrected.
If no barcode has been found the array returned by read() will be empty.
The component includes a simple test
program called AztecSample.java that will scan all files located in the images
subdiretory.
You can optimize (speed up) the scanning process
by setting these reader's properties:
- reader.minModuleSize
- reader.maxModuleSize
this setup ignores barcodes whose
center is not between minModuleSize and maxModuleSize