Class DocumentClassifier
- java.lang.Object
-
- io.scanbot.sdk.documentclassifier.DocumentClassifier
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class DocumentClassifier extends java.lang.Object implements java.lang.AutoCloseableAPI for document classification. Required licence feature(s): DocumentClassification.
-
-
Constructor Summary
Constructors Constructor Description DocumentClassifier(DocumentClassifierConfiguration configuration)Constructs DocumentClassifier 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()DocumentClassifierResultrun(ImageRef image)Classify the document in the given image.
-
-
-
Constructor Detail
-
DocumentClassifier
public DocumentClassifier(DocumentClassifierConfiguration configuration) throws LicenseException
Constructs DocumentClassifier with the given params.- Parameters:
configuration- The configuration to use for the classifier.- Throws:
LicenseException- If license requirements for the API are not met
-
-
Method Detail
-
run
public DocumentClassifierResult run(ImageRef image) throws InvalidImageRefException, LicenseException
Classify the document in the given image.- Parameters:
image- The image to classify.- Returns:
- The result of document classification.
- 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
-
-