image2csv
image2csv copied to clipboard
Pre-processing enhancement
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.
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.
I tested the clear border function idea : it turns out that Nitish9711 implemented this function for his projet, and it does a great job !
The only problem is that it does not work when the number is inside a full grid: