-
Notifications
You must be signed in to change notification settings - Fork 5
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
brightness threshold calculation might be bogus #16
Comments
ksmoore17
changed the title
brightness threshold calculation is bogus
brightness threshold calculation might be bogus
Apr 15, 2021
I think this is still ok for now, but I will leave it open because it would be fun to change. I was worried that the calculations were boof bc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
Threshold
, both the Rust and numpy implementation use perceived_brightness from some random calculation i found online.rust
pierogis/src/pymodule.rs
Lines 76 to 78 in a1fb442
np
pierogis/src/pyrogis/ingredients/seasonings/threshold.py
Lines 94 to 96 in a1fb442
This other random calculation I found online is better
https://stackoverflow.com/a/56678483
Make sure that the speed of this change is reasonable.
As far as
Sort
usingThreshold
, I think something is not quite right and the results are not as dazzling as I remember them. It could be beneficial to sort the upper thresholded pixels separate from the lower thresholded.There was a decision made that the thresholds ultimately meant "sort contiguous pixels above upper or below lower" instead of "... below upper and above lower" which may or may not be in line with other pixelsort implementations. "Inclusive" vs "exclusive" could be a simple toggle on
Sort
and/orThreshold
and flip the values of the boolean array.The text was updated successfully, but these errors were encountered: