Skip to content

Getting Results

On this page, find out how to get different kinds of text and graphic results. If you know exactly what text data you need, use special functions to get the information.

Text Results

Getting values

Getting values of text fields indicating fieldType:

// Get full name
String surnameAndGivenNames = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES);
// Get date of birth
String dateOfBirth = results.getTextFieldValueByType(eVisualFieldType.FT_DATE_OF_BIRTH);
// Get document number
String documentNumber = results.getTextFieldValueByType(eVisualFieldType.FT_DOCUMENT_NUMBER);
// Get full name
val surnameAndGivenNames = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES)
// Get date of birth
val dateOfBirth = results.getTextFieldValueByType(eVisualFieldType.FT_DATE_OF_BIRTH)
// Get document number
val documentNumber = results.getTextFieldValueByType(eVisualFieldType.FT_DOCUMENT_NUMBER)

Getting values of text fields indicating fieldType, lcid:

// Get full name
String surnameAndGivenNames = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, LCID.BELARUSIAN);
// Get place of birth
String placeOfBirth = results.getTextFieldValueByType(eVisualFieldType.FT_PLACE_OF_BIRTH, LCID.GERMAN_GERMANY);
// Get full name
val surnameAndGivenNames = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, LCID.BELARUSIAN)
// Get place of birth
val placeOfBirth = results.getTextFieldValueByType(eVisualFieldType.FT_PLACE_OF_BIRTH, LCID.GERMAN_GERMANY)

Getting values of text fields indicating fieldType, lcid, source:

// Get full name
String surnameAndGivenNames = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, LCID.BELARUSIAN, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED);
// Get address
String address = results.getTextFieldValueByType(eVisualFieldType.FT_ADDRESS, LCID.LATIN, eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA);
// Get full name
val surnameAndGivenNames = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, LCID.BELARUSIAN, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED)
// Get address
val address = results.getTextFieldValueByType(eVisualFieldType.FT_ADDRESS, LCID.LATIN, eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA)

Getting values of text fields indicating fieldType, lcid, source, original:

// Get surname
String surname = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME, LCID.BELARUSIAN, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, true);
// Get address
String address = results.getTextFieldValueByType(eVisualFieldType.FT_ADDRESS, LCID.LATIN, eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA, true);
// Get surname
val name = results.getTextFieldValueByType(eVisualFieldType.FT_SURNAME, LCID.BELARUSIAN, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, true)
// Get address
val address = results.getTextFieldValueByType(eVisualFieldType.FT_ADDRESS, LCID.LATIN, eRPRM_ResultType.RPRM_RESULT_TYPE_BAR_CODES_TEXT_DATA, true)

Getting values of text fields indicating fieldType, source:

// Get surname
String surname = results.getTextFieldValueByTypeAndSource(eVisualFieldType.FT_SURNAME, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED);
// Get surname
val surname = results.getTextFieldValueByTypeAndSource(eVisualFieldType.FT_SURNAME, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED)

Getting values of text fields indicating fieldType, source, original:

// Get surname
String surname = results.getTextFieldValueByTypeAndSource(eVisualFieldType.FT_SURNAME, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, true);
// Get surname
val surname = results.getTextFieldValueByTypeAndSource(eVisualFieldType.FT_SURNAME, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, true)

You can also go through all instances of text fields and obtain the desired information, e.g.:

for(DocumentReaderTextField textField : results.textResult.fields) {
    String value = results.getTextFieldValueByType(textField.fieldType, textField.lcid);
    Log.d("MainActivity", value + "\n");
}
for (textField in results.textResult.fields) {
    val value = results.getTextFieldValueByType(textField.fieldType, textField.lcid)
    Log.d("MainActivity", value + "\n")
}

Getting statuses

Getting statuses of text fields indicating fieldType (one of eCheckResult values):

// Get status of FT_SURNAME_AND_GIVEN_NAMES
int surnameAndGivenNames = results.getTextFieldStatusByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES);
// Get status of FT_DATE_OF_BIRTH
int dateOfBirth = results.getTextFieldStatusByType(eVisualFieldType.FT_DATE_OF_BIRTH);
// Get status of FT_SURNAME_AND_GIVEN_NAMES
val surnameAndGivenNames = results.getTextFieldStatusByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES)
// Get status of FT_DATE_OF_BIRTH
val dateOfBirth = results.getTextFieldStatusByType(eVisualFieldType.FT_DATE_OF_BIRTH)

Getting statuses of text fields indicating fieldType, lcid (one of eCheckResult values):

// Get status of FT_SURNAME_AND_GIVEN_NAMES
int surnameAndGivenNames = results.getTextFieldStatusByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, LCID.BELARUSIAN);
// Get status of FT_DATE_OF_BIRTH
int dateOfBirth = results.getTextFieldStatusByType(eVisualFieldType.FT_DATE_OF_BIRTH, LCID.LATIN);
// Get status of FT_SURNAME_AND_GIVEN_NAMES
val surnameAndGivenNames = results.getTextFieldStatusByType(eVisualFieldType.FT_SURNAME_AND_GIVEN_NAMES, LCID.BELARUSIAN)
// Get status of FT_DATE_OF_BIRTH
val dateOfBirth = results.getTextFieldStatusByType(eVisualFieldType.FT_DATE_OF_BIRTH, LCID.LATIN)

