Class ScanbotOpticalCharacterRecognizer
-
- All Implemented Interfaces:
-
io.scanbot.sdk.ocr.OpticalCharacterRecognizer
public final class ScanbotOpticalCharacterRecognizer implements OpticalCharacterRecognizer
Default implementation of OpticalCharacterRecognizer for Scanbot SDK
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classScanbotOpticalCharacterRecognizer.RecognizerInputInput for the OCR process
public final classScanbotOpticalCharacterRecognizer.PagesInputAllows to set OCR input as a list of pages
public final classScanbotOpticalCharacterRecognizer.BitmapInputAllows to set OCR input as a bitmap
public final classScanbotOpticalCharacterRecognizer.UrisInputAllows to set OCR input as a list of URIs of encrypted or normal images
-
Constructor Summary
Constructors Constructor Description ScanbotOpticalCharacterRecognizer(Context context, BlobManager blobManager, SapManager sapManager, OcrPdfRenderer pdfRenderer, DocumentStoreStrategy documentStoreStrategy, SimpleComposer simpleComposer, BlobStoreStrategy blobStoreStrategy, PageFileStorage pageFileStorage, FileIOProcessor fileIOProcessor, OcrSettings ocrSettings, OcrPdfRenderer.BitmapBinarizer bitmapBinarizer)
-
Method Summary
Modifier and Type Method Description OcrResultrecognizeTextFromBitmap(Bitmap bitmap)Performs OCR only (without PDF result) from the bitmap with provided languages. OcrResultrecognizeTextFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted)Performs OCR only (without PDF result) from Images with provided languages. OcrResultrecognizeTextFromPages(List<Page> pages)Performs OCR only (without PDF result) from pages with provided languages. OcrResultrecognizeTextWithPdfFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfig pdfConfig)Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages. OcrResultrecognizeTextWithPdfFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfig pdfConfig)Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages. OcrResultrecognizeTextWithPdfFromPages(List<Page> pages, PdfConfig pdfConfig)Performs OCR and creates sandwiched OCR PDF file (from given Page objects. OcrResultrecognizeTextWithPdfFromPages(List<Page> pages, File outputFile, PdfConfig pdfConfig)Performs OCR and creates sandwiched OCR PDF file (from given Page objects. OcrResultrecognizeTextWithPdfFromDocument(Document document, PdfConfig pdfConfig)Performs OCR and creates sandwiched OCR PDF file (from given Document. OcrResultrecognizeTextWithPdfFromDocument(Document document, File outputFile, PdfConfig pdfConfig)Performs OCR and creates sandwiched OCR PDF file (from given Document. FilegetLanguageDataPath()Set<Language>getInstalledLanguages()UnitsetOcrConfig(OpticalCharacterRecognizer.OcrConfig ocrConfig)Sets the OCR and PDF engine mode configuration. -
-
Constructor Detail
-
ScanbotOpticalCharacterRecognizer
ScanbotOpticalCharacterRecognizer(Context context, BlobManager blobManager, SapManager sapManager, OcrPdfRenderer pdfRenderer, DocumentStoreStrategy documentStoreStrategy, SimpleComposer simpleComposer, BlobStoreStrategy blobStoreStrategy, PageFileStorage pageFileStorage, FileIOProcessor fileIOProcessor, OcrSettings ocrSettings, OcrPdfRenderer.BitmapBinarizer bitmapBinarizer)
-
-
Method Detail
-
recognizeTextFromBitmap
OcrResult recognizeTextFromBitmap(Bitmap bitmap)
Performs OCR only (without PDF result) from the bitmap with provided languages.
- Parameters:
bitmap- the bitmap to perform OCR on
-
recognizeTextFromUris
OcrResult recognizeTextFromUris(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
-
recognizeTextFromPages
OcrResult recognizeTextFromPages(List<Page> pages)
Performs OCR only (without PDF result) from pages with provided languages.
- Parameters:
pages- list of Page objects.
-
recognizeTextWithPdfFromUris
OcrResult recognizeTextWithPdfFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages.
- Parameters:
imageFileUris- list of image file URIssourceFilesEncrypted- if true, the image files are encrypted and will be decrypted before OCRpdfConfig- the PDF configuration
-
recognizeTextWithPdfFromUris
OcrResult recognizeTextWithPdfFromUris(List<Uri> imageFileUris, File outputFile, Boolean sourceFilesEncrypted, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given image file URIs) with provided languages.
- Parameters:
imageFileUris- list of image file URIsoutputFile- the output PDF filesourceFilesEncrypted- if true, the image files are encrypted and will be decrypted before OCRpdfConfig- the PDF configuration
-
recognizeTextWithPdfFromPages
OcrResult recognizeTextWithPdfFromPages(List<Page> pages, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Use the document image from a Page.) with provided languages.
- Parameters:
pages- list of Page objects.pdfConfig- the PDF configuration
-
recognizeTextWithPdfFromPages
OcrResult recognizeTextWithPdfFromPages(List<Page> pages, File outputFile, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Use the document image from a Page.) with provided languages.
- Parameters:
pages- list of Page objects.outputFile- the output PDF filepdfConfig- the PDF configuration
-
recognizeTextWithPdfFromDocument
OcrResult recognizeTextWithPdfFromDocument(Document document, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Use the document image from a io.scanbot.sdk.docprocessing.Page.) with provided languages.
- Parameters:
document- the document to perform OCR on and create a PDF from.pdfConfig- the PDF configuration.
-
recognizeTextWithPdfFromDocument
OcrResult recognizeTextWithPdfFromDocument(Document document, File outputFile, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. Use the document image from a io.scanbot.sdk.docprocessing.Page.) with provided languages.
- Parameters:
document- the document to perform OCR on and create a PDF from.outputFile- the output PDF filepdfConfig- the PDF configuration.
-
getLanguageDataPath
File getLanguageDataPath()
-
getInstalledLanguages
Set<Language> getInstalledLanguages()
-
setOcrConfig
Unit setOcrConfig(OpticalCharacterRecognizer.OcrConfig ocrConfig)
Sets the OCR and PDF engine mode configuration.
- Parameters:
ocrConfig- the OCR and PDF engine mode configuration
-
-
-
-