Luma (video)

In video, luma (Y{\displaystyle Y'}) represents the brightness in an image (the "black-and-white" or achromatic portion of the image).[1][2][3][4] Luma is typically paired with chroma.[3][4] Luma represents the achromatic image, while the chroma components represent the color information. Converting R′G′B′ sources (such as the output of a three-CCD camera) into luma and chroma allows for chroma subsampling: because human vision has finer spatial sensitivity to luminance ("black and white") differences than chromatic differences, video systems can store and transmit chromatic information at lower resolution, optimizing perceived detail at a particular bandwidth.[3]

Luma versus relative luminance

255, 147, 255255, 170, 170211, 211, 0
192, 192, 255200, 200, 200122, 244, 0
0, 235, 2350, 250, 1250, 255, 0
RGB values of example colors with the same relative luminance as the lightest primary color (green) using original NTSC (1953) primaries for ' (gamma correction) = 2.2
255, 203, 255255, 208, 208227, 227,0
216, 216, 255219, 219, 219124, 248, 0
0, 244, 2440, 252, 1260, 255, 0
RGB values of example colors with the same relative luminance as the lightest primary color (green) using BT. 709 primaries for ' (gamma correction) = 2.2

Luma is the weighted sum of gamma-compressed R′G′B′ components of a color video—the prime symbols ′ denote gamma compression. The word was proposed to prevent confusion between luma as implemented in video engineering and relative luminance as used in color science (i.e. as defined by CIE). Relative luminance is formed as a weighted sum of linear RGB components, not gamma-compressed ones. Even so, luma is sometimes erroneously called luminance.[2]SMPTE EG 28 recommends the symbol Y{\displaystyle Y'} to denote luma and the symbol Y{\displaystyle Y} to denote relative luminance.[1]

Use of relative luminance

على الرغم من شيوع استخدام مصطلح "لوما"، إلا أن مصطلح "السطوع النسبي" يُستخدم أحيانًا في هندسة الفيديو للإشارة إلى سطوع الشاشة. وتعتمد الصيغة المستخدمة لحساب السطوع النسبي على معاملات تستند إلى دوال مطابقة الألوان CIE والألوان القياسية ذات الصلة للأحمر والأخضر والأزرق (مثل الألوان الأساسية الأصلية لنظام NTSC ، أو SMPTE C ، أو Rec. 709 ).

بالنسبة للألوان الأساسية في معيار Rec. 709 (و sRGB )، فإن التركيبة الخطية، بناءً على اعتبارات قياس الألوان البحتة وتعريف الإضاءة النسبية، هي:

Y=0.2126R+0.7152جي+0.0722ب{\displaystyle Y=0.2126R+0.7152G+0.0722B}

تستخدم الصيغة المستخدمة لحساب الإضاءة في مواصفات Rec. 709 بشكل تعسفي نفس هذه المعاملات، ولكن مع مكونات مضغوطة باستخدام جاما:

Y=0.2126R+0.7152جي+0.0722ب،{\displaystyle Y'=0.2126R'+0.7152G'+0.0722B',}

حيث يشير الرمز ′ إلى ضغط جاما .

معاملات الإضاءة Rec. 601 مقابل معاملات الإضاءة Rec. 709

158، 0، 79165، 0، 0140، 70، 0
142، 0، 14295، 95، 95100، 100، 0
104، 0، 20858، 116، 0
0، 0، 2550، 119، 0
0.91.1820، 112، 1120، 118، 59
قيم RGB لألوان مثال لها نفس الإضاءة النسبية مثل أغمق لون أساسي (الأزرق) باستخدام الألوان الأساسية الأصلية NTSC (1953) لتصحيح جاما يساوي 2.2.
152، 0، 76156، 0، 0122، 61، 0
137، 0، 13777، 77، 7780، 80، 0
102، 0، 20444، 88، 0
0، 0، 2550، 90، 0
0، 76، 1520، 86، 860، 90، 45
قيم RGB لألوان نموذجية لها نفس الإضاءة النسبية لأغمق لون أساسي (الأزرق) باستخدام BT.709 ألوان أساسية لتصحيح جاما يساوي 2.2.

بالنسبة للتنسيقات الرقمية التي تتبع معيار CCIR 601 (أي معظم تنسيقات التعريف الرقمي القياسي)، يتم حساب الإضاءة باستخدام هذه الصيغة:

Y601=0.299R+0.587جي+0.114ب{\displaystyle Y'_{\text{601}}=0.299R'+0.587G'+0.114B'}

تستخدم التنسيقات التي تتبع توصية ITU-R BT. 709 (أي معظم تنسيقات الوضوح العالي الرقمي) صيغة مختلفة:

Y709=0.2126R+0.7152جي+0.0722ب{\displaystyle Y'_{\text{709}}=0.2126R'+0.7152G'+0.0722B'}

تستخدم أنظمة التلفزيون عالي الوضوح الحديثة معاملات 709، بينما قد تستخدم تنسيقات التلفزيون عالي الوضوح الانتقالية 1035i (MUSE) معاملات SMPTE 240M :

Y240=0.212R+0.701جي+0.087ب=Y145{\displaystyle Y'_{\text{240}}=0.212R'+0.701G'+0.087B'=Y'_{\text{145}}}

تتوافق هذه المعاملات مع المعايير الأساسية SMPTE RP 145 (المعروفة أيضًا باسم "SMPTE C") المستخدمة في وقت إنشاء المعيار. [ 5 ]

The change in the luma coefficients is to provide the "theoretically correct" coefficients that reflect the corresponding standard chromaticities ('colors') of the primaries red, green, and blue. However, there is some controversy regarding this decision.[6] The difference in luma coefficients requires that component signals must be converted between Rec. 601 and Rec. 709 to provide accurate colors. In consumer equipment, the matrix required to perform this conversion may be omitted (to reduce cost), resulting in inaccurate color.

Luma and luminance errors

Original image without color subsampling. 200% zoom.
Image after color subsampling - Error in luminance can be seen as a dark band between Green and Magenta.

As well, the Rec. 709 luma coefficients may not necessarily provide better performance. Because of the difference between luma and relative luminance, luma does not exactly represent the luminance in an image. As a result, errors in chroma can affect luminance. Luma alone does not perfectly represent luminance; accurate luminance requires both accurate luma and chroma. Hence, errors in chroma "bleed" into the luminance of an image.

Note the bleeding in lightness near the borders. Due to the widespread usage of chroma subsampling, errors in chroma typically occur when it is lowered in resolution/bandwidth. This lowered bandwidth, coupled with high frequency chroma components, can cause visible errors in luminance. An example of a high frequency chroma component would be the line between the green and magenta bars of the SMPTE color bars test pattern. Error in luminance can be seen as a dark band that occurs in this area.[7]

See also

References

  1. 12Engineering Guideline EG 28, "Annotated Glossary of Essential Terms for Electronic Production," SMPTE, 1993.
  2. 12Poynton, Charles (2003). "Appendix A - YUV and luminance considered harmful". Digital video and HDTV algorithms and interfaces(PDF). San Francisco: Morgan Kaufmann.
  3. 123drewbatgit (2021-01-07). "About YUV Video - Win32 apps". learn.microsoft.com. Retrieved 2023-10-27.
  4. 12Telestream (2017). Different color spaces - or how levels go wrong(PDF). Telestream.
  5. Poynton, Charles (2003). Digital Video and HD: Algorithms and Interfaces. Morgan Kaufmann. ISBN 978-1-55860-792-7.
  6. Poynton, Charles (1998). "Luminance, luma, and the migration to DTV". poynton.ca. Retrieved 2023-10-27.
  7. Poynton, Charles (2004). "Constant Luminance". poynton.ca. Retrieved 2023-10-27.