Class OrientationConfidence
Inheritance
Namespace: IronOcr
Assembly: IronOcr.dll
Syntax
public class OrientationConfidence : Object
OrientationConfidence is the object that holds the confidence numbers behind a page-orientation decision, the raw scores that decide whether a detected rotation is trustworthy. Where OcrPageOrientationResult reports a single HighConfidence flag, this type carries the values that flag is derived from, plus the threshold those values are tested against, so a workflow can apply its own tolerance instead of relying on the built-in cutoff.
There are two members to work with. ActualConfidence is a float[] of the confidence scores the orientation detector produced, one per candidate the engine weighed. MinConfidence is a settable float threshold: a detection counts as confident only when the actual scores clear it. Raise MinConfidence to demand stronger evidence before auto-rotating a page, or lower it to accept borderline detections in a controlled batch. Read ActualConfidence to inspect or log the scores, and set MinConfidence to tune how strict the orientation check is for a given source of documents.
The detect page rotation how-to covers orientation detection, and the image orientation correction how-to applies the correction to a scan.
Constructors
OrientationConfidence()
Declaration
public OrientationConfidence()
Properties
ActualConfidence
An array of the actual Teseract OSD confidences returned, one per page. If these values are lower than MinConfidence, then the page will not be rotated.
Declaration
public float[] ActualConfidence { get; }
Property Value
| Type | Description |
|---|---|
| System.Single[] |
MinConfidence
A confidence threshold. If this criteria is not met, pages will not be rotated by OSD. MinConfidence of zero means OSD id full automatic and trusted.
Declaration
public float MinConfidence { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |