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

Use more precise chroma subsampling #8

Open
kornelski opened this issue Mar 6, 2014 · 5 comments
Open

Use more precise chroma subsampling #8

kornelski opened this issue Mar 6, 2014 · 5 comments

Comments

@kornelski
Copy link
Member

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

@bdaehlie bdaehlie modified the milestone: v2.0 May 7, 2014
@dwbuiten
Copy link
Contributor

@pornel I'll maybe implement this soon. I looked at (the disabled) do_fancy_downsampling option, and it uses DCT scaling... which is crap. I'll look at something better which won't break ABI either.

@kornelski
Copy link
Member Author

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.

@kornelski
Copy link
Member Author

Proposed technique tested using image in #193. It's not ideal, but better than nothing.

Nether Poppleton

@njdoyle
Copy link

njdoyle commented May 19, 2016

Was this closed intentionally?

@jrmuizel jrmuizel reopened this May 19, 2016
@kornelski
Copy link
Member Author

kornelski commented May 19, 2016

edited Accidentally, but that's ok, my experimental code is not suitable for a PR.

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

5 participants