AuroraScienceHub.Framework.Ocr 10.1.0

Prefix Reserved
dotnet add package AuroraScienceHub.Framework.Ocr --version 10.1.0
                    
NuGet\Install-Package AuroraScienceHub.Framework.Ocr -Version 10.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AuroraScienceHub.Framework.Ocr" Version="10.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuroraScienceHub.Framework.Ocr" Version="10.1.0" />
                    
Directory.Packages.props
<PackageReference Include="AuroraScienceHub.Framework.Ocr" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AuroraScienceHub.Framework.Ocr --version 10.1.0
                    
#r "nuget: AuroraScienceHub.Framework.Ocr, 10.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AuroraScienceHub.Framework.Ocr@10.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AuroraScienceHub.Framework.Ocr&version=10.1.0
                    
Install as a Cake Addin
#tool nuget:?package=AuroraScienceHub.Framework.Ocr&version=10.1.0
                    
Install as a Cake Tool

AuroraScienceHub.Framework.Ocr

Optical Character Recognition (OCR) library based on Tesseract for extracting text from images.

Overview

Simple interface for performing OCR operations on images using the Tesseract engine. Supports full image text extraction and region-specific text recognition.

Key Features

  • Text Extraction - Extract text from images using Tesseract
  • Region-Based OCR - Read text from specific image regions
  • Multi-Language Support - Support for multiple languages via tessdata
  • Easy Integration - Simple dependency injection setup

Installation

dotnet add package AuroraScienceHub.Framework.Ocr

Prerequisites

Tesseract Installation

  • Linux: sudo apt update && sudo apt install libleptonica-dev libtesseract-dev
  • macOS: brew install leptonica tesseract
  • Windows: Download from Tesseract at UB Mannheim or choco install tesseract

Language Data

Place .traineddata files in ./tessdata folder. Download from tessdata repository.

Usage

Basic Setup

builder.Services.AddOcrServices();

Extract Text from Image

public class DocumentService
{
    private readonly IImageTextReader _textReader;

    public DocumentService(IImageTextReader textReader)
    {
        _textReader = textReader;
    }

    public string ExtractText(byte[] imageBytes)
    {
        return _textReader.ReadText(imageBytes);
    }

    public string ExtractFromRegion(byte[] imageBytes)
    {
        var region = new Rectangle(x: 100, y: 50, width: 200, height: 30);
        return _textReader.ReadText(imageBytes, region);
    }
}

API

public interface IImageTextReader
{
    string ReadText(byte[] imageBytes);
    string ReadText(byte[] imageBytes, Rectangle rectangle);
}

public class Rectangle
{
    public Rectangle(int x, int y, int width, int height);
}

Troubleshooting

  • Tesseract Not Found: Ensure Tesseract is installed and in PATH
  • Poor Recognition: Improve image quality or use appropriate language data
  • Performance Issues: Process specific regions instead of full images

License

See LICENSE file in the repository root.

  • AuroraScienceHub.Framework.Http - For processing remote images
  • AuroraScienceHub.Framework.Exceptions - Exception handling
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.1.0 48 8/19/2026
10.0.8 101 8/14/2026
10.0.7 103 8/11/2026
10.0.6 88 8/11/2026
10.0.5 143 4/23/2026
10.0.4 125 4/23/2026
10.0.3 130 2/11/2026
10.0.2 126 1/29/2026
10.0.1 233 12/25/2025
10.0.0 450 12/11/2025
9.0.7 430 11/20/2025
9.0.6 197 11/15/2025
9.0.5 142 11/8/2025
9.0.4 162 10/24/2025
9.0.3 226 10/15/2025
9.0.2 205 10/15/2025
9.0.1 201 10/15/2025