Updating text refiner #11

Merged
ewellenr merged 15 commits from autocropper into main 2023-10-30 00:38:09 -04:00
Owner

Updating everything but the general crop and deskew. That is, updated the background whiteout technique, the text refiner, and line removing.

Updating everything but the general crop and deskew. That is, updated the background whiteout technique, the text refiner, and line removing.
ewellenr added 15 commits 2023-10-30 00:38:03 -04:00
Too hard. High level math. For later.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
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>
Doesn't work well when text is near the edge.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
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>
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>
Exactly as the title says.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Title^^^^

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Just removed unnecessary sorting from the function.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Using just OTSU thresholding with some morphology as it's similar
quality but a lot faster.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
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>
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>
Changed the technique it uses. Seems to work a little better.

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Title^^^

Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Reviewed-on: #10
ewellenr merged commit 64c5e7a1fa into main 2023-10-30 00:38:09 -04:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ewellenr/receipt_indexer#11
No description provided.