# BPMDeviceLib.OCR

Pure C# first-stage OCR engine for controlled printed text.

## Current scope

- Dependency-free main library
- Works on a custom grayscale image abstraction
- Controlled OCR for uppercase A-Z, digits 0-9, and simple symbols: dash, dot, slash, colon
- Template-based recognition
- Intended for clear labels, serial numbers, SKUs, and simple codes

## Not a full document OCR engine yet

This first version is not designed to replace Tesseract or read arbitrary documents. It is a focused foundation for camera/device input scenarios.

## Example

```csharp
using BPMDeviceLib.OCR;
using BPMDeviceLib.OCR.Imaging;

var image = new GrayImage(width, height, grayscalePixels);
var scanner = new OcrScanner(new OcrScannerOptions
{
    Mode = OcrMode.UppercaseLettersDigitsAndSymbols,
    TryInverted = true
});

OcrResult? result = scanner.Scan(image);
if (result is not null)
{
    Console.WriteLine(result.Text);
}
```
