@@ -29,7 +29,7 @@ public static void Main()
29
29
var irPage0 = File . ReadAllBytes ( "IR.jpg" ) ;
30
30
var uvPage0 = File . ReadAllBytes ( "UV.jpg" ) ;
31
31
32
- var requestParams = new RecognitionParams ( )
32
+ var requestParams = new RecognitionParams { AlreadyCropped = true }
33
33
. WithScenario ( Scenario . FULL_PROCESS )
34
34
. WithResultTypeOutput ( new List < int >
35
35
{
@@ -43,12 +43,12 @@ public static void Main()
43
43
} )
44
44
. WithLog ( false )
45
45
. WithProcessAuth ( AuthenticityResultType . EXTENDED_MRZ_CHECK | AuthenticityResultType . EXTENDED_OCR_CHECK ) ;
46
-
46
+
47
47
var request = new RecognitionRequest ( requestParams , new List < ProcessRequestImage >
48
48
{
49
49
new ProcessRequestImage ( new ImageDataExt ( whitePage0 ) , Light . WHITE ) ,
50
- new ProcessRequestImage ( new ImageDataExt ( irPage0 ) , Light . IR ) ,
51
- new ProcessRequestImage ( new ImageDataExt ( uvPage0 ) , Light . UV )
50
+ // new ProcessRequestImage(new ImageDataExt(irPage0), Light.IR),
51
+ // new ProcessRequestImage(new ImageDataExt(uvPage0), Light.UV)
52
52
} ) ;
53
53
var api = licenseFromEnv != null
54
54
? new DocumentReaderApi ( apiBaseUrl ) . WithLicense ( licenseFromEnv )
@@ -69,40 +69,22 @@ public static void Main()
69
69
var docOverallStatus = status . OverallStatus == CheckResult . OK ? "valid" : "not valid" ;
70
70
var docOpticalTextStatus = status . DetailsOptical . Text == CheckResult . OK ? "valid" : "not valid" ;
71
71
72
- // text results
73
- var docNumberField = response . Text ( ) . GetField ( TextFieldType . DOCUMENT_NUMBER ) ;
74
- var docNumberVisual = docNumberField . GetValue ( Source . VISUAL ) ;
75
- var docNumberMrz = docNumberField . GetValue ( Source . MRZ ) ;
76
- var docNumberVisualValidity = docNumberField . SourceValidity ( Source . VISUAL ) ;
77
- var docNumberMrzValidity = docNumberField . SourceValidity ( Source . MRZ ) ;
78
- var docNumberMrzVisualMatching = docNumberField . CrossSourceComparison ( Source . MRZ , Source . VISUAL ) ;
79
-
80
- var docType = response . DocumentType ( ) ;
81
-
82
-
83
- var docAuthenticity = response . Authenticity ( ) ;
84
- var docIRB900 = docAuthenticity . IrB900Checks ( ) ;
85
- var docIRB900Blank = docIRB900 ? . ChecksByElement ( SecurityFeatureType . BLANK ) ;
86
-
87
- var docImagePattern = docAuthenticity . ImagePatternChecks ( ) ;
88
- var docImagePatternBlank = docImagePattern ? . ChecksByElement ( SecurityFeatureType . BLANK ) ;
89
-
90
- var docImageQuality = response . ImageQualityChecks ( ) ;
91
-
92
- var info = api . Ping ( ) ;
72
+ var docType = response . DocumentType ( ) ; var info = api . Ping ( ) ;
93
73
// var info = api.Ping(headers: authHeaders);
94
74
95
75
Console . WriteLine ( "-----------------------------------------------------------------" ) ;
96
76
Console . WriteLine ( $ " API Version: { info . Version } ") ;
97
77
Console . WriteLine ( "-----------------------------------------------------------------" ) ;
98
78
Console . WriteLine ( $ " Document Overall Status: { docOverallStatus } ") ;
99
79
Console . WriteLine ( $ " Document Optical Text Status: { docOpticalTextStatus } ") ;
100
- Console . WriteLine ( $ " Document Number Visual: { docNumberVisual } ") ;
101
- Console . WriteLine ( $ " Document Number MRZ: { docNumberMrz } ", docNumberMrz ) ;
102
80
Console . WriteLine ( $ " Document Name: { docType . DocumentName } ") ;
103
- Console . WriteLine ( $ "Validity Of Document Number Visual: { docNumberVisualValidity } ") ;
104
- Console . WriteLine ( $ " Validity Of Document Number MRZ: { docNumberMrzValidity } ") ;
105
- Console . WriteLine ( $ " MRZ-Visual values comparison: { docNumberMrzVisualMatching } ") ;
81
+
82
+ Console . WriteLine ( "-----------------------All Text Fields------------------------" ) ;
83
+
84
+ foreach ( var field in response . Text ( ) . FieldList )
85
+ {
86
+ Console . WriteLine ( $ "Source: { field . FieldName } , Value: { field . Value } ") ;
87
+ }
106
88
Console . WriteLine ( "-----------------------------------------------------------------" ) ;
107
89
108
90
// images results
0 commit comments