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

[Feature request] Add option to exclude top/bottom 0.1% of pixels from measurements #32

Open
KoKlusz opened this issue Jul 21, 2024 · 1 comment

Comments

@KoKlusz
Copy link

KoKlusz commented Jul 21, 2024

Sometimes a stray pixels can mess up the measurements, this would help avoid that.

@KoKlusz KoKlusz changed the title Add option to exclude top/bottom 0.1% of pixels from measurements [Feature request] Add option to exclude top/bottom 0.1% of pixels from measurements Jul 21, 2024
@EndlesslyFlowering
Copy link
Owner

EndlesslyFlowering commented Sep 26, 2024

I have thought about this for a while and it is very complicated to do efficiently. Since 3840 * 2160 * 0.001 = 8294.4 which makes that 8294 pixels that I would need to keep track off and make that double for the max and min. And that takes a lot of performance.

My old solution for this was to sample a 3x3 area with the max or min in the middle and take the average of that. Problem with that is there could be multiple pixels with the same max or min value.

I guess 0.01% would make it more reasonable? 3840 * 2160 * 0.0001 = 829.44 so 829 values to keep track off. 495 values for 3440x1440, 368 values for 2560x1440, 207 values for 1920x1080 and 92 values for 1280x720. Make it double for all values of course.

I wanted to make this for a long while. Pretty close to the beginning of creating these shaders actually. For a while there was unused code for this in the source. I removed that a while ago...

Hmm I guess sorting could also be done. That sounds like pain to optimise 😬. Maybe when I am really bored.

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

No branches or pull requests

2 participants