I am trying to figure out how to access the confidence of the field that was extracted during ICR (Hand Written) using Java and the ABBYY SDK. How can i get the confidence level information in the sample code of java that has been provided to the Abby SDK. In the below code snippet, I want to print the confidence level in field information also. How can i do that ??

public class FlexiCapture {

 * @param args the command line arguments
public static void main(String[] args) {
    try {
        trace("Load the engine...");
        IEngineLoader engineLoader = Engine.CreateEngineOutprocLoader();           
        IEngine engine = engineLoader.Load(serialNumber, dllPath);

        try {

            trace("Create and configure FlexiCaptureProcessor...");
            IFlexiCaptureProcessor processor = engine.CreateFlexiCaptureProcessor();
            processor.AddDocumentDefinitionFile("F:\\*\\*\\Document Definition 1.fcdot");

            trace("Add image files to recognize...");

            trace("Recognize document...");
            IDocument document = processor.RecognizeNextDocument();
            IDocumentDefinition definition = document.getDocumentDefinition();
            assert (definition != null);
            assert (document.getPages().getCount() == 1);

            IFields fields = document.getSections().Item(0).getChildren();

            for (int i = 0; i < fields.getCount(); i++) {
                IField field = fields.getElement(i);
                trace(field.getName() + ": "
                        + (field.getValue() != null ? field.getValue().getAsString() : "."));

        } finally {

    } catch (Exception ex) {
        trace("Exception: " + ex.getMessage());

private static void trace(String txt) {

private static final String samplesFolder;
static private String serialNumber;
static private String dllPath;

static {
    //samplesFolder = "..\\";
    try {
        FileInputStream file = new FileInputStream("C:\\Users\\*\\Documents\\NetBeansProjects\\SampleConfig\\SamplesConfig.txt");
        BufferedReader reader = new BufferedReader(new InputStreamReader(file));
        serialNumber = reader.readLine();
        dllPath = reader.readLine();
    } catch (java.io.IOException e) {


asked 24 Jul '16, 08:37

Shaown's gravatar image



The value of recognition confidence of a character or a character variant is accessible through the CharConfidence property of the CharParams (this object allows you to access the parameters of a single character in recognized text) or the RecognizedCharacterInfo objects (this object represents the variant of the character recognition).

Recognition confidence of a character variant is a numerical estimate of the probability that the image does in fact represent this character. However, confidence is not guaranteed to be a positive number. We would like to note that the only reliable use of confidence is to compare several variants for one image. More information can be found in the Help file: Guided Tour→Advanced Techniques→Working with Recognition Variants.


answered 15 Aug '16, 16:42

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 24 Jul '16, 08:37

Seen: 631 times

Last updated: 15 Aug '16, 16:42

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal