Skip to content

New filter colorenhance: increase color contrast of video#246

Open
cynthia2006 wants to merge 1 commit intodyne:masterfrom
cynthia2006:master
Open

New filter colorenhance: increase color contrast of video#246
cynthia2006 wants to merge 1 commit intodyne:masterfrom
cynthia2006:master

Conversation

@cynthia2006
Copy link
Contributor

Often pictures/video looks too faded, especially if not color graded, because the cause is color gamut is condensed around white. This filter strives to expand the gamut so colors appear vivid. Consequently, it works best for pictures/videos where color enhancement isn't already applied.

Note that, this isn't color grading — just increasing the color contrast. It works by applying two sigmoidal filters on the A, B channels of a picture/video frame transferred into the Oklab colorspace. The intuition behind implementing this filter is trivial: L is the lightness channel, and rest are color channels, so increasing the contrast of the two color channels end up increasing color contrast without changing the lightness, because Oklab is a perceptually uniform colorspace in comparison to HSV (or HSL).

Here are a few demonstrations.

Comparison-1

(L: Original | R: Enhanced; Parameters: 0.55 0.40 0.50 0.50)

Comparison-2

(U: Original | L: Enhanced; Parameters: 0.58 0.48 0.48 0.50)

@jaromil
Copy link
Member

jaromil commented Feb 17, 2026

Hi! We use https://www.conventionalcommits.org/ now (tl;dr commits prefixed with fix: or feat: ...) so that release automations can work. Would be grateful for adoption, else I'll mend the commit msg myself.

@cynthia2006
Copy link
Contributor Author

Well, amend the commit message as you see fit.

…ideo

Colorenhance applies two sigmoidal filters on the A, B channels of a
frame transferred into the Oklab colorspace. The intuition is trivial:
L is the lightness channel and rest are color channels, so increasing
the contrast of the two color channels end up increasing color contrast,
without changing the lightness because Oklab is a perceptually uniform
colorspace in comparison to HSV (or HSL).
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.

2 participants

Comments