Getting results

This page covers the description of how to get various kinds of results

Text Results

If you know exactly what text data are needed, the fastest way to get information is to use special functions.

Getting values

Getting values of text fields indicating fieldType:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get full name
var surnameAndGivenNames = results.GetTextFieldValueByType(EVisualFieldType.FtSurnameAndGivenNames);
// Get date of birth
var dateOfBirth = results.GetTextFieldValueByType(EVisualFieldType.FtDateOfBirth);
// Get document number
var documentNumber = results.GetTextFieldValueByType(EVisualFieldType.FtDocumentNumber);
Xamarin.iOS
// Get full name
var surnameAndGivenNames = results.GetTextFieldValueByType(RGLFieldType.Surname_And_Given_Names);
// Get date of birth
var dateOfBirth = results.GetTextFieldValueByType(RGLFieldType.Date_of_Birth);
// Get document number
var documentNumber = results.GetTextFieldValueByType(RGLFieldType.Document_Number);

Getting values of text fields indicating fieldType, lcid:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get full name
var surnameAndGivenNames = results.GetTextFieldValueByType(EVisualFieldType.FtSurnameAndGivenNames, LCID.Belarusian);
// Get place of birth
var placeOfBirth = results.GetTextFieldValueByType(EVisualFieldType.FtPlaceOfBirth, LCID.GermanGermany);
Xamarin.iOS
// Get full name
var surnameAndGivenNames = results.GetTextFieldValueByType(RGLFieldType.Surname_And_Given_Names, Rgllcid.Belarusian);
// Get place of birth
var placeOfBirth = results.GetTextFieldValueByType(RGLFieldType.Place_of_Birth, Rgllcid.GermanGermany);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get full name
var surnameAndGivenNames = results.GetTextFieldValueByType(EVisualFieldType.FtSurnameAndGivenNames, LCID.Belarusian, ERPRM_ResultType.RprmResultTypeVisualOcrExtended);
// Get address
var address = results.GetTextFieldValueByType(EVisualFieldType.FtAddress, LCID.Latin, ERPRM_ResultType.RprmResultTypeBarCodesTextData);
Xamarin.iOS
// Get full name
var surnameAndGivenNames = results.GetTextFieldValueByType(RGLFieldType.Surname_And_Given_Names, Rgllcid.Belarusian, RGLResultType.VisualOCRExtended);
// Get address
var address = results.GetTextFieldValueByType(RGLFieldType.Address, Rgllcid.Latin, RGLResultType.BarCodesTextData);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get surname
var surname = results.GetTextFieldValueByType(EVisualFieldType.FtSurname, LCID.Belarusian, ERPRM_ResultType.RprmResultTypeVisualOcrExtended, true);
// Get address
var address = results.GetTextFieldValueByType(EVisualFieldType.FtAddress, LCID.Latin, ERPRM_ResultType.RprmResultTypeBarCodesTextData, true);
Xamarin.iOS
// Get surname
var name = results.GetTextFieldValueByType(RGLFieldType.Surname, Rgllcid.Belarusian, RGLResultType.VisualOCRExtended, true);
// Get address
var address = results.GetTextFieldValueByType(RGLFieldType.Address, Rgllcid.Latin, RGLResultType.BarCodesTextData, true);

Getting values of text fields indicating fieldType, source:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get surname
var surname = results.GetTextFieldValueByTypeAndSource(EVisualFieldType.FtSurname, ERPRM_ResultType.RprmResultTypeVisualOcrExtended);
Xamarin.iOS
// Get surname
var surname = results.GetTextFieldValueByType(RGLFieldType.Surname, RGLResultType.VisualOCRExtended);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get surname
var surname = results.GetTextFieldValueByTypeAndSource(EVisualFieldType.FtSurname, ERPRM_ResultType.RprmResultTypeVisualOcrExtended, true);
Xamarin.iOS
// Get surname
var surname = results.GetTextFieldValueByType(RGLFieldType.Surname, RGLResultType.VisualOCRExtended, true);

Getting values of text fields indicating fieldType, original:

Xamarin.iOS
Xamarin.iOS
// Get surname
var surname = results.GetTextFieldValueByType(RGLFieldType.Surname, true);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
foreach (DocumentReaderTextField textField in results.TextResult.Fields)
{
var value = results.GetTextFieldValueByType(textField.FieldType, textField.Lcid);
Log.Debug("MainActivity", value + "\n");
}
Xamarin.iOS
foreach (var textField in results.TextResult.Fields)
{
var value = result.GetTextFieldValueByType(textField.FieldType, textField.Lcid);
Console.WriteLine("Value: {0}", value);
}

Getting statuses

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

Xamarin.Android
Xamarin.Android
// Get status of FT_SURNAME_AND_GIVEN_NAMES
var surnameAndGivenNames = results.GetTextFieldStatusByType(EVisualFieldType.FtSurnameAndGivenNames);
// Get status of FT_DATE_OF_BIRTH
var dateOfBirth = results.GetTextFieldStatusByType(EVisualFieldType.FtDateOfBirth);

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

Xamarin.Android
Xamarin.Android
// Get status of FT_SURNAME_AND_GIVEN_NAMES
var surnameAndGivenNames = results.GetTextFieldStatusByType(EVisualFieldType.FtSurnameAndGivenNames, LCID.Belarusian);
// Get status of FT_DATE_OF_BIRTH
var dateOfBirth = results.GetTextFieldStatusByType(EVisualFieldType.FtDateOfBirth, LCID.Latin);

Getting instances

