Many functions of the Passport Reader system return Document structures as results. The layout of these structures is similar but their exact content depends on the individual functions and the value of some properties. Logically the elements of these structures can be grouped into three levels.
- The base level contains the original sources of the data. These sources are the Image structures and the binary data of rfid files stored in Rfid structures.
- The middle level contains the data of the optical modules, like OCR data and barcode data. These data are computed from the source images.
- The highest level is the document level. In this level the data are handled as parts of a document. These data consist of unformatted recognized data and formatted unified data element parts.
- The value of the Document is the document type id in principle. The document ids are specified in the
PR_DOCUMENT
enumeration.
- The FieldList stores the recognized document fields.
- The Field contains the field id. The field ids are specified in
PR_DOCFIELD
enumeration. - The FieldValue stores the field value. It is usually a string, numeric or binary data.
- The image data of the field can be accessed by the gxImage class. The field images are generated through parsing rfid files or through cutting from the source image by the API.
- The OcrRowList stores the optically read rows, which have OcrRow structures.
- The OcrRow collects OcrChar structures.
- The value of the OcrChar is an ascii or unicode character value.
- The value of the Barcode is the barcode type id. The barcode ids are specified in the
PR_BCTYPE
enumeration. - The BarcodeValue stores the barcode data, depending on its type it can be ASCII string or binary data.
- The RfidFileList stores the binary data stored in the rfid. See Rfid structures for details.
- The ImageList stores the source images. See Image structures for details.
- The WindowFrame is a
gxPG4
structure which is an array of integers and contains coordinates of a frame in micron. - The WindowFullFrame is similar to the WindowFrame, but while the simple frame belongs to the recognized data, the full frame belongs to the previously selected recognition area of the field.
- The ImageFrame is a
gxPG4
structure which is an array of integers and contains coordinates of a frame in 1/16 pixels.
- The Checksum is an enumerated value indicates the correctness of the field value. Usually it is calculated by a field specific algorithm. The exact values are specified in the
PR_CHKERR
enumeration.
The Checksum of Barcode differs from this, its values are: -1 (unknown), 0 (failed), 1 (checked). - The Confidence value is a number between 0 and 1000. Confidence is similar but not equivalent to probability.
- The OQCA is the Ocr Quality Assurance Alert. Its value is a combination of values declared in
PR_OCR_QUALITY_ALERT
enumeration. The measured values of the quality check are described in the next section.
- The Oqc Width gives the width of the element in micron.
- The Oqc Height gives the height of the element in micron.
- The Oqc HangOut shows how much an element hangs out from its standard location in micron.
- The Oqc Distance shows the distance of the element from its neighbour in micron.
- The Oqc Rotation shows the difference in rotation between the element and its parent in rad.
- The Oqc Contrast is a measured contrast value of the character. The value is between 0 and 1000.
- The RfidDir is present only in case of parsing rfid data from the EF.COM data. Its bits indicate the presence of the RFID files.
Document structure
There are several functions involving Optical Recognition in the Passport Reader system.
The
Recognize function is the most complex one. It recognizes the previously defined document types, and returns full result.
The
GetMrz function reads
ICAO standard
MRZ only. It runs faster than the
Recognize function in simpler case. If the mrz quality check option is used, the
GetMrz gives back the
Ocr Quality Assurance elements.
The
GetOcr function can be used to read data without document processing. With this function the Field elements are by-passed and the Ocr elements are computed. This function can be used with ocr parameters. Without these parameters the document will be read as one of the defined document types. The ocr parameters have to be organized into
Ocr Parameters structure.
The
GetBarcode function reads barcodes. If the structure of the read barcode is recognized, then it will be parsed into Field elements too. E.g. the parsing of personal data found in
AAMVA barcodes.