Package io.scanbot.sdk.ocr
Interface OpticalCharacterRecognizer
-
- All Implemented Interfaces:
public interface OpticalCharacterRecognizer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
OpticalCharacterRecognizer.OcrConfig
Represents additional the OCR configurations.
public enum
OpticalCharacterRecognizer.EngineMode
Represents the OCR and PDF engine modes.
-
Method Summary
Modifier and Type Method Description abstract OcrResult
recognizeTextFromUris(List<Uri> imageFileUris, Boolean sourceFilesEncrypted)
Performs OCR only (without PDF result) from Images with provided languages. abstract OcrResult
recognizeTextFromPages(List<Page> pages)
Performs OCR only (without PDF result) from pages with provided languages. abstract OcrResult
recognizeTextFromBitmap(Bitmap bitmap)
Performs OCR only (without PDF result) from the bitmap with provided languages. abstract 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. abstract OcrResult
recognizeTextWithPdfFromPages(List<Page> pages, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. abstract File
getLanguageDataPath()
abstract Set<Language>
getInstalledLanguages()
abstract Unit
setOcrConfig(OpticalCharacterRecognizer.OcrConfig ocrConfig)
Sets the OCR and PDF engine mode configuration. -
-
Method Detail
-
recognizeTextFromUris
abstract 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
abstract OcrResult recognizeTextFromPages(List<Page> pages)
Performs OCR only (without PDF result) from pages with provided languages.
- Parameters:
pages
- list of Page objects.
-
recognizeTextFromBitmap
abstract OcrResult recognizeTextFromBitmap(Bitmap bitmap)
Performs OCR only (without PDF result) from the bitmap with provided languages.
- Parameters:
bitmap
- the bitmap to perform OCR on
-
recognizeTextWithPdfFromUris
abstract 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
-
recognizeTextWithPdfFromPages
abstract OcrResult recognizeTextWithPdfFromPages(List<Page> pages, PdfConfig pdfConfig)
Performs OCR and creates sandwiched OCR PDF file (from given Page objects. Based on the new Page class io.scanbot.sdk.persistence.Page! Use the document image from a Page.) with provided languages.
- Parameters:
pages
- list of Page objects.pdfConfig
- the PDF configuration
-
getLanguageDataPath
abstract File getLanguageDataPath()
-
getInstalledLanguages
abstract Set<Language> getInstalledLanguages()
-
setOcrConfig
abstract Unit setOcrConfig(OpticalCharacterRecognizer.OcrConfig ocrConfig)
Sets the OCR and PDF engine mode configuration.
- Parameters:
ocrConfig
- the OCR and PDF engine mode configuration
-
-
-
-