karolzak / boxdetect

BoxDetect is a Python package based on OpenCV which allows you to easily detect rectangular shapes like character or checkbox boxes on scanned forms.
MIT License
104 stars 20 forks source link

Failed detection of cropped image #18

Open workingacc123 opened 3 years ago

workingacc123 commented 3 years ago

Hello, 1.Boxdetect works well for the first image Input: image Output: image5

2.Boxdetect fails to detect the checkboxes when used on crop of the image Input: example6 Output: image2

Why does this happen? I want Boxdetect to be able to detect cropped images as well.

karolzak commented 3 years ago

Most likely the kernel size is set too large (or too small) and it's not picking up these other boxes. I advise playing around with different kernel sizes

workingacc123 commented 3 years ago

Ok. Thanks for the reply.