public class OCREngine
extends java.lang.Object
| Constructor and Description |
|---|
OCREngine()
Create an OCR engine.
|
OCREngine(OCRParams ocrParams)
Create an OCR engine with a specified configuration.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
java.util.List<Language> |
getAvailableLanguages()
Get a list of languages this OCREngine can use.
|
boolean |
isLanguageAvailable(Language language)
Query if a language for OCR is available for use.
|
Form |
placeTextUnder(Image image)
Recognize text in the image, returning a form element with the image and the text underneath.
|
Form |
placeTextUnder(Image image,
Document inDocument)
Recognize text in the image, returning a form element with the image and the text underneath.
|
public OCREngine()
public OCREngine(OCRParams ocrParams)
ocrParams - the configuration to usepublic void delete()
public Form placeTextUnder(Image image)
This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts.
image - The image in which to recognize text.public Form placeTextUnder(Image image, Document inDocument)
The form will be created in the specified document, sharing fonts with the results of recognizing text in other images.
This method may throw an exception if it can't find a font that will represent all the characters in a word. See the candidateFontNames on OCRParams to supply more fonts.
image - The image in which to recognize text.inDocument - The destination document for the created form.public boolean isLanguageAvailable(Language language)
language - the language to checkpublic java.util.List<Language> getAvailableLanguages()