-
Notifications
You must be signed in to change notification settings - Fork 8
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
New Local Thresholding Algorithm #10
base: master
Are you sure you want to change the base?
Conversation
…nto tri-centroiding
…l gives discrepency
First TODOs, as we talked about today:
You can do this by simply adding a new commit fixing the problems. If you're feeling like doing some advanced Git work, a fancy way to fix these issues is by doing an "interactive rebase", which lets you modify individual commits from history. |
Thanks for removing cairo! However, I notice that in your commit changing to LF, only one file was modified. All the other files need to be fixed too. This may be as simple as running I also now notice that you committed the |
I see that all the extra files are now removed! Could you also fix the newlines using |
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.
I've suggested some changes.
One thing that would really clean up your code is to modify LocalBasicThresholding so that instead of explicitly calculating the beginning and end of each subdivision, it uses functions eg BeginningOfSubdivision(width, height, i)
, EndOfSubdivision(width, height, i)
, then you just loop for j
between the beginning and end returned by the functions. This way you can centralize all the fiddly math related to leftovers, etc.
Hi Mark, I just finished implementing all the changes, thanks for pointing out the faults for me! However, I can't test it since I don't have any Cairo files or my kvector.dat file anymore. |
It's looking pretty good, I need to actually test it myself but after that I think it's just about done! |
Thanks. I just added one more change, but I think it should be good now! |
There is an issue that is a bit confusing. In this rendition of COG and IWCOG, it rounds the threshold, wheras in the original it floors it, yielding different results. This was a change you actually requested, so its up to you whether you'd like to let it round or floor. |
Horizontal Thresholds to replace the old cog algorithm. (A subdivision of 1 defaults back to old algorithm)