AsposeOcr

AsposeOcr class

Main API for Aspose OCR library

public class AsposeOcr

Constructors

Name Description
AsposeOcr() Initializes a new instance of the AsposeOcr class. Empty constructor.
AsposeOcr(string) Initializes a new instance of the AsposeOcr class. Set the allowed characters with alphabet property.

Methods

Name Description
CalculateSkew(MemoryStream) Calculates the skew angle of an image.
CalculateSkew(string) Calculates the skew angle of an image.
CalculateSkewFromUri(string) Calculates the skew angle of an image from URI.
CorrectSpelling(string, SpellCheckLanguage, string) Corrects text (replaces misspelled words).
GetRectangles(MemoryStream, AreasType, bool) Detects text areas on image. Automatic image skew correction is not applied. Support GIF, PNG, JPEG, BMP, TIFF.
GetRectangles(string, AreasType, bool) Detects text areas on image. Automatic image skew correction is not applied. Support GIF, PNG, JPEG, BMP, TIFF.
PreprocessImage(MemoryStream, PreprocessingFilter) Use image preprocessing to improve the accuracy of OCR. Create a list of filters that will be applied to the input image in the order you specify. example to create filters: PreprocessingFilter filters = new PreprocessingFilter { PreprocessingFilter.Invert(), PreprocessingFilter.Threshold(150), PreprocessingFilter.Binarize(), PreprocessingFilter.Rotate(180), PreprocessingFilter.Resize(3000,3000, Aspose.OCR.Filters.InterpolationFilterType.Box), PreprocessingFilter.Scale(6f), PreprocessingFilter.Dilate() }; You don’t need all of them. Set only what you need.
PreprocessImage(string, PreprocessingFilter) Use image preprocessing to improve the accuracy of OCR. Create a list of filters that will be applied to the input image in the order you specify. example to create filters: PreprocessingFilter filters = new PreprocessingFilter { PreprocessingFilter.Invert(), PreprocessingFilter.Threshold(150), PreprocessingFilter.Binarize(), PreprocessingFilter.Rotate(180), PreprocessingFilter.Resize(3000,3000, Aspose.OCR.Filters.InterpolationFilterType.Box), PreprocessingFilter.Scale(6f), PreprocessingFilter.Dilate() }; You don’t need all of them. Set only what you need.
RecognizeDjvu(string, DocumentRecognitionSettings) Recognize text from multi-page DJVU image. Recognizes DJVU file with the ability to specify DocumentRecognitionSettings. Supports DJVU only. Doesn’t supports other image types.
RecognizeImage(MemoryStream) Recognizes text on image.
RecognizeImage(string) Recognizes text on image.
RecognizeImage(MemoryStream, RecognitionSettings) Recognizes text on image. Recognizes image with the ability to specify RecognitionSettings. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizeImage(string, RecognitionSettings) Recognizes text on image.
RecognizeImageFast(MemoryStream) Recognize text on the image with good quality. Doesn’t use skew correction and areas detection. Works in fast mode.
RecognizeImageFast(string) Recognize text on the image with good quality. Doesn’t use skew correction and areas detection. Works in fast mode.
RecognizeImageFromUri(string) Recognizes text on image provided by URI link.
RecognizeImageFromUri(string, RecognitionSettings) Recognizes text on image provided by URI link.
RecognizeLine(MemoryStream) Recognizes image that contains single line of text. Automatic image skew correction is not applied. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizeLine(string) Recognizes image that contains single line of text. Automatic image skew correction is not applied. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizeMultipleImages(List<string>) Recognizes multiple images from list with default settings. Archives and folders are not supported. Max amount of processed images is 20. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizeMultipleImages(string) Recognizes multiple images packed in ZIP archive or from folder with default settings. Nested archives and folders are not supported. Max amount of processed images is 20. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizeMultipleImages(List<string>, RecognitionSettings) Recognizes multiple images from list. Archives and folders are not supported. Max amount of processed images is 20. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizeMultipleImages(string, RecognitionSettings) Recognizes multiple images packed in ZIP archive or from folder. Nested archives and folders are not supported. Max amount of processed images is 20. Supports GIF, PNG, JPEG, BMP, TIFF.
RecognizePdf(MemoryStream, DocumentRecognitionSettings) Recognize text from scanned pdf (extract images). Recognizes pdf file with the ability to specify RecognitionSettings. Supports Scanned PDF only. Doesn’t supports Searchable PDF.
RecognizePdf(string, DocumentRecognitionSettings) Recognize text from scanned pdf (extract images). Recognizes pdf file with the ability to specify RecognitionSettings. Supports Scanned PDF only. Doesn’t supports Searchable PDF.
RecognizeTiff(string, DocumentRecognitionSettings) Recognize text from multi-page TIFF image. Recognizes TIFF file with the ability to specify DocumentRecognitionSettings. Supports TIFF (TIF) only. Doesn’t supports other image types.
static SaveMultipageDocument(MemoryStream, SaveFormat, List<RecognitionResult>) Allows to get multipage document from list of RecognitionResult objects
static SaveMultipageDocument(string, SaveFormat, List<RecognitionResult>) Allows to get multipage document from list of RecognitionResult objects

See Also