Question
How to get accuracy as an output value in FlexiCapture 12?
Answer
The following steps should be applied to get the accuracy as an output field:
- Edit the Document Definition. Add two service fields and one field Quality.
-
Service Field "all" with Data Source "Document recognized symbols count":
Service Field "bad" with Data Source "Document uncertain symbols count"
- And a field "Quality" with a rule:
int all = 0;
int.TryParse(Context.Field("all").Text,out all);
int bad = 0;
int.TryParse(Context.Field("bad").Text,out bad);
int good = all - bad;
Context.Text = System.Math.Round(((float)good / (float)all)*100,2)+"% "+good+" of "+all;
-
Save and publish the document definition. This can not be tested in the document definition editor. A new recognition should be run.
The results could be the following:
Comments
0 comments
Please sign in to leave a comment.