Package io.scanbot.sdk.ocr
Class ScanbotOcrEngine
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ocr.OcrEngine
public final class ScanbotOcrEngine implements OcrEngine
Default implementation of OcrEngine for Scanbot SDK
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
ScanbotOcrEngine.EngineInput
Input for the OCR process
public final class
ScanbotOcrEngine.PagesInput
Allows to set OCR input as a list of pages
public final class
ScanbotOcrEngine.BitmapInput
Allows to set OCR input as a bitmap
public final class
ScanbotOcrEngine.UrisInput
Allows to set OCR input as a list of URIs of encrypted or normal images
public final class
ScanbotOcrEngine.DocumentInput
Allows to set OCR input as Document of encrypted or normal images
-
Constructor Summary
Constructors Constructor Description ScanbotOcrEngine(Context context, BlobManager blobManager, SapManager sapManager, BlobStoreStrategy blobStoreStrategy, PageFileStorage pageFileStorage, FileIOProcessor fileIOProcessor, OcrSettings ocrSettings, OcrPdfGenerator.BitmapBinarizer bitmapBinarizer)
-
Method Summary
Modifier and Type Method Description OcrResult
recognizeFromBitmap(Bitmap bitmap)
Performs OCR only (without PDF result) from the bitmap with provided languages. OcrResult
recognizeFromDocument(Document document)
Performs OCR only (without PDF result) from the document with provided languages. OcrResult
recognizeFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted)
Performs OCR only (without PDF result) from Images with provided languages. OcrResult
recognizeFromPages(List<Page> pages)
Performs OCR only (without PDF result) from pages with provided languages. File
getLanguageDataPath()
Set<Language>
getInstalledLanguages()
Unit
setOcrConfig(OcrEngine.OcrConfig ocrConfig)
Sets the OCR and PDF engine mode configuration. -
-
Constructor Detail
-
ScanbotOcrEngine
ScanbotOcrEngine(Context context, BlobManager blobManager, SapManager sapManager, BlobStoreStrategy blobStoreStrategy, PageFileStorage pageFileStorage, FileIOProcessor fileIOProcessor, OcrSettings ocrSettings, OcrPdfGenerator.BitmapBinarizer bitmapBinarizer)
-
-
Method Detail
-
recognizeFromBitmap
OcrResult recognizeFromBitmap(Bitmap bitmap)
Performs OCR only (without PDF result) from the bitmap with provided languages.
- Parameters:
bitmap
- the bitmap to perform OCR on
-
recognizeFromDocument
OcrResult recognizeFromDocument(Document document)
Performs OCR only (without PDF result) from the document with provided languages.
- Parameters:
document
- the document to perform OCR on
-
recognizeFromUris
OcrResult recognizeFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted)
Performs OCR only (without PDF result) from Images with provided languages.
- Parameters:
imageFileUris
- list of image file URIssourceFilesEncrypted
- if true, the image files are encrypted and will be decrypted before OCR
-
recognizeFromPages
OcrResult recognizeFromPages(List<Page> pages)
Performs OCR only (without PDF result) from pages with provided languages.
- Parameters:
pages
- list of Page objects.
-
getLanguageDataPath
File getLanguageDataPath()
-
getInstalledLanguages
Set<Language> getInstalledLanguages()
-
setOcrConfig
Unit setOcrConfig(OcrEngine.OcrConfig ocrConfig)
Sets the OCR and PDF engine mode configuration.
- Parameters:
ocrConfig
- the OCR and PDF engine mode configuration
-
-
-
-