(iphone) grayscaled image is too dark, can I change the opacity of gray scale image?

时光怂恿深爱的人放手 提交于 2019-12-05 13:05:13

Just converting to grayscale can sometimes cause your image to be too dark because the RGB->Grayscale conversion may not preserve luminosity (perceived brightness) of the image. You have two options: (1) brighten the image after conversion to greyscale (you could try simple-iphone-image-processing); and (2) convert the image preserving luminosity.

One common way to convert from RGB to grayscale while preserving luminosity is to set your gray value (Y) according to the following function:

Y = 0.30 x Red + 0.59 x Green + 0.11 x Blue

This works because the human eye perceives a given intensity of green to be "brighter" than the same intensity of red or blue (in approximately that ratio).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!