-
Couldn't load subscription status.
- Fork 10.3k
implement PrepareDistortedPix as part of DegradeImage #2259
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
Conversation
|
Shree, I don't think mixing the distort & degrade methods is right. Basically, the distort method should be directly called from text2image.cpp. |
| (*boxes)[b].set_right((*boxes)[b].left() + 1); | ||
| } | ||
| } | ||
| if (invert && randomizer->SignedRand(1.0) < -0.9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why -0.9?
I think it should be kept as 0 (50% percents of images inverted).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also,
- Todo -> TODO (like in other places in the codebase).
- Why are you keeping the commented code in DegradeImage()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 (50% percents of images inverted).
Is that a realistic expectation of the types of images which will be OCRed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Todo -> TODO (like in other places in the codebase).
OK.
- Why are you keeping the commented code in DegradeImage()?
I meant to delete it after the changes to text2image worked fine. I will fix that.
Generally no, but... |
OK, that makes sense. I will change it to 0. Thanks! |
Thank you too :-) |
Fixes #1052