Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-processing enhancement #1

Open
artperrin opened this issue Feb 3, 2021 · 1 comment
Open

Pre-processing enhancement #1

artperrin opened this issue Feb 3, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@artperrin
Copy link
Owner

The pre-processing function of the tool.py file does some image segmentation to each region for Tesseract to identify the region's number. But when the input image has a grid, and fragments of this grid appears on a region, Tesseract generates an error.

error-grid

This trouble forces the user to be carefoul when drawing the first rectangle and setting the offset --- it can be very upsetting.

It seems that the grid could be removed from each regions with some elementary image segmentation using OpenCV.
At the time, I can think of using a clear border function (like imclearborder in MatLab) or trying to detect the grid's lines and remove them.

@artperrin artperrin added the enhancement New feature or request label Feb 3, 2021
@artperrin
Copy link
Owner Author

I tested the clear border function idea : it turns out that Nitish9711 implemented this function for his projet, and it does a great job !

killborder

The only problem is that it does not work when the number is inside a full grid:

killborderNo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant