Package io.scanbot.sdk.ocr
Class OcrEngine
- java.lang.Object
-
- io.scanbot.sdk.ocr.OcrEngine
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class OcrEngine extends java.lang.Object implements java.lang.AutoCloseableAPI for optical character recognition. Required licence feature(s): Ocr.
-
-
Constructor Summary
Constructors Constructor Description OcrEngine()Constructs OcrEngine with the given params.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes native resources held by the object.protected voidfinalize()Pagerun(ImageRef image)Recognize text in the given image.
-
-
-
Constructor Detail
-
OcrEngine
public OcrEngine() throws LicenseExceptionConstructs OcrEngine with the given params.- Throws:
LicenseException- If license requirements for the API are not met
-
-
Method Detail
-
run
public Page run(ImageRef image) throws InvalidImageRefException, LicenseException
Recognize text in the given image.- Parameters:
image- The image to recognize text in.- Returns:
- Page recognized in the image.
- Throws:
InvalidImageRefException- If an invalid image reference is usedLicenseException- If license requirements for the API are not met
-
close
public void close()
Closes native resources held by the object.- Specified by:
closein interfacejava.lang.AutoCloseable
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
-