简体   繁体   English

这些R,G和B系数值从何而来?

[英]Where do these values of R, G and B coefficients come from?

https://rosettacode.org/wiki/Grayscale_image#C.23 https://rosettacode.org/wiki/Grayscale_image#C.23

Bitmap tImage = new Bitmap("spectrum.bmp");

for (int x = 0; x < tImage.Width; x++)
{
    for (int y = 0; y < tImage.Height; y++)
    {
        Color tCol = tImage.GetPixel(x, y);

        // L = 0.2126·R + 0.7152·G + 0.0722·B 
        double L = 0.2126 * tCol.R + 0.7152 * tCol.G + 0.0722 * tCol.B;
        tImage.SetPixel(x, y, Color.FromArgb(Convert.ToInt32(L),
 Convert.ToInt32(L), Convert.ToInt32(L)));
    }
}

// Save
tImage.Save("spectrum2.bmp");

Where do we find // L = 0.2126·R + 0.7152·G + 0.0722·B these values? 我们在哪里找到// L = 0.2126·R + 0.7152·G + 0.0722·B这些值// L = 0.2126·R + 0.7152·G + 0.0722·B

You can find that information in ITU (International Telecommunication Union) Recommendation ITU BT.709 您可以在ITU(国际电信联盟) ITU BT.709建议ITU BT.709找到该信息。

Parameter values for the HDTV standards for production and international programme exchange 用于生产和国际节目交换的HDTV标准的参数值

See page 4 见第4页

You can see old versions here 您可以在这里查看旧版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM