|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.asprise.util.ocr.OCR
A high performance Java OCR engine.
This OCR engine is capable of recognizing both characters (letter and numbers) and barcodes accurately.
Sample use:
// loads the image.
BufferedImage image = ImageIO.read(new File("ocr.gif"));
// recognizes both characters and barcodes
String s = new OCR().recognizeAll(image);
// prints the results.
System.out.println("RESULTS: \n"+ s);
The input image document:
Results:
Note:
[123456789012]
Asprise OCR
Speed. Accuracy.
[123456789012]
is extracted from the barcode.
For more information, please visit http://asprise.com.
Constructor Summary | |
OCR()
Creates an instance of OCR engine. |
Method Summary | |
static java.lang.String |
getLibraryPath()
Gets the native library path. |
java.lang.String |
recognizeBarcode(java.awt.image.RenderedImage image)
Recognizes a barcode from the specified image. |
java.util.Vector |
recognizeBarcodes(java.awt.image.RenderedImage image)
Recognizes one or more barcode from the specified image. |
java.lang.String |
recognizeCharacters(java.awt.image.RenderedImage image)
Recognizes characters (letters and numbers) from the specified image. |
java.lang.String |
recognizeEverything(java.awt.image.RenderedImage image)
Recognizes characters and barcodes from the specified image. |
java.lang.String |
recognizeEverything(java.awt.image.RenderedImage image,
java.lang.String barcodePrefix,
java.lang.String barcodeSuffix)
Recognizes characters and barcodes from the specified image. |
static void |
setLibraryPath(java.lang.String libraryPath)
Sets the native library path. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public OCR()
Method Detail |
public java.lang.String recognizeEverything(java.awt.image.RenderedImage image)
image
-
recognizeEverything(RenderedImage, String, String)
public java.lang.String recognizeEverything(java.awt.image.RenderedImage image, java.lang.String barcodePrefix, java.lang.String barcodeSuffix)
image
- barcodePrefix
- barcodeSuffix
-
public java.lang.String recognizeCharacters(java.awt.image.RenderedImage image)
image
-
public java.lang.String recognizeBarcode(java.awt.image.RenderedImage image)
image
-
recognizeBarcodes(RenderedImage)
public java.util.Vector recognizeBarcodes(java.awt.image.RenderedImage image)
image
-
recognizeBarcode(RenderedImage)
public static void setLibraryPath(java.lang.String libraryPath)
null
, in which case
the system will load the native library from default locations,
such as system directory.
libraryPath
- path of the native library to be loaded;
set to null
to let the system load the library
by automatic search.public static java.lang.String getLibraryPath()
null
if no library path
has been set yet.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |