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 classScanbotOcrEngine.EngineInputInput for the OCR process
public final classScanbotOcrEngine.PagesInputAllows to set OCR input as a list of pages
public final classScanbotOcrEngine.BitmapInputAllows to set OCR input as a bitmap
public final classScanbotOcrEngine.UrisInputAllows to set OCR input as a list of URIs of encrypted or normal images
public final classScanbotOcrEngine.DocumentInputAllows 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 OcrResultrecognizeFromBitmap(Bitmap bitmap)Performs OCR only (without PDF result) from the bitmap with provided languages. OcrResultrecognizeFromDocument(Document document)Performs OCR only (without PDF result) from the document with provided languages. OcrResultrecognizeFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted)Performs OCR only (without PDF result) from Images with provided languages. OcrResultrecognizeFromPages(List<Page> pages)Performs OCR only (without PDF result) from pages with provided languages. FilegetLanguageDataPath()Set<Language>getInstalledLanguages()UnitsetOcrConfig(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
-
-
-
-