Aspose.OCR Image Text Finder for .NET
The Aspose.OCR Image Text Finder for .NET enables developers to search for text in single raster images and compare text between two images. The licensed plugin scope is limited to the text-search and image-text comparison APIs listed below.
Installation and Setup
Getting started takes just a few steps:
- Install the Aspose.OCR package from NuGet or download the distributive. See the Installation Guide .
- Configure metered licensing before any OCR operations. Use the Metered Licensing instructions to apply the licensed plugin functionality.
- Reference the
Aspose.OCRnamespace in your .NET project.
Supported Plugin Options
The plugin license enables these API capabilities:
| API area | Supported options |
|---|---|
| Licensed methods | ImageHasText, ImageTextDiff, CompareImageTexts |
| Input type | InputType.SingleImage |
| Area detection modes | DetectAreasMode.TABLE, DetectAreasMode.CURVED_TEXT, DetectAreasMode.LEAN, DetectAreasMode.MULTICOLUMN, DetectAreasMode.UNIVERSAL |
| Search options | String search with optional ignoreCase; regular expression search with Regex; text similarity through CompareImageTexts; text difference score through ImageTextDiff |
| Preprocessing | AutoSkewFilter through the autoSkew argument on supported text-search APIs |
| Language selection | RecognitionSettings.Language supports 154 Language enum values, including Auto, Multilanguage, and Universal |
| Common public recognition settings | RecognizeSingleLine, UpscaleSmallFont, LinesFiltration, ThreadsCount, AutomaticColorInversion |
| Plugin license restriction | Custom RecognitionAreas are not included; keep RecognitionAreas empty |
General preprocessing filter pipelines, vector image input, PDF input, multipage input, export formats, font extraction, visual diff overlays, and table/form recognition APIs are not listed for this plugin in the license service.
Supported Workflow
Use a single image file path with ImageHasText, ImageTextDiff, or CompareImageTexts. Pass RecognitionSettings when you need a supported DetectAreasMode, threading, line filtering, single-line recognition, small-font upscaling, or automatic color inversion.
Example: Search Text in an Image
Aspose.OCR.Metered metered = new Aspose.OCR.Metered();
metered.SetMeteredKey("PublicKey", "PrivateKey");
// Create AsposeOCR engine
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Load source image
string img1 = "source1.png";
Aspose.OCR.RecognitionSettings recognitionSettings = new Aspose.OCR.RecognitionSettings();
// Search for text string in the image
bool isFound = recognitionEngine.ImageHasText(img1, "Aspose", recognitionSettings);
Console.WriteLine(isFound);Output and Result Handling
Image Text Finder APIs return search and comparison results, such as a Boolean match result, a text difference score, or comparison data between two images. They do not return an OCR document output, so SaveFormat-based document saving with RecognitionResult.Save(...) or OcrOutput.Save(...) does not apply to this plugin.
If you need to export recognized content to Text, Pdf, Docx, Xlsx, Json, Xml, HTML, EPUB, RTF, HOCR, Md, or Csv, use one of the recognition plugins that returns RecognitionResult or OcrOutput.
Tips and Best Practices
- Pre-analyze image DPI and quality for optimal recognition.
- Use regex searches sparingly on very large sets.
- Use
autoSkewfor skewed images when calling APIs that expose this argument. - Set
ThreadsCountto1on low-powered machines to reduce CPU pressure; increaseThreadsCounton multi-core systems to speed up repeated comparisons. - Always update to the latest version for improved recognition models.
Explore Free Online Tool
Test the functionality instantly using the Aspose.OCR Image Text Finder App . No installation or coding required.
Conclusion
The Aspose.OCR Image Text Finder for .NET Plugin is a focused solution for image text search and image text comparison with the licensed APIs listed above.