How to increase the box sizes to encompass the outer lines too

Asked by Dennis

Dear Adam,

I've got the problem, that the boxes in my scans sometimes have a bit of a stronger border which count then as marked area and the algorithm fails completely in detecting the filled boxes:
https://i.imgur.com/itftorU.png

Could I just engross the boxes to encompass the bounding lines as well (and a bit more to counter the slight misalignment) and the problem would probably be solved very easily.

Regards
Dennis

Question information

Language:
English Edit question
Status:
Solved
For:
queXF Edit question
Assignee:
No assignee Edit question
Solved by:
Adam Zammit
Solved:
Last query:
Last reply:
Revision history for this message
Best Adam Zammit (adamzammit) said :
#1

If this happens to all boxes on form, then please adjust the values for these configuration items - choose values that would work better for your form:

define('MULTIPLE_CHOICE_MIN_FILLED','0.75');
define('MULTIPLE_CHOICE_MAX_FILLED','0.4');
define('SINGLE_CHOICE_MIN_FILLED','0.75');
define('SINGLE_CHOICE_MAX_FILLED','0.4');

If it just happens to some of the boxes on the form - then yes a workaround may be to choose a smaller detection area. You can do this by adjusting the size of the boxes in the database (i.e. add a few to tlx,tly and take a few from brx,bry)

eg if tlx = 100, tly = 100 - add 3 to each to 103,103
if brx = 150, bry = 150 - take 3 from each to 147,147

Adam

Revision history for this message
Dennis (3ter) said :
#2

It's nearly all the boxes and I played a little with the filling sensitivity but to no avail.

But the latter idea also sprang to my mind before and I had a look in the code and tried to find the lines where the boxes are drawn just to add and remove a little.

But it's easier I suppose to either manipulate the database or - what's probably even easier for me - to export the banding XML and manipulate that.

Thanks again for your awesome support!
Dennis

Revision history for this message
Dennis (3ter) said :
#3

Thanks Adam Zammit, that solved my question.