修改RGB图像亮度的算法? [英] Algorithm to modify brightness for RGB image?
本文介绍了修改RGB图像亮度的算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道有RGB - > Luminance的公式,但是我需要一个亮度参数来修改图像的RGB值。我该怎么做?
I know there is formula for going RGB -> Luminance, but I need given a brightness parameter to modify the RGB values of an image. How do I do that?
谢谢
推荐答案
RGB地图到HSL(色调/饱和度/亮度),保持色调和饱和度相同,只需修改亮度,然后从HSL到RGB进行后向映射。
Map from RGB to HSL (Hue/saturation/luminance), keep the hue and saturation the same, and just modify the luminance and then do the backward mapping from HSL to RGB.
< a href =http://en.wikipedia.org/wiki/HSL_color_space =nofollow noreferrer>您可以在此处阅读有关RGB到HSL和HSL到RGB转换的更多信息。
这篇关于修改RGB图像亮度的算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文