IOCRService
Wisej.AI.Services.IOCRService
Last updated
Wisej.AI.Services.IOCRService
Last updated
Namespace: Wisej.AI.Services
Assembly: Wisej.AI (3.5.0.0)
Represents an OCR (Optical Character Recognition) service that can scan images and extract text using a specified language.
This interface defines methods for extracting text from images using OCR technology. Implementations of this interface should provide functionality to handle image input in various formats and return the recognized text. The service is also disposable to ensure any system resources are correctly released.
: Gets or sets the language to be used for OCR scanning.
This property allows the user to specify the language in which the text is expected to be recognized. Setting the correct language can improve the accuracy of the OCR process.
Asynchronously scans the provided image and extracts text from it.
image
The image from which text is to be extracted. Ensure the image is valid and accessible.
Returns: . A task that represents the asynchronous operation. The task result contains the text extracted from the image.
This method processes the given image using OCR techniques to extract and return text data. The method is asynchronous and will not block the calling thread. Example usage:
Scans an image from a specified URL to extract text content asynchronously.
imageUrl
The URL of the image to scan. This parameter is required and must not be null or empty.
This method performs an OCR scan on an image located at the specified URL and returns the recognized text. The operation is performed asynchronously, allowing other tasks to execute while the scan is in progress. The URL should directly point to an image file accessible over the network. It supports data base64 URLs. Example usage:
Throws:
Thrown when image is null.
Returns: . A task representing the asynchronous operation, with a result of the extracted text as a string.
Thrown when imageUrl is null or empty.
Represents a default implementation of the interface using Tesseract for Optical Character Recognition (OCR).