-
Notifications
You must be signed in to change notification settings - Fork 418
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
Use more precise chroma subsampling #8
Comments
@pornel I'll maybe implement this soon. I looked at (the disabled) |
Possibly related: https://en.wikipedia.org/wiki/Helmholtz–Kohlrausch_effect My idea: Saturation affects perceived lightness, so when pixels lose saturation due to chroma subsampling, it could be partially fixed by adjusting luma to compensate for the loss. |
Proposed technique tested using image in #193. It's not ideal, but better than nothing. |
Was this closed intentionally? |
edited Accidentally, but that's ok, my experimental code is not suitable for a PR. |
There are few tricky problems in chroma subsampling:
http://www.glennchan.info/articles/technical/chroma/chroma1.htm
e.g. libjpeg averages chroma of black pixels with chroma of neighboring color pixels, which causes darkened or desaturated edges. Even most naive blending with weighting by saturation gives a noticeable improvement:
https://github.com/pornel/jpeg-compressor#subsampling
The text was updated successfully, but these errors were encountered: