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 class
ScanbotOpticalCharacterRecognizer.RecognizerInput
Input for the OCR process
public final class
ScanbotOpticalCharacterRecognizer.PagesInput
Allows to set OCR input as a list of pages
public final class
ScanbotOpticalCharacterRecognizer.BitmapInput
Allows to set OCR input as a bitmap
public final class
ScanbotOpticalCharacterRecognizer.UrisInput
Allows 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 OcrResult
recognizeTextFromBitmap(Bitmap bitmap)
Performs OCR only (without PDF result) from the bitmap with provided languages. OcrResult
recognizeTextFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted)
Performs OCR only (without PDF result) from Images with provided languages. OcrResult
recognizeTextFromPages(List<Page> pages)
Performs OCR only (without PDF result) from pages with provided languages. 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. 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. OcrResult
recognizeTextWithPdfFromPages(List<Page> pages, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. OcrResult
recognizeTextWithPdfFromPages(List<Page> pages, File outputFile, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. OcrResult
recognizeTextWithPdfFromDocument(Document document, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. OcrResult
recognizeTextWithPdfFromDocument(Document document, File outputFile, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Document. File
getLanguageDataPath()
Set<Language>
getInstalledLanguages()
Unit
setOcrConfig(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
-
-
-
-