Class OcrParameters
- Namespace
- LMKit.Extraction.Ocr
- Assembly
- LM-Kit.NET.dll
Encapsulates all parameters required to perform OCR on an image, including the raw image data, a display name, and an optional Attachment for contextual metadata.
public sealed class OcrParameters
- Inheritance
-
OcrParameters
- Inherited Members
Examples
// Create OcrParameters from an image buffer
var parameters = new OcrParameters(imageBuffer, name: "invoice.png");
Console.WriteLine($"Name: {parameters.Name}");
Console.WriteLine($"MIME: {parameters.Mime}");
Console.WriteLine($"Image size: {parameters.Image.Width}x{parameters.Image.Height}");
Constructors
- OcrParameters(ImageBuffer, string)
Initializes a new instance of the OcrParameters class with the specified image and an optional display name.
Properties
- Attachment
Gets the optional Attachment associated with the image data. This can be used to carry additional metadata (e.g., file name, source ID) alongside the image being processed.
- Image
Gets the ImageBuffer containing the raw pixel data to be used for OCR.
- ImageData
Gets the raw image data as a PNG-encoded byte array.
- Mime
Gets the MIME type of the image data.
- Name
Gets the display name associated with the image being processed.