Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
isp:vibrancy [2019/06/04 22:04] – [Implementation overview (HSL color space)] Igor Yefmov | isp:vibrancy [2023/09/05 05:46] – [Vibrancy] Igor Yefmov |
---|
A vibrancy of a color is a perceived quality that is somewhat similar to Saturation. One could think of it as pure, bright, high chroma color. It is not an absolute measure (like Saturation) and there's no agreed upon definition of what it means to change the vibrancy of a color. | A vibrancy of a color is a perceived quality that is somewhat similar to Saturation. One could think of it as pure, bright, high chroma color. It is not an absolute measure (like Saturation) and there's no agreed upon definition of what it means to change the vibrancy of a color. |
| |
Having said that we still want to make a distinction between "changing color's Saturation" and "changing color's Vibrancy" when talking about color corrections of a given image. Both increase the color's [[https://en.wikipedia.org/wiki/Colorfulness#Saturation|Saturation]] but one behaves like a linear Gain increase, applied uniformly to any color. And the one uses a sliding scale that adjusts the magnitude of change based on the current Saturation level, where the highest multiplication is done for low Saturation colors and highly vibrant (highly saturated, vivid) colors are adjusted on a progressively smaller scale. | Having said that we still want to make a distinction between "changing color's Saturation" and "changing color's Vibrancy" when talking about color corrections of a given image. Both increase the color's [[https://en.wikipedia.org/wiki/Colorfulness#Saturation|Saturation]] but one behaves like a linear Gain increase, applied uniformly to any color. And the other one uses a sliding scale that adjusts the magnitude of change based on the current Saturation level, where the highest multiplication is done for low Saturation colors and highly vibrant (highly saturated, vivid) colors are adjusted on a progressively smaller scale. |
| |
===== Implementation overview (YUV color space) ===== | ===== Implementation overview (YUV color space) ===== |
\] | \] |
<code c++>double scale(int _s, double _vib){ // _s is in range [0..100]% | <code c++>double scale(int _s, double _vib){ // _s is in range [0..100]% |
return 1. + (100 - _s) / 100. * _vib; | return 1. + (100 - _s) / 100. * (_vib - 1); |
}</code> | }</code> |
Once the scale (boost) value is calculated - just apply it to the pixels: | Once the scale (boost) value is calculated - just apply it to the pixels: |