Getting instances

Getting instances of text fields indicating fieldType:

DocumentReaderTextField textField = results.getTextFieldByType(eVisualFieldType.FT_SURNAME);
val textField: DocumentReaderTextField = results.getTextFieldByType(eVisualFieldType.FT_SURNAME)

Getting instances of graphic fields indicating fieldType, lcid:

DocumentReaderTextField textField = results.getTextFieldByType(eVisualFieldType.FT_SURNAME, LCID.BELARUSIAN);
val textField = results.getTextFieldByType(eVisualFieldType.FT_SURNAME, LCID.BELARUSIAN)

Graphic Results

Getting values

Getting values of graphic fields indicating fieldType:

// Get document image
Bitmap documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE);
// Get portrait image
Bitmap portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT);
// Get document image
var documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE)
// Get portrait image
val portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT)

Getting values of graphic fields indicating fieldType, source:

// Get document image
Bitmap documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE);
// Get document image (uncropped)
Bitmap documentImageUncropped = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_UNCROPPED_IMAGE);
// Get portrait image
Bitmap portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT, eRPRM_ResultType.RPRM_RESULT_TYPE_GRAPHICS);
// Get document image
var documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE)
// Get document image (uncropped)
var documentImageUncropped = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_UNCROPPED_IMAGE)
// Get portrait image
val portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT, eRPRM_ResultType.RPRM_RESULT_TYPE_GRAPHICS)

Getting values of graphic fields indicating fieldType, source, pageIndex:

// Get document image from the second page
Bitmap documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, 1);
// Get portrait image from the first page
Bitmap portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT, eRPRM_ResultType.RPRM_RESULT_TYPE_GRAPHICS, 0);
// Get document image from the second page
var documentImage = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, 1)
// Get portrait image from the first page
val portrait = results.getGraphicFieldImageByType(eGraphicFieldType.GF_PORTRAIT, eRPRM_ResultType.RPRM_RESULT_TYPE_GRAPHICS, 0)

Getting values of graphic fields indicating fieldType, source, pageIndex, light:

// Get document image from the first page with white light
Bitmap documentImageWhite = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, 0, eRPRM_Lights.RPRM_LIGHT_WHITE_FULL);
// Get document image from the first page with UV light
Bitmap documentImageUV = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, 0, eRPRM_Lights.RPRM_LIGHT_UV);
// Get document image from the first page with white light
var documentImageWhite = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, 0, eRPRM_Lights.RPRM_LIGHT_WHITE_FULL)
// Get document image from the first page with UV light
var documentImageUV = results.getGraphicFieldImageByType(eGraphicFieldType.GF_DOCUMENT_IMAGE, eRPRM_ResultType.RPRM_RESULT_TYPE_RAW_IMAGE, 0, eRPRM_Lights.RPRM_LIGHT_UV)

Getting statuses

Getting statuses of graphic fields indicating imageQualityCheckType (one of eCheckResult values):

// Get status of an image's focus
int imageFocus = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_FOCUS);
// Get status of images' glares
int imageGlares = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_GLARES);
// Get status of an image's focus
val imageFocus = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_FOCUS)
// Get status of images' glares
val imageGlares = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_GLARES)

Getting statuses of graphic fields indicating_ imageQualityCheckType, securityFeature _(one of eCheckResult values):

// Get status of images' glares
int blank = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_GLARES, eRPRM_SecurityFeatureType.SECURITY_FEATURE_TYPE_BLANK);
int mrz = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_GLARES, eRPRM_SecurityFeatureType.SECURITY_FEATURE_TYPE_MRZ);
// Get status of images' glares
val blank = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_GLARES, eRPRM_SecurityFeatureType.SECURITY_FEATURE_TYPE_BLANK)
val mrz = results.getQualityResult(eImageQualityCheckType.IQC_IMAGE_GLARES, eRPRM_SecurityFeatureType.SECURITY_FEATURE_TYPE_MRZ)

Getting instances

Getting instances of graphic fields indicating fieldType, source:

DocumentReaderGraphicField graphicField = results.getGraphicFieldByType(eGraphicFieldType.GF_SIGNATURE, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED);
val graphicField: DocumentReaderGraphicField? = results.getGraphicFieldByType(eGraphicFieldType.GF_SIGNATURE, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED)

Getting instances of text fields indicating fieldType, source, pageIndex:

DocumentReaderGraphicField graphicField = results.getGraphicFieldByType(eGraphicFieldType.GF_SIGNATURE, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, 0);
val graphicField: DocumentReaderGraphicField? = results.getGraphicFieldByType(eGraphicFieldType.GF_SIGNATURE, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, 0)

Getting instances of text fields indicating fieldType, source, pageIndex, light:

DocumentReaderGraphicField graphicField = results.getGraphicFieldByType(eGraphicFieldType.GF_SIGNATURE, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, 0, eRPRM_Lights.RPRM_LIGHT_WHITE_FULL);
val graphicField: DocumentReaderGraphicField? = results.getGraphicFieldByType(eGraphicFieldType.GF_SIGNATURE, eRPRM_ResultType.RPRM_RESULT_TYPE_VISUAL_OCR_EXTENDED, 0, eRPRM_Lights.RPRM_LIGHT_WHITE_FULL)
Back to top