我将图像转换为灰度,然后我想知道里面发生了什么。我找到了两种可能的方式,但是里面到底发生了什么?
2种方式:
对通道进行平均
此方法涉及对像素值进行算术平均。
与通道相关的亮度感知
这是更生物学的方式。它涉及使用
0.2126 * R 值 + 0.7152 * G 值 + 0.0752 * B 值。
该方法基于人眼中存在的视锥细胞。
来源:www.kdnuggets.com。
但是 OpenCV 使用什么来处理灰度呢?
I converted an image to grayscale, and then I wondered that was going on inside. I found 2 ways how it could be, but what is really going on inside?
2 ways:
Average the channels
This method involves taking the arithmetic average of the pixel values.
Сhannel-dependent luminance perception
It is more biological way. It involves the use of
0.2126 * R-value + 0.7152 * G-value + 0.0752 * B-value.
The method is based on the presence of cones in people`s eyes.
Source: www.kdnuggets.com.
But what is the OpenCV using for grayscale?
发布评论
评论(2)
来源:docs.opencv.org。
Source: docs.opencv.org.
有许多 ITU-R 标准定义了颜色转换。
OpenCV 使用 BT.709,你的公式是 BT.601。欲了解更多信息,请查看此处
https://mymusing.co/bt601-yuv-to-rgb-conversion -颜色/
There are many ITU-R standards that define color conversions.
OpenCV uses BT.709 and your formula is BT.601. For more check here
https://mymusing.co/bt601-yuv-to-rgb-conversion-color/