Getting instances of text fields indicating fieldType:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get a surname instance
DocumentReaderTextField textField = results.GetTextFieldByType(EVisualFieldType.FtSurname);
Xamarin.iOS
// Get a surname instance
var surname = results.GetTextFieldByType(RGLFieldType.Surname);

Getting instances of graphic fields indicating fieldType, lcid:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get a surname instance
DocumentReaderTextField textField = results.GetTextFieldByType(EVisualFieldType.FtSurname, LCID.Russian);
Xamarin.iOS
// Get a surname instance
var surname = results.GetTextFieldByType(RGLFieldType.Surname, Rgllcid.Russian);

Graphic Results

Getting values

Getting values of graphic fields indicating fieldType:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get document image
var documentImage = results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage);
// Get portrait image
var portrait = results.GetGraphicFieldImageByType(EGraphicFieldType.GfPortrait);
Xamarin.iOS
// Get document image
var documentImage = results.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage);
// Get portrait image
var portrait = results.GetGraphicFieldImageByType(RGLGraphicFieldType.Portrait);

Getting values of graphic fields indicating fieldType, source:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get document image
var documentImage = results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage, ERPRM_ResultType.RprmResultTypeRawImage);
// Get document image (uncropped)
var documentImageUncropped = results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage, ERPRM_ResultType.RprmResultTypeRawUncroppedImage);
// Get portrait image
var portrait = results.GetGraphicFieldImageByType(EGraphicFieldType.GfPortrait, ERPRM_ResultType.RprmResultTypeGraphics);
Xamarin.iOS
// Get document image
var documentImage = results.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage, RGLResultType.RawImage);
// Get document image (uncropped)
var documentImageUncropped = results.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage, RGLResultType.RawUncroppedImage);
// Get portrait image
var portrait = results.GetGraphicFieldImageByType(RGLGraphicFieldType.Portrait, RGLResultType.Graphics);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get document image from the second page
var documentImage = results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage, ERPRM_ResultType.RprmResultTypeRawImage, 1);
// Get portrait image from the first page
var portrait = results.GetGraphicFieldImageByType(EGraphicFieldType.GfPortrait, ERPRM_ResultType.RprmResultTypeGraphics, 0);
Xamarin.iOS
// Get document image from the second page
var documentImage = results.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage, RGLResultType.RawImage, 1);
// Get portrait image from the first page
var portrait = results.GetGraphicFieldImageByType(RGLGraphicFieldType.Portrait, RGLResultType.Graphics, 0);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
// Get document image from the first page with white light
var documentImageWhite = results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage, ERPRM_ResultType.RprmResultTypeRawImage, 0, ERPRM_Lights.RprmLightWhiteFull);
// Get document image from the first page with UV light
var documentImageUV = results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage, ERPRM_ResultType.RprmResultTypeRawImage, 0, ERPRM_Lights.RprmLightUv);
Xamarin.iOS
// Get document image from the first page with white light
var documentImageWhite = results.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage, RGLResultType.RawImage, 0, RGLGraphicFieldLight.White);
// Get document image from the first page with UV light
var documentImageUV = results.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage, RGLResultType.RawImage, 0, RGLGraphicFieldLight.Uv);

Getting statuses

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

Xamarin.Android
Xamarin.Android
// Get status of an image's focus
var imageFocus = results.GetQualityResult(EImageQualityCheckType.IqcImageFocus);
// Get status of images' glares
var imageGlares = results.GetQualityResult(EImageQualityCheckType.IqcImageGlares);

Getting statuses of graphic fields indicating imageQualityCheckType, securityFeature (one of ECheckResult values):

Xamarin.Android
Xamarin.Android
// Get status of images' glares
var blank = results.GetQualityResult(EImageQualityCheckType.IqcImageGlares, ERPRM_SecurityFeatureType.SecurityFeatureTypeBlank);
var mrz = results.GetQualityResult(EImageQualityCheckType.IqcImageGlares, ERPRM_SecurityFeatureType.SecurityFeatureTypeMrz);

Getting instances

Getting instances of graphic fields indicating fieldType:

Xamarin.iOS
Xamarin.iOS
// Get a documentImage instance
var documentImage = results.GetGraphicFieldByType(RGLGraphicFieldType.DocumentImage);

Getting instances of graphic fields indicating fieldType, source:

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReaderGraphicField graphicField = results.GetGraphicFieldByType(EGraphicFieldType.GfSignature, ERPRM_ResultType.RprmResultTypeVisualOcrExtended);
Xamarin.iOS
var graphicField = results.GetGraphicFieldByType(RGLGraphicFieldType.Signature, RGLResultType.VisualOCRExtended);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReaderGraphicField graphicField = results.GetGraphicFieldByType(EGraphicFieldType.GfSignature, ERPRM_ResultType.RprmResultTypeVisualOcrExtended, 0);
Xamarin.iOS
var graphicField = results.GetGraphicFieldByType(RGLGraphicFieldType.Signature, RGLResultType.VisualOCRExtended, 0);

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

Xamarin.Android
Xamarin.iOS
Xamarin.Android
DocumentReaderGraphicField graphicField = results.GetGraphicFieldByType(EGraphicFieldType.GfSignature, ERPRM_ResultType.RprmResultTypeVisualOcrExtended, 0, ERPRM_Lights.RprmLightWhiteFull);
Xamarin.iOS
var graphicField = results.GetGraphicFieldByType(RGLGraphicFieldType.Signature, RGLResultType.VisualOCRExtended, 0, RGLGraphicFieldLight.White);