@@ -29,7 +29,7 @@ public static void Main()
2929 var irPage0 = File . ReadAllBytes ( "IR.jpg" ) ;
3030 var uvPage0 = File . ReadAllBytes ( "UV.jpg" ) ;
3131
32- var requestParams = new RecognitionParams ( )
32+ var requestParams = new RecognitionParams { AlreadyCropped = true }
3333 . WithScenario ( Scenario . FULL_PROCESS )
3434 . WithResultTypeOutput ( new List < int >
3535 {
@@ -43,12 +43,12 @@ public static void Main()
4343 } )
4444 . WithLog ( false )
4545 . WithProcessAuth ( AuthenticityResultType . EXTENDED_MRZ_CHECK | AuthenticityResultType . EXTENDED_OCR_CHECK ) ;
46-
46+
4747 var request = new RecognitionRequest ( requestParams , new List < ProcessRequestImage >
4848 {
4949 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)
5252 } ) ;
5353 var api = licenseFromEnv != null
5454 ? new DocumentReaderApi ( apiBaseUrl ) . WithLicense ( licenseFromEnv )
@@ -69,40 +69,22 @@ public static void Main()
6969 var docOverallStatus = status . OverallStatus == CheckResult . OK ? "valid" : "not valid" ;
7070 var docOpticalTextStatus = status . DetailsOptical . Text == CheckResult . OK ? "valid" : "not valid" ;
7171
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 ( ) ;
9373 // var info = api.Ping(headers: authHeaders);
9474
9575 Console . WriteLine ( "-----------------------------------------------------------------" ) ;
9676 Console . WriteLine ( $ " API Version: { info . Version } ") ;
9777 Console . WriteLine ( "-----------------------------------------------------------------" ) ;
9878 Console . WriteLine ( $ " Document Overall Status: { docOverallStatus } ") ;
9979 Console . WriteLine ( $ " Document Optical Text Status: { docOpticalTextStatus } ") ;
100- Console . WriteLine ( $ " Document Number Visual: { docNumberVisual } ") ;
101- Console . WriteLine ( $ " Document Number MRZ: { docNumberMrz } ", docNumberMrz ) ;
10280 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+ }
10688 Console . WriteLine ( "-----------------------------------------------------------------" ) ;
10789
10890 // images results
0 commit comments