Adjusting/improving line removal #12

Merged
ewellenr merged 18 commits from autocropper-test into autocropper 2023-10-30 14:50:00 -04:00

18 Commits

Author SHA1 Message Date
0c6187619e Fixing the line removal.
It use to leave little scraps of the line. Adjusted it so it doesn't.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-30 14:49:05 -04:00
825e8f75cb Merge branch 'main' of ssh://ssh.git.ewellenr.ca:2222/ewellenr/receipt_indexer into autocropper-test 2023-10-30 10:16:50 -04:00
64c5e7a1fa Merge pull request 'Updating text refiner' (#11) from autocropper into main
Reviewed-on: #11
2023-10-30 00:38:08 -04:00
95a922ce84 Need to fix Python auto-formatting
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-30 00:13:52 -04:00
4a8917bb84 Tiny bit of cleanup after text clarification
Title^^^

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-29 23:50:38 -04:00
fa57b17169 Updated text clarifier
Changed the technique it uses. Seems to work a little better.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-29 23:43:51 -04:00
e77b2a31be Updating text clarifier again
Just adding a little bit of complexity to try and remove some of the
random clumps and spots that appear.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-29 00:56:58 -04:00
23aaae51a2 Fixing whitedbackground with inpaint.
The mask used for inpainting wasn't correct (it seems).
Updated it to use the correct mask for inpainting.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 18:52:27 -04:00
38eded961e Updated text clarifier
Using just OTSU thresholding with some morphology as it's similar
quality but a lot faster.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 18:44:49 -04:00
651309a6cb Small adjustment to bruteforce rect processing.
Just removed unnecessary sorting from the function.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 13:53:20 -04:00
b32da17431 Quick line remover cleanup.
Title^^^^

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 13:51:43 -04:00
d83ba20d9a Removing horizontal and vertical lines from receipt
Exactly as the title says.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 13:45:38 -04:00
ad3c748e35 Updated textClarifying function for new background whiteout
As the title says but also adjusted the demoing and specle
thresholding functions so that they work a bit better.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 13:42:24 -04:00
bf262d9200 Fixed edge merging from background whiteout.
Instead of bluring the edge, now I used inpainting
to use the page colour to fill in the background so it's uniform.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 13:32:16 -04:00
df27778a88 Blurring the edge of background whiteout
Doesn't work well when text is near the edge.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-28 13:22:01 -04:00
2d40ca2455 Merge branch 'main' of ssh://ssh.git.ewellenr.ca:2222/ewellenr/receipt_indexer into autocropper-test 2023-10-27 11:36:34 -04:00
a3a6fe9474 Fixing background whiting out.
Whites out the background pretty well. Changed it
to an adaptive threshold first and then use contours to get a mask.
Also using morphology to clean up said mask.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-26 21:50:08 -04:00
031313dba0 First testing steps towards dewarping.
Too hard. High level math. For later.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
2023-10-24 11:48:48 -04:00