Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OK, I've been playing with sturkmen's script with around 10 images (invoices) and here are 2 examples of something that stops the script from getting the right area. If the contour has some long characters (parentheses or even commas) the script doesn't go forward. In other words, the findContours function is very strict.

Now, the question is: Can I ignore 5-10 pixels around the text to get the right contours? I've looked in the opencv manual, but didn't find anything like that at findContours function.

Thank you all again for your time!

First original image:

original1

Script result:

result1

Second original image:

original2

Script result:

result2