Class OcrPassportResult
Result from ReadPassport(OcrInputBase)
Give an access to: Text, Confidence, and PassportInfo.
Inheritance
Implements
Namespace: IronOcr
Assembly: IronOcr.dll
Syntax
public class OcrPassportResult : Object
When a passport read finishes in C#, OcrPassportResult is the object that carries the outcome. IronTesseract.ReadPassport returns one, bundling the raw recognized text, an overall confidence score, and the structured passport fields decoded from the document. It pairs with PassportInfo, which holds the typed fields, while this result wraps that data alongside the plain Text so a workflow can pick whichever view it needs.
The members are read directly off the returned object. PassportInfo is the structured payload, the MRZ and VIZ fields such as surname, passport number, nationality, and dates, ready as typed properties rather than a raw string to parse. Text exposes the recognized text the engine produced, and Confidence reports certainty as a score so low-quality scans can be flagged or retried. For most workflows, read PassportInfo for the parsed fields and check Confidence before relying on them.
The read passport how-to covers the full extraction, and the passport reading example shows the result in code.
Properties
Confidence
OCR statistical accuracy confidence as an average of every character.
1 = 100%, 0 = 0%.
Declaration
public double Confidence { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
PassportInfo
Passport informations decoded from MRZ and VIZ.
MRZ fields: Document type, Surname, Given names, Passport No., Country / IssuingCountryCode, Nationality / NationalityCode, Date of birth, Gender, Date of expiry, Personal number.
VIZ fields (best-effort): Date of issue.
Raw codes: Use IssuingCountryCode / NationalityCode for custom localization instead of the English-mapped Country / Nationality names.
Declaration
public PassportInfo PassportInfo { get; }
Property Value
| Type | Description |
|---|---|
| PassportInfo |
Text
All Ocr texts from OcrInput.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| System.String |