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

Add more binarization options #3418

Merged
merged 2 commits into from
May 10, 2021
Merged

Conversation

amitdo
Copy link
Collaborator

@amitdo amitdo commented May 7, 2021

Use functions from Leptonica to provide more binarization options. The new options are: 1) Adaptive Otsu and 2) Sauvola (Tiled).

Use functions from Leptonica to provide more binarization options. The new options are: 1) Adaptive Otsu and 2) Sauvola (Tiled) .
@egorpugin
Copy link
Contributor

In general, what is the recommendation about image preprocessing?
User should pass the best prepared b/w image to tess?
Assuming tess does not know how to prepare b/w in the best way.

If it's so, do we really need to impove details on binarization methods etc.?

@amitdo
Copy link
Collaborator Author

amitdo commented May 7, 2021

See #3083.

Fixes #3377 (with Sauvola).

@amitdo
Copy link
Collaborator Author

amitdo commented May 7, 2021

Also fixes #1990.

@amitdo
Copy link
Collaborator Author

amitdo commented May 8, 2021

@egorpugin, @stweil

Can you merge this PR and then do the changes related to the operator overloading?

@egorpugin
Copy link
Contributor

No. Why?

@amitdo
Copy link
Collaborator Author

amitdo commented May 8, 2021

  1. Why not? My patch works well and fixes reported issues. What's the problem to do any syntax improvement later?
  2. I couldn't make it work (compile) with the new operator.

@amitdo
Copy link
Collaborator Author

amitdo commented May 8, 2021

To be clear, I dont mean that you undo your changes to master.

@amitdo
Copy link
Collaborator Author

amitdo commented May 9, 2021

I updated the PR. enum class is now used instead of plain enum.

The CI failures are not related to this PR.

@egorpugin egorpugin closed this May 9, 2021
@egorpugin egorpugin reopened this May 9, 2021
@egorpugin egorpugin merged commit e7c01a6 into tesseract-ocr:master May 10, 2021
@amitdo
Copy link
Collaborator Author

amitdo commented May 10, 2021

Egor, feel free to get rid of a().

egorpugin added a commit that referenced this pull request May 10, 2021
@amitdo amitdo deleted the thresholder branch May 10, 2021 12:33
Copy link
Contributor

@bertsky bertsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

For robust quality, I think we need to optimise some details for these algorithms.

src/ccmain/thresholder.cpp Show resolved Hide resolved
src/ccmain/thresholder.cpp Show resolved Hide resolved
@il--ya

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants