HOME

TheInfoList



OR:

sYCC is a standard numerical encoding of colors, similar to the CIE
YCbCr YCbCr, Y′CbCr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in digital video and digital photography, photography systems. Like YPbPr, YPBPR, it is based on RGB primaries; the two ...
encoding, It uses three coordinates: a luma value Y, that is roughly proportional to perceived brightness of the color, and two chroma values C_b and C_r, which are roughly the "blueness" and "redness" of the hue. Each coordinate is represented by an integer with some number N of bits, which is interpreted as either unsigned (for Y) or signed (for C_b and C_r). The space is defined by Annex F of the
International Electrotechnical Commission The International Electrotechnical Commission (IEC; ) is an international standards organization that prepares and publishes international standards for all electrical, electronics, electronic and related technologies. IEC standards cover a va ...
(IEC) standard 61966-2-1 Amendment 1 (2003), as a linear transformation of the non-linear
sRGB sRGB (standard RGB) is a colorspace, for use on monitors, printers, and the World Wide Web. It was initially proposed by HP and Microsoft in 1996 and became an official standard of the International Electrotechnical Commission (IEC) as IEC 6 ...
color space defined by the same document. The official conversion from sYCC to sRGB may result in negative R, G, or B values; meaning that not all sYCC triplets represent colors that can be displayed on a computer screen, printed, or even perceived by the human eye.


sYCC definition

The three unsigned integers Y,C_b,C_r of an sYCC encoded color represent fractional coordinates Y',C_b',C_r' according to the formulas :Y' = Y/M :C_b' = (C_b - Z)/M :C'_r = (C_b - Z)/M where the scale factor M = 2^N - 1 is the maximum unsigned N-bit integer, and the offset Z is 2^ (as in the usual
two's complement Two's complement is the most common method of representing signed (positive, negative, and zero) integers on computers, and more generally, fixed point binary values. Two's complement uses the binary digit with the ''greatest'' value as the ''s ...
representation of signed integers). Conversely, the encoded integer values are given by :Y = \mbox(M Y' :C_b = \mbox(Z + M C_b') :C_r = \mbox(Z + M C_r') with the resulting values clipped to the range 0..M. In particular, for N=8 (which is the normal bit size), one gets M = 255 and Z = 128. Thus the fractional luma Y' ranges from 0 to 1, while the fractional chroma coordinates range from -128/255\approx-0.50196... to +127/255\approx+0.498039.... The standard specifies that these fractional values Y',C_b',C_r' are related to the non-linear fractional sRGB coordinates R',G',B' by a linear transformation, described by the matrix product : \begin Y' \\ C_b' \\ C_r' \end = \begin +0.2990 & +0.5870 & +0.1140 \\ -0.1687 & -0.3313 & +0.5000 \\ +0.5000 & -0.4817 & -0.0813 \end \begin R' \\ G' \\ B' \end This correspondence is the same as the RGB to YCC mapping specified by the old TV standard ITU-R BT.601-5, except that the coefficients of Y' are here defined with four decimal digits instead of just three. The non-linear fractional sRGB coordinates R',G',B' can be computed from the fractional sYCC coordinates Y',C_b',C_r' by inverting the above matrix. The standard gives the approximation : \begin R' \\ G' \\ B' \end = \begin +1.0000 & 0.0000 & +1.4020 \\ +1.0000 & -0.3441 & -0.7141 \\ +1.0000 & +1.7720 & 0.0000 \end \begin Y' \\ C_b' \\ C_r' \end which is expected to be accurate enough for N=8 bits per component. For bit sizes greater than 8, the standard recommends using a more accurate inverse. It states that the following matrix with 6 decimal digits is accurate enough for N=16: : \begin R' \\ G' \\ B' \end = \begin +1.000000 & +0.000037 & +1.401988 \\ +1.000000 & -0.344113 & -0.714104 \\ +1.000000 & +1.771978 & +0.000135 \end \begin Y' \\ C_b' \\ C_r' \end The same standard specifies the relation between the non-linear fractional coordinates R',G',B' and the CIE 1931 XYZ coordinates. The connection entails the
transfer function In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, models the system's output for each possible ...
("gamma correction") that maps R',G',B' to the linear R, G, B coordinates, and then a 3D linear transformation that relates these to the CIE X,Y,Z. Since the linear transformation from sRGB to sYCC is defined in terms of non-linear (gamma-encoded) values (R',G',B'), rather than the linear ones (R,G,B), the Y' component of sYCC is not the CIE Y coordinate, not even a function of it alone. That is, two colors with the same CIE Y value may have different sYCC Y' values, and vice-versa.


Particular values

The integer encoded sYCC triplet (0,0,0) represents the color black whereas (255,0,0) is white (more precisely, the CIE illuminant D65). More generally, triplets (Y,0,0), for Y in 0..255, represent shades of gray. Note that the 8-bit integer sYCC triplet (Y,Cb,Cr)=(0,255,255) has fractional coordinates (Y',Cb',Cr')\approx(0.0,0.5,0.5), which, according to these matrices, has fractional non-linear sRGB coordinate G' \approx - 0.5\times(0.3341 + 0.7141) \approx -0.528, and therefore is not realizable or perceivable. Similarly, the sYCC triplet (0,0,0) has R'\approx -0.701 and B'\approx -0.886.


References

. The first official specification of sRGB. Replaces the version IEC 61966-2-1:1999, introducing the sYCC encoding for
YCbCr YCbCr, Y′CbCr, also written as YCBCR or Y′CBCR, is a family of color spaces used as a part of the color image pipeline in digital video and digital photography, photography systems. Like YPbPr, YPBPR, it is based on RGB primaries; the two ...
color spaces, an extended-
gamut In color reproduction and colorimetry, a gamut, or color gamut , is a convex set containing the colors that can be accurately represented, i.e. reproduced by an output device (e.g. printer or display) or measured by an input device (e.g. cam ...
RGB encoding bg-sRGB, and a
CIELAB The CIELAB color space, also referred to as ''L*a*b*'', is a color space defined by the International Commission on Illumination (abbreviated CIE) in 1976. It expresses color as three values: ''L*'' for perceptual lightness and ''a*'' and ''b* ...
transformation.
{{Color space 1996 introductions Color space Film and video technology