Results
This page covers the description of the DocumentReaderResults class
After scanning process is completed, DocumentReaderResults
instance will be received. Result contains different result types:
chip page index (chipPage). Indicates which page of the document contains RFID chip (0 if there's no page containing). Requires Document Type recognition, otherwise 1 by default;
overall result (overallResult). It's a summary of all results, one of
eCheckResult
enumeration values. If at least one result status was negative, overall result will be negative;count of pages result (morePagesAvailable). Indicates, if document has more pages (count) to be processed (e.g. ID card's front and back side). Requires Document Type recognition, otherwise 0 by default;
RFID result (rfidResult). Result of RFID reading process, one of
eRFID_NotificationAndErrorCodes
;resolution result (highResolution). Indicates, if document is needed with high resolution, false by default;
graphic result (graphicResult);
text result (textResult);
position of document blank result (documentPosition);
position of found Barcode result (barcodePosition);
position of the MRZ area (mrzPosition);
image quality group result (imageQualityGroup);
document type result (documentType);
JSON result (jsonResult);
notification result (documentReaderNotification). Notification data about reading process. Used when reading RFID chip;
RFID session data result (rfidSessionData). Results of work with the SDK within the context of the current communication session with electronic document.
Graphic Result
These parameters are presented in DocumentReaderGraphicResult
class.
Parameter
Description
sourceType
Identifies zone whence data was extracted. eRPRM_ResultType
class contains enumeration values
fieldType
Field logical type, one of eGraphicFieldType
values. Enumeration contains identifiers determining the logical type of the graphic data obtained while reading document filling fields or barcodes
light
Indicates lightning scheme of the graphic field was taken in, one of eRPRM_Lights
fieldRect
Field rectangular area coordinates on the image (for document filling fields reading results RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
)
Text Result
These parameters are presented in DocumentReaderTextResult
class.
Parameter
Description
fieldType
Field logical type, one of eVisualFieldType
values. Enumeration contains identifiers determining the logical type of the text data obtained while reading MRZ, document filling fields and barcodes
fieldName
Title of the fieldType
lcid
ID of language-culture to differentiate one field of the same type from another (for example Belarus Passport Page # 31 – Belarusian and Russian fields of the same type). LCID
enumeration contains available enumeration values
sourceType
Identifies zone whence data was extracted. eRPRM_ResultType
enumeration contains enumeration values
value
Value which was obtained
originalValue
Checks whether a value has been modified or not and returns the original value
boundRect
Field rectangular area coordinates on the image (for document filling fields reading results RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED
)
comparison
Contains a comparison result of all values of the same text field
status
Stores one of eRPRM_FieldVerificationResult
enumeration which indicates verification result of the field
Image Quality Group
These parameters are presented in ImageQualityGroup
class.
Parameter
Description
count
Number of results in the list
result
Overall check result, one of eCheckResult
imageQualityList
Array of single check result pointers, which contains type (check result type, one of EImageQualityCheckType
values), result (check result, one of eCheckResult
values) and featureType (one of eRPRM_SecurityFeatureType
values indicating the area examined)
Document Type Result
These parameters are presented in DocumentReaderDocumentType
class.
Parameter
Description
name
Document type name
documentID
Document type numeric code
ICAOCode
Document issuing country ICAO Code
FDSID
Array of IRS document identifiers
dType
Document type, one of diDocType
enumeration values
dFormat
Document format. Identifiers determine document geometric format according ISO/IEC 7810
dMRZ
Flag for MRZ presence on document
dDescription
Document description text
dYear
Document issue year
dCountryName
Document issuing country name
JSON Result
These parameters are presented in DocumentReaderJsonResult
class.
Parameter
Description
resultType
One of eRPRM_ResultType
enumeration values
lightType
Light scheme
pageIdx
Contains an index of the document page
jsonResult
Entire results in JSON format
Extra Functions
If you know exactly what type of text data you will need to get (see eVisualFieldType
enumeration description), the fastest way to get the information from DocumentReaderResults
instance is use special functions:
// Get full name
String name = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES);
// Get date of birth
String dateOfBirth = results.getTextFieldValueByType(eVisualFieldType.FT_DATE_OF_BIRTH);
Also you can get images from graphic fields by this way:
// Get cropped portrait image
Bitmap portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT);
// Get document front side image
Bitmap documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GT_DOCUMENT_FRONT);
You can go through all text fields, DocumentReaderTextField
instances. DocumentReaderTextField
instance contains different DocumentReaderValue
instances from different sources (MRZ, OCR, Barcode, RFID). So to get values faster you can use getTextFieldValueByType
function:
for(DocumentReaderTextField textField : results.textResult.fields) {
String value = results.getTextFieldValueByType(textField.fieldType, textField.lcid);
}
Last updated
Was this helpful?