Community

recognition does not work as expected Answered

Hi there, 

I am trying to do checkmark recognition for a document. I am using the processFields API with the following parameters: 

<?xml version="1.0" encoding="UTF-8"?>

<document xmlns="http://ocrsdk.com/schema/taskDescription-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ocrsdk.com/schema/taskDescription-1.0.xsd http://ocrsdk.com/schema/taskDescription-1.0.xsd">

<fieldTemplates>

        <checkmark id="checkmarkField">

                <type>empty</type>

                <correctionAllowed>false</correctionAllowed>

        </checkmark>

</fieldTemplates>

<page applyTo="0">       

        <checkmark template="checkmarkField" id="1a1" left="260" top="340" right="470" bottom="550" />

<checkmark template="checkmarkField" id="1a2" left="500" top="340" right="710" bottom="550" />

<checkmark template="checkmarkField" id="1a3" left="740" top="340" right="950" bottom="550" />

<checkmark template="checkmarkField" id="1a4" left="970" top="340" right="1200" bottom="550" />

</page>

</document>

The result returns all unchecked. The black dot should be marked as checked (id: 1a3). I'm only trying the first row for a start... I've attached my source document. What am I doing wrong? Please assist. 

Thanks, Patrick

0

Comments

2 comments

  • Avatar
    patrick.wiederkehr

    After playing around with the example images, I suspect that the black dot in my document is interpreted as 'corrected' (because the circle is filled). Correct?

    0
    Comment actions Permalink
  • Avatar
    Oksana Serdyuk

    Yes, you are right.

    The state of the checkmark is calculated according to the percentage of black pixels in the specified region. It is the smallest for the unchecked checkmark, greater for the checked checkmark and the largest for the corrected checkmark. Therefore for the right recognition result it is essential to:

    • set the checkmark type correctly, because the circle and square type checkmarks have a black frame, which needs to be taken into account when calculating the percentage;
    • specify the exact region of the checkmark, because the percentage of black would be calculated across the whole region, and if some irrelevant areas are included in the region the estimate may deteriorate.
    0
    Comment actions Permalink

Please sign in to leave a comment.