Ocrx.Contracts
2.4.1
dotnet add package Ocrx.Contracts --version 2.4.1
NuGet\Install-Package Ocrx.Contracts -Version 2.4.1
<PackageReference Include="Ocrx.Contracts" Version="2.4.1" />
<PackageVersion Include="Ocrx.Contracts" Version="2.4.1" />
<PackageReference Include="Ocrx.Contracts" />
paket add Ocrx.Contracts --version 2.4.1
#r "nuget: Ocrx.Contracts, 2.4.1"
#:package Ocrx.Contracts@2.4.1
#addin nuget:?package=Ocrx.Contracts&version=2.4.1
#tool nuget:?package=Ocrx.Contracts&version=2.4.1
OCRX.Contracts
The wire contract between the OCRX engine and its plugins: the generated
Protocol Buffers code for CaptureEngineService (Track / ReadRoi / DumpFrame / GetStatus),
plus the pure types both sides need in order to agree on what a region and a reading are.
Most plugin authors reference this only for RoiRect and the OCR/pixel result types — the rest of
the surface is reached through Ocrx.Sdk, which is what a plugin should be written against. A
plugin that names a generated proto type is a plugin that has to be recompiled when the wire
changes.
Install
dotnet add package Ocrx.Contracts
Usually transitively, via Ocrx.Sdk.
The first OCRX package train is version 2.0.0.
What is in it
| Type | Role |
|---|---|
RoiRect |
A region in reference space (2560x1440). What a plugin declares. |
RoiScaler |
Maps reference space to frame space, one way only. The engine applies it; a plugin never maps a reported rect back. |
OcrRegionResult, OcrLineInfo, OcrWordInfo |
An OCR reading, with per-word geometry for column-shaped UI. |
PixelPatchSampler |
CPU-side BGRA sampling over a small pixel region — colour probes. |
WireLimits |
The budgets a payload must stay inside (max pixel bytes, default/clamped OCR scale). |
ProtocolVersion |
The integer version the handshake negotiates, distinct from any package version. |
PipeContract |
The default named-pipe name. |
Plain net10.0 and deliberately WinRT-free: a plugin referencing this must never gain a dependency
on the capture stack.
Documentation
docs/PROTOCOL.md
— transport, handshake, version policy, coordinate spaces. Changes to protos/capture.proto are
lint- and breaking-change-checked by buf in CI.
| Product | Versions 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. |
-
net10.0
- Google.Protobuf (>= 3.35.1)
- Grpc.Core.Api (>= 2.83.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Ocrx.Contracts:
| Package | Downloads |
|---|---|
|
Ocrx.Sdk
Client SDK for writing Ocrx plugins. Implement IOcrxPlugin — a name, a set of screen regions, and what to do with one frame's OCR results — and hand it to OcrxPluginHost, which owns connecting, subscribing, reconnecting, and shutdown. |
|
|
Ocrx.Sdk.Testing
Testing companion to Ocrx.Sdk: build engine-shaped ticks with TickDataBuilder, substitute the host's services with FakePluginServices, and run replay-parity tests against a real capture engine with ReplayHarness. |
GitHub repositories
This package is not used by any popular GitHub repositories.