public class AsposeOCR extends Object
| Constructor and Description |
|---|
AsposeOCR()
Public constructor.
|
AsposeOCR(String alphabet)
Public constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
CalcSkewImage(BufferedImage image)
Calculates the skew angle of an image.
|
double |
CalcSkewImage(String fullPath)
Calculates the skew angle of an image.
|
double |
CalcSkewImageFromUri(String uri)
Calculates the skew angle of an image provided by URI link.
|
String |
CorrectSpelling(String text,
SpellCheckLanguage language)
Corrects text (replaces misspelled words).
|
ArrayList<Rectangle> |
getTextAreas(BufferedImage image_,
AreasType areasType,
boolean isDetectAreas)
Detects text areas on image.
|
ArrayList<Rectangle> |
getTextAreas(String fullPath,
AreasType areasType,
boolean isDetectAreas)
Detects text areas on image.
|
BufferedImage |
PreprocessImage(BufferedImage image,
PreprocessingFilter filters)
Use image preprocessing to improve the accuracy of OCR.
|
BufferedImage |
PreprocessImage(String fullPath,
PreprocessingFilter filters)
Use image preprocessing to improve the accuracy of OCR.
|
String |
RecognizeLine(BufferedImage image_)
Recognizes image that contains single line of text.
|
String |
RecognizeLine(String fullPath)
Recognizes image that contains single line of text.
|
ArrayList<RecognitionResult> |
RecognizeMultiplePages(ArrayList<String> files,
RecognitionSettings settings)
Recognizes multiple images from ArrayList.
|
ArrayList<RecognitionResult> |
RecognizeMultiplePages(String path,
RecognitionSettings settings)
Recognizes multiple images packed in ZIP archive or from folder.
|
String |
RecognizePage(BufferedImage image)
Recognizes text on image.
|
String |
RecognizePage(BufferedImage image_,
ArrayList<Rectangle> boxes_)
Recognizes text on image.
|
String |
RecognizePage(BufferedImage image,
boolean autoSkew)
Recognizing image with automatic detection of text areas and ability to
disable image skew correction.
|
RecognitionResult |
RecognizePage(BufferedImage image_,
RecognitionSettings settings)
Recognizes image with the ability to specify
|
String |
RecognizePage(String fullPath)
Recognizes text on image.
|
String |
RecognizePage(String fullPath,
ArrayList<Rectangle> boxes_)
Recognizes text on image.
|
String |
RecognizePage(String fullPath,
boolean autoSkew)
Recognizing image with automatic detection of text areas and ability to
disable image skew correction.
|
RecognitionResult |
RecognizePage(String fullPath,
RecognitionSettings settings)
Recognizes image with the ability to specify
|
String |
RecognizePageFromUri(String uri)
Recognizes text on image provided by URI link.
|
RecognitionResult |
RecognizePageFromUri(String uri,
RecognitionSettings settings)
Recognizes text on image provided by URI link.
|
public AsposeOCR()
AsposeOCR(String)public AsposeOCR(String alphabet)
alphabet - Narrow alphabet for recognition.AsposeOCR()public double CalcSkewImage(String fullPath) throws IOException
fullPath - Path to image.IOException - if file not found.public double CalcSkewImage(BufferedImage image) throws IOException
image - BufferedImage instance.IOException - if file not found.public double CalcSkewImageFromUri(String uri) throws IOException
uri - URI link to the image.IOException - if file not found.public BufferedImage PreprocessImage(String fullPath, PreprocessingFilter filters)
fullPath - Full path to the image.filters - Image optimization filters @see PreprocessingFilterpublic BufferedImage PreprocessImage(BufferedImage image, PreprocessingFilter filters)
image - Source BufferedImage.filters - Image optimization filters @see PreprocessingFilterpublic String RecognizePage(String fullPath) throws IOException
fullPath - Path to image.IOException - if file not found.public String RecognizePage(String fullPath, boolean autoSkew) throws IOException
fullPath - Path to the image.autoSkew - Enable automatic image skew correction.IOException - if file not found.public String RecognizePage(String fullPath, ArrayList<Rectangle> boxes_) throws IOException
fullPath - Path to image.boxes_ - List of areas to recognize.IOException - if file not found.public RecognitionResult RecognizePage(String fullPath, RecognitionSettings settings) throws IOException
fullPath - Path to image.settings - Recognition settings.IOException - if file not found.Support for GIF, PNG, JPEG, BMP
and WBMP.,
RecognitionResult.RecognitionResult()public String RecognizeLine(String fullPath) throws IOException
fullPath - Path to the image.IOException - if file not found.public String RecognizePage(BufferedImage image) throws IOException
image - Source BufferedImage.IOException - if file not found.public String RecognizePage(BufferedImage image, boolean autoSkew) throws IOException
image - BufferedImage instance.autoSkew - Enable automatic image skew correction.IOException - if file not found.public String RecognizePage(BufferedImage image_, ArrayList<Rectangle> boxes_) throws IOException
image_ - BufferedImage instance.boxes_ - List of areas to recognize.IOException - if file not found.public RecognitionResult RecognizePage(BufferedImage image_, RecognitionSettings settings) throws IOException
image_ - BufferedImage instance.settings - Recognition settings.IOException - if file not found.Support for GIF, PNG, JPEG, BMP
and WBMP.,
RecognitionResult.RecognitionResult()public String RecognizeLine(BufferedImage image_)
image_ - BufferedImage instance.public ArrayList<RecognitionResult> RecognizeMultiplePages(String path, RecognitionSettings settings) throws IOException
path - Full path to the zip archive (including .zip extension) or to
the folder with images.settings - Recognition settings.IOException - if file not found.RecognitionSettings.RecognitionSettings(com.aspose.ocr.DocumentRecognitionSettings)public ArrayList<RecognitionResult> RecognizeMultiplePages(ArrayList<String> files, RecognitionSettings settings) throws IOException
files - Full paths to the images.settings - Recognition settings.IOException - if file not found.RecognitionSettings.RecognitionSettings(com.aspose.ocr.DocumentRecognitionSettings)public String RecognizePageFromUri(String uri) throws IOException
uri - URI link to the image.IOException - uri is incorrectpublic RecognitionResult RecognizePageFromUri(String uri, RecognitionSettings settings) throws IOException
uri - URI link to the image.settings - RecognizeSettingsIOException - if file not found.RecognitionSettings.RecognitionSettings(com.aspose.ocr.DocumentRecognitionSettings)public ArrayList<Rectangle> getTextAreas(String fullPath, AreasType areasType, boolean isDetectAreas) throws IOException
fullPath - Path to the image.areasType - Determinate which rectangles to return - line or paragraphs.isDetectAreas - Enable automatic text areas detection.IOException - if file not foundpublic ArrayList<Rectangle> getTextAreas(BufferedImage image_, AreasType areasType, boolean isDetectAreas) throws IOException
image_ - BufferedImage instance.areasType - Determinate which rectangles to return - line or paragraphs.isDetectAreas - Enable automatic text areas detection.IOException - if file not foundpublic String CorrectSpelling(String text, SpellCheckLanguage language)
text - Text for correction.language - Dictionary to use
SpellCheckLanguage.Copyright © 2021 Aspose. All rights reserved.