14 Commits (37483148c83dd51c6f77b3e1549d57136ff79f2c)

Author SHA1 Message Date
Eric Ihli 6891fc9990 Add example image and csv output
Give more code blocks names
5 years ago
Eric Ihli 4eca593944 Remove unused files, finish refactor of structure 5 years ago
Eric Ihli b911f87126 Refactor extract_cells into module 5 years ago
Eric Ihli b9f088cf92 Refactor table extraction into module 5 years ago
Eric Ihli 98ef6ffd85 Refactor utilities to modules
Rather than have them all tangled into __main__. This makes the package
more usable as python modules rather than just a command line utility.
5 years ago
Eric Ihli bea192678e Fix bug picking up noise in detecting contours 5 years ago
Eric Ihli 54511b9a1f Fix bugs and improve accuracy
Files in the ocr_to_csv module need to be named in a certain way.
Specify that and fix a bug, we need to have them sorted
lexicographically.

Don't dilate the characters in a cell in order to make a contiguous set
of pixels that we can find a contour around. The problem with that is
that you sometimes dilate too far and hit an image boundary and can't
erode back in. If a cell wall border was remaining between the text and
the image boundary, well now you're keeping that border line in the
image. (Unless you remove it some other way. So that might be a valid
option in the future.) The method we're using now instead is to group
all contours together and create a bounding box around all of them. The
problem with that is if there is any noise at all outside the text,
we're grabbing it. Before, we were dilating and taking the largest
contour, so we weren't including that noise. And we can't get rid of the
noise with opening morph because it's sometimes pretty big noise and
opening any bigger distorts the text so much that we lose accuracy in
finding those boundaries.

Also adds a shell script to simplify the plumbing of all these modules.
5 years ago
Eric Ihli aa900de4e7 Use cleaner filenames for intermediate files 5 years ago
Eric Ihli e49fffa5a7 Add module for outputting csv from parsed table
Make cell extraction a little more accurate.
5 years ago
Eric Ihli de398f73c2 Add ocr_image module 5 years ago
Eric Ihli f77425fd9e Remove misnamed module 5 years ago
Eric Ihli 96497d7327 Add doc for shell script to parse text from table
Add notes for improving accuracy.
5 years ago
Eric Ihli 32c62fd773 Add script to ocr individual cells 5 years ago
Eric Ihli 78e9cdb3f5 Add gitignore, rename modules, remove unused code 5 years ago