-
Notifications
You must be signed in to change notification settings - Fork 47
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
BUG: Handwrite heading part for font #69
Comments
This could be a simple weird cropping issue @sakshamarora1. |
Hey @yashlamba I encountered the same thing, but I found that if I converted my scanned image to a gray-scale image and then only used pixels that were below a certain darkness threshold it improved the quality. Original on the left and cleaned version on the right: Font improvement: The code I wrote is here, happy to help make a PR if you like.
|
Hi @chriscohoat, The new output looks much better (We also use something very similar but a different approach) but the threshold value you used is something we are trying to figure out. If you look here: https://github.com/cod-ed/handwrite/blob/440f59153fe02fc96503fd87f9c64b105c8ceb71/handwrite/sheettopng.py#L79-L92 We default to a threshold of 200, if I am not wrong and it is configurable, @sakshamarora1 will have more context on this. We also have #3 open for a long time to fix this. In short, the problem we have is that the threshold that worked for your input might not work for others, maybe figuring it out dynamically based on the input would be interesting. More related to #68. |
Hi @chriscohoat . The new output looks a lot better! As @yashlamba said we need to figure out how to dynamically set the best threshold value in order to get better results just like you did. Also, the default threshold_value is configurable here in the config json file: This was initially done so that everyone can set it accordingly as each input is different. I've opened an issue to track this since I missed it before - #70 |
Initial input:
The above input didn't work, tried with increased exposure:
The font was generated fine using handwrite-web (handwrite 0.2.1), but it had 2 issues:
cc @programmer290399
Found while testing: #67
The text was updated successfully, but these errors were encountered: