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

[bugfix] Fixes median cut frequencies not summing to one #39

Merged
merged 2 commits into from
Jul 7, 2024

Conversation

qTipTip
Copy link
Owner

@qTipTip qTipTip commented Jul 7, 2024

When computing the frequency of the extracted color in the median_cut algorithm, I was incorrectly using the volume of the color-box instead of the number of pixels as the determining factor.

Solved by dividing the number of pixels in the color box by the total number of pixels (width * height of the image).

@qTipTip qTipTip linked an issue Jul 7, 2024 that may be closed by this pull request
@qTipTip qTipTip merged commit a3d48f9 into master Jul 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect color frequencies when using Median Cut extraction
1 participant