Introduction to Color Spaces

Document Sample
Introduction to Color Spaces Powered By Docstoc
					Introduction to Color
       Spaces
           Author: Chik-Yau Foo
   E-mail: r89922082@ms89.ntu.edu.tw
      Mobile phone: 0920-767-580
                 v030305



       Presenter: Wei-Cheng Lin
     E-mail: r97944028@ntu.edu.tw
      Mobile Phone: 0912-808-362

                                       1
               The EM Spectrum
 Only a small part of the EM*
  spectrum is visible to us.
                                                                           103




                                 Frequency (Hz)
                                                        Long-wave radio




                                                                                 Wavelength (m)
    This part is known as the                    106
     visible spectrum.                                  Short-wave radio
                                                                           100
    Wavelength in the region                             Microwave
                                                  109
     of 380 nm to 750 nm.
                                                               TV          10-3
                                             1012
                                                            Infrared
                                                                           10-6
                                                        Visible spectrum
                                             1015
                                                           Ultraviolet

                                                                           10-9
                                                             X-rays
                                             1018


                                                          Gamma rays       10-12
                                         1021
                                                          Cosmic rays

 *Electro-Magnetic
                                                                                                  2
Light and the Human Eye
 When we focus on an image, light from the image
  enters the eye through the cornea and the pupil.

 The light is focused by the lens onto the retina.
                                                      Fovea
                   Lens                                  Retina
             Pupil




           Cornea                                         Optic
                                                          nerve
                Iris
                                                                  3
                 Rods and Cones

 When light reaches the retina,
  one of two kinds of light sensitive
                                                         Rod   Cone
  cells are activated.
                                                Retina
 These cells, called rods and
  cones, translate the image into
  electrical signals.                   light


 The electrical signals are
  transmitted through the optical
  nerve, and to the brain, where we
  will perceive the image.




                                                                      4
        Rods: Twilight Vision
 130 million rod cells per eye.                       1.00


 1000 times more sensitive to
  light than cone cells.                               0.75




                                   Relative response
 Most to green light (about                           0.50
  550-555 nm), but with a
  broad range of response
  throughout the visible                               0.25

  spectrum.
                                                       0.00
 Produces relatively blurred                              400      500         600         700
                                                                    Wavelength (nm)
  images, and in shades of                                Relative neural response of rods as
  gray.                                                   a function of light wavelength.

 Pure rod vision is also called
  twilight vision.


                                                                                                5
                   Cones: Color Vision
 7 million cone cells per eye.                               1.00

                                                                        S        M                L
 Three types of cones* (S, M, L),




                                        Relative absorbtion
  each "tuned" to different maximum                           0.75

  responses at:-
                                                              0.50
      S : 430 nm (blue)      (2%)
                                                              0.25
      M: 535 nm (green)      (33%)

      L : 590 nm (red)       (65%)                           0.00
                                                                  400          500         600            700
                                                                               Wavelength (nm)
 Produces sharp, color images.
                                                                        Spectral absorption of light by
                                                                            the three cone types
 Pure cone vision is called photopic
  or color vision.

*S = Short wavelength cone
 M = Medium wavelength cone
 L = Long wavelength cone
                                                                                                            6
Photopic vs Twilight Vision
 There are about 20x more rods than cones in the
  eyes, but rod vision is poorer than cone vision.



         Rod vision    Cone vision


 This is because rods are distributed all over the
  retina, while cones are concentrated in the fovea.

                      Rod vision     Cone vision

                                               130 million rods


                                             7 million cones




                                                                  7
         Eye Color Sensitivity
 Although cone response                                1.00
                                                        1.00
  is similar for the L, M, and                                       S          M                     L
  S cones, the number of the                                                         M                 L




                                  Relative absorbtion
                                                        0.75
                                                         0.1




                                 Relative sensitivity
  different types of cones                                       S
                                                        0.50
  vary.                                                 0.01

 L:M:S = 40:20:1
                                                   0.25
 Cone responses typically                        0.001

  overlap for any given                      0.00
                                           0.0001400                        500          600                700
  stimulus, especially for the                   400                        500         600
                                                                            Wavelength (nm)                 700
                                                                            Wavelength (nm)
  M-L cones.                                                       Spectral absorption of light by
                                                                    Effective sensitivity of cones
 The human eye is most                                                 the three cone types
                                                                               (log plot)
                                                               S, M, and L cone distribution in the fovea

  sensitive to green light.


                                                                                                                  8
Theory of Trichromatic Vision
 The principle that the color
  you see depends on signals
  from the three types of cones
  (L, M, S).

 The principle that visible color
  can be mapped in terms of the
  three colors (R, G, B) is called
  trichromacy.
                                            =
 The three numbers used to
  represent the different
  intensities of red, green, and
  blue needed are called             r          g         b
  tristimulus values.
                                     Tristimulus values


                                                              9
             Seeing Colors
 The colors we perceive                                Illumination
                                                            source
  depends on:-
                                      x
   Illumination source
                                                          Object
   Object reflectance                                  reflectance
                                                           factor
   Observer response                 x
                                                        Observer
 The product of these three                             spectral
  factors will produce the                              sensitivity
                                      =
  sensation of color.

                               r          g         b    Observer
                                                         response

                               Tristimulus values
                               (Viewer response)
                                                                       10
                Additive Colors
 Start with Black – absence of any
  colors. The more colors added,
  the brighter it gets.

 Color formation by the addition of
  Red, Green, and Blue, the three
  primary colors

 Examples of additive color usage:-
    Human eye
    Lighting
    Color monitors
    Color video cameras               Additive color wheel




                                                              11
            Subtractive Colors
 Starts with a white background
  (usually paper).

 Use Cyan, Magenta, and/or
  Yellow dyes to subtract from
  light reflected by paper, to
  produce all colors.

 Examples of Subtractive color
  use:-
    Color printers
                                   Subtractive color wheel
    Paints




                                                             12
Using Subtractive Colors on
           Film
   Color absorbing pigments are layered on each other.                    M
                                                                                   W

   As white light passes through each layer, different                B       R
    wavelengths are absorbed.                                              K
                                                                   C               Y
   The resulting color is produced by subtracting                         G

    unwanted colors from white.


         White
         light

                       Green        Red          Blue      Black           White


Pigment layers       Cyan      Yellow     Magenta
                     Yellow    Magenta    Cyan          Black
Reflecting layer
 (white paper)
                                                                                       13
   Color Matching Experiment
1. Observer views a split screen of
   pure white (100% reflectance).
2. On one half, a test lamp casts a
   pure spectral color on the screen.
3. On the other, three lamps
   emitting variable amounts of red,
   green, and blue light are
   adjusted to match the color of
   the test light.
4. The amounts of red, green and             Color matching experimental setup

   blue light used to match the pure
   colors were recorded when an
   identical match was obtained.
                                                                                         Primary
5. The RGB tristimulus values for                                                        Mixture
                                        Test Light
   each distinct color was obtained
   this way.                                                                     Tristimulus values



                                                                                               14
                 Metamerism
 Spectrally different lights
  that simulate cones
  identically appear identical.

 Such colors are called
  color metamers.                   9



 This phenomena is called


                                  Relative power
  metamerism.

 Almost all the colors that
  we see on computer               0
  monitors are metamers.                           380   480      580        680
                                                               Wavelength (nm)
                                                                                               780

                                   The dashed line represents daylight reflected from sunflower, while
                                   the solid line represents the light emitted from the color monitor
                                   adjusted to match the color of the sunflower.

                                                                                                         15
The Mechanics of Metamerism
                                                        9




                                       Relative power
  Under trichromacy, any color
   stimulus can be matched by a
   mixture of three primary stimuli.                    0
                                                         380   480 580 680 780
                                                               Wavelength (nm)

  Metamers are colors having the                                                  9




                                                                  Relative power
   same tristimulus values R, G, and
   B; they will match color stimulus
   C and will appear to be the same                                                0
                                                                                    380   480 580 680 780
   color.                                                                                 Wavelength (nm)
                                                        9




                                       Relative power   0
                                                         380   480 580 680 780
                                                               Wavelength (nm)
                                       The two metamers look the same because
                                       they have similar tristimulus values.
                                                                                                        16
                                               Human vision
                     Gamut                       gamut


 A gamut is the range of    0.8                       Photographi
  colors that a device can                             c film gamut

  render, or detect.
                             0.6


 The larger the gamut,      y
  the more colors can be     0.4
  rendered or detected.
                             0.2
 A large gamut implies a
                                                       Monitor
  large color space.                                   gamut
                             0
                                   0   0.2   0.4          0.6     0.8
                                                   x




                                                                        17
               Color Spaces
 A Color Space is a method by which colors are
  specified, created, and visualized.

 Colors are usually specified by using three attributes,
  or coordinates, which represent its position within a
  specific color space.

 These coordinates do not tell us what the color looks
  like, only where it is located within a particular color
  space.

 Color models are 3D coordinate systems, and a
  subspace within that system, where each color is
  represented by a single point.

                                                             18
                        Color Spaces
 Color Spaces are often geared towards specific
  applications or hardware.

 Several types:-
   HSI (Hue, Saturation, Intensity) based
   RGB (Red, Green, Blue) based
   CMY(K) (Cyan, Magenta, Yellow, Black) based
   CIE based
   Luminance - Chrominance based

    CIE: International Commission on Illumination




                                                    19
                          RGB*
 One of the simplest color models.
  Cartesian coordinates for each                                                    Cyan
                                                                Blue
  color; an axis is each assigned to                           (0,0,1)
                                                                                   (0,1,1)

  the three primary colors red (R),    Magenta                     White
  green (G), and blue (B).              (1,0,1)                    (1,1,1)



                                                 Black                                 Green
 Corresponds to the principles of               (0,0,0)                               (0,1,0)

  additive colors.
                                        Red                                  Yellow
 Other colors are represented as      (1,0,0)                               (1,1,0)

  an additive mix of R, G, and B.
                                                           RGB Color Space


 Ideal for use in computers.

  *Red, Green, and Blue                                                                          20
       RGB Image Data




Full Color Image   Red Channel




Green Channel      Blue Channel   21
                                  CMY(K)*
 Main color model used in the
  printing industry. Related to RGB.
                                                                                White
 Corresponds to the principle of                       Magenta
  subtractive colors, using the
  three secondary colors Cyan,
  Magenta, and Yellow.                           Blue                    Red
                                                           Black
 Theoretically, a uniform mix of
  cyan, magenta, and yellow               Cyan                             Yellow
                                                          Green
  produces black (center of
  picture). In practice, the result is
  usually a dirty brown-gray tone.
  So black is often used as a fourth     Producing other colors from subtractive colors.
  color.



*Cyan, Magenta, Yellow, (and blacK)                                                        22
        CMY Image Data




  Full Color Image    Cyan Image (1-R)




Magenta Image (1-G)   Yellow Image (1-B)   23
CMY – RBG Transformation
 The following matrices will perform transformations between
  RGB and CMY color spaces.

 Note that:-
    R = Red
    G = Green
    B = Blue
    C = Cyan
    M = Magenta
    Y = Yellow
    All values for R, G, B
     and C, M, Y must first
     be normalized.



                                                                24
CMY – CMYK Transformations
  The following matrices will perform transformations between
   CMY and CMYK color spaces.

  Note that:-
     C = Cyan
     M = Magenta
     Y = Yellow
     K = blacK
     All values for R, G, B
      and C, M, Y, K must first
      be normalized.




                                                                 25
RGB – CMYK Transformations
 The following matrices perform transformations between RGB
  and CMYK color spaces.

 Note that:-
    R = Red
    G = Green
    B = Blue
    C = Cyan
    M = Magenta
    Y = Yellow
    All values for R, G, B
     and C, M, Y must first
     be normalized.




                                                               26
                         RGB – Gray Scale
                         Transformations
         The luminancy component, Y, of each color is summed to create
          the gray scale value.

         ITU-R Rec. 601-1* Gray scale:

                   Y = 0.299R + 0.587G + 0.114B

         ITU-R Rec. 709 D65 Gray scale

                   Y = 0.2126R + 0.7152G + 0.0722B

         ITU standard D65 Gray scale (Very close to Rec 709!)

                   Y = 0.222R + 0.707G + 0.071B
*601-1: Based on an old television (NTSC: National Television System Committee) standard
 709 : Based on High Definition TV colorimetry (Contemporary CRT phosphors)
 ITU : International Telecommunication Union                                               27
   RGB and CMYK Deficiencies
 RGB and CMY color models
                                      0.8                                        Photographi
  limited to brightest available                                                 c film gamut
  primaries (R, G, and B) and
  secondaries (CYM).                                                               6 color
                                      0.6                                        CMY printer
 Not intuitive. We think of light in                                              gamut
  terms of color, intensity of color,
                                      y
  and brightness.
                                      0.4
     Colors changed by changing
      R, G, B ratios.
     Brightness changed by           0.2
      changing R, G, and B, while
      maintaining their ratios.                                              Monitor RGB
     Intensity changed by                                                     gamut
                                      0
                                              0           0.2          0.4          0.6    0.8
      projecting RGB vector toward                                           x
      largest valued primary color
      (R, G, or B).
                               Hexachrome: Cyan, Magenta, Yellow, Black, Orange, Green

                                                                                                28
                     HSI / HSL / HSV*
 Very similar to the way human visions see color.

 Works well for natural illumination, where hue changes
  with brightness.

 Used in machine color vision to identify the color of
  different objects.

 Image processing applications like histogram operations,
  intensity transformations, and convolutions operate on only
  an image's intensity and are performed much easier on an
  image in the HSI color space.



  *H=Hue, S = Saturation, I (Intensity) = B (Brightness), L = Lightness, V = Value   29
               HSI Color Space                                              Blue
                                                                            240º


 Hue
    What we describe as the color of
     the object.
    Hues based on RGB color space.       Red 0º

    The hue of a color is defined by
     its counterclockwise angle from
     Red (0°); e.g. Green = 120 °, Blue
     = 240 °.                                                                      Green
                                                                                   120º
 Saturation                                             RGB Color Space
                                                    RGB cube viewed from
    Degree to which hue differs from                gray-scale axis, and
                                                      HSI Color Wheel
                                                    RGB cube viewed from
                                                         rotated 30°
     neutral gray.                                     gray-scale axis
                                               0%    Saturation             100%
    100% = Fully saturated, high
     contrast between other colors.
    0% = Shade of gray, low contrast.
    Measured radially from intensity
     axis.

                                                                                      30
               HSI Color Space
 Intensity                                                   Intensity   100%

    Brightness of each Hue, defined by
     its height along the vertical axis.
    Max saturation at 50% Intensity.
    As Intensity increases or decreases
     from 50%, Saturation decreases.
    Mimics the eye response in nature;                 Hue
     As things become brighter they look
     more pastel until they become
     washed out.
    Pure white at 100% Intensity. Hue
     and Saturation undefined.
    Pure black at 0% Intensity. Hue                                      0%

     and Saturation undefined.
                                 100%      Saturation         0%


                                                                               31
        HSI Image Data




    Full Image         Hue Channel




Saturation Channel   Intensity Channel   32
                        HSI - RGB
 For a given RGB color of (R, G, B), the same color in the HSI Model
  is C(x,y) = (H, S, I), where


 Hue




 where



 Saturation



 Intensity


                                                                        33
         RGB to HSI Example
 Consider the RGB color defined by (215, 97,198)                   Blue
                                                                  (0,0,255)

   R = 215, G = 97, B = 198




                                                  Red                                 Green
                                                (255,0,0)                            (0,255,0)




                                                                              Blue
                                                            Red
                                                                              240º
                                                             0º

                                                                              Green
                                                                              120º
   Therefore, HSI coordinates = (308.64°, 0.843, 0.67)

                                                                                                 34
                     HSI to RBG
  Dependent on which sector H lies in.          For 240º  H  360 º



                             Blue
                             240º
Red
 0º




                         Green
                         120º


                                          For 120º  H  240 º
             For 0º  H  120 º




                                                                        35
                             HSV Color Space
      Hue and Saturation similar to that                        100%

       of HSI color model.

      V: Value; defined as the height




                                                             Value
       along the central vertical axis.

      Like Intensity in HSI, color intensity
       increases as Value increases.                   Hue




                                                                     0%


                                                100%         Saturation   0%



HSV: Hue, Saturation, and Value                                                36
                             HSV Color Space
      Hue and Saturation similar to that
       of HSI color model.                               Value      Intensity


      V: Value; defined as the height
       along the central vertical axis.         Smax at V100


      Like Intensity in HSI, color intensity
       increases as Value increases.
                                                                 Smax at I50
      As Value increases, hues become
       more saturated. Hues do not
       progress through the pastels to
       white, just as fluorescent images
       never change colors even though
       its intensity may increase. HSV is
       good for working with fluorescent
       colors.


HSV: Hue, Saturation, and Value                                                 37
Intensity Operations in HSI
 To change the individual color
  of any region in the RGB
  image, change the value of
  the corresponding region in
  the Hue image.

 Then convert the new H            Original Image     Hue
  image with the original S and I
  images to get the transformed
  RGB image.

 Saturation and Intensity
  components can likewise be
  manipulated.                        Saturation     Intensity




                                                                 38
Disadvantages of HSI Color
          Model
There are many disadvantages to the HS color model. For example:

    Cannot perform addition of colors expressed in polar
     coordinates. Transformations are very difficult because Hue is
     expressed as an angle.

    For color machine vision, the hues of low-saturation may be
     difficult to determine accurately. Systems which must be able
     to differentiate all colors, saturated and unsaturated, will have
     significant problems using the HSI representation.

    When saturation is zero, hue is undefined.

    Transforming between HSI and RGB is complicated.



                                                                         39
   1931 CIE* Standard Observer
             (r, g, b)
    The following color
                                                                 0.4
     matching functions
     were obtained.
                                                                 0.3
                                                                                  b                                 r

    There were problems                                                                          g




                                            Tristimulus values
                                                                 0.2
     with the r, g, b color
     matching functions.                                         0.1



    Negative values meant                                       0.0

     that the color had to be
                                                                 -0.1
     added to the test light
                                                                        380            480          580             680           780
     before the two halves                                                                      Wavelength (nm)
     could be balanced.                                                  Color-matching functions for 1931 Standard Observer, the
                                                                         average of 17 color-normal observers having matched
                                                                         each wavelength of the equal energy spectrum with
                                                                         primaries of 435.8nm, 546.1 nm, and 700 nm, on a bipartite
                                                                         2° field, surrounded by darkness.



*Commission Internationale de L’Éclairage                                                                                               40
  1931 CIE Standard Observer
            (x, y, z)
 CIE adopted another set of                             2.0

  primary stimuli, designated as                                  z
  X, Y, and Z.                                           1.5




                                    Tristimulus values
                                                                                        y      x
 Special properties of X, Y, Z:-                        1.0



     Imaginary (non-physical)                           0.5

      primary.
     All luminance information is                       0.0
                                                            380         480           580             680     780
      contributed by Y.                                                           Wavelength (nm)
                                                                      1931 standard observer (2° observer).
     Linearly related to R, G, B.
     Non-negative values for all
      tristimulus values.


                                                                                                                41
       CIE 1931 xy Chromaticity
              Diagram
 2D projection of 3D CIE XYZ
  color space onto X+Y+Z=1
  plane.

 x and y calculated as follows:-




 The chromaticity of a color is
  determined by (x,y).




                                    42
     CIE 1931 xy Chromaticity
            Diagram
 For color C, where

   C  0.5 X + 0.4 Y + 0.1 Z




                                   (0.5, 0.4)




 Color C is represented as
  (0.5, 0.4) on the Chromaticity
  diagram.



                                                43
     CIE 1931 xyY Chromaticity
             Diagram
 Each point on xy corresponds to
  many points in the original 3D
  CIE XYZ space.
 Color is usually described by
  xyY coordinates, where Y is the
  luminance, or lightness
  component of color.
 Y starts at 0 from the white spot
  (D65) on the xy plane, and
  extends perpendicularly to 100.
 As the Y increases, the colors
  become lighter, and the range of
  colors, or gamut, decreases.


                                      44
                     CIE XYZD65 to sRGB*
        The following transformations allow transformations between
         CIE XYZD65 and the sRGB color models.




*sRGB = Standard RGB, the standard for Internet use.
                                                                       45
          CIE XYZ            Rec. 609-1   - RGB
 The following are the transformations needed to convert between
  CIE XYZRec.609-1 and RGB.




                                                                    46
       CIE XYZ - RGBRec. 709
 Use the following matrices to transform between CIE
  XYZ and Rec. 709 RGB (with its D65 white).




                                                        47
XYZ   D65   - XYZ        D50   Transformations
 If the illuminant is changed from D50 to D65, the observed
  color will also change.
 The following matrices enable transformations between XYZD65
  and XYZD50.




                                                                 48
  Inadequacies in the 1931 xy
     Chromaticity Diagram
 Each line in the diagram
  represents a color difference of
  equal proportion.
 The lines vary in length,
  sometimes greatly, depending
  on what part of the diagram
  they're in.
 The differences in line length
  indicates the amount of
  distortion between parts of the
  diagram.




                                     49
     CIE 1960 u,v Chromaticity
             Diagram
 To correct for the deformities in the
  1931 xy diagram, a number of
  uniform chromaticity scale (UCS)
  diagrams were proposed.
 The following formula transforms
  the XYZ values or x,y coordinates
  to a set of u,v values, which
  present a visually more accurate
  2D model.




                                          50
  CIE 1976 u', v' Chromaticity
           Diagram
 But the 1960 uv diagram was
  still unsatisfactory.
 In 1975, CIE modified the u,v
  diagram and by supplying new
  (u',v') values. This was done by
  multiplying the v values by 1.5.
  Thus in the new diagram u' = u
  and v' = 1.5v.
 The following formulas allow
  transformation between u’v’ and
  xy coordinates.




                                     51
  CIE 1976 u', v' Chromaticity
           Diagram
 Each line in the diagram
  represents a color
  difference of equal
  proportion.

 While the representation
  is not perfect (it can never
  be), the u',v' diagram
  offers a much better visual
  uniformity than the xy
  diagram.




                                 52
     CIE L*u*v* Color Space/
             CIELUV
 Replaces uniform lightness
  scale Y with L*, an visually
  linear scale.

 Equations are as follows:-




   where un’ and vn’ refer the the
   reference white light or light
   source.
                                     53
      CIE L*a*b* Color Space /
              CIELAB
 Second of two systems adopted by CIE in
  1976 as models that better showed
  uniform color spacing in their values.

 Based on the earlier (1942) color
  opposition system by Richard Hunter
  called L, a, b.

 Very important for desktop color.

 Basic color model in Adobe PostScript
  (level 2 and level 3)                                 CIE L*a*b* color axes



 Used for color management as the device
  independent model of the ICC* device
  profiles.

                                            *International Color Consortium     54
             CIE L*a*b* (cont’d)
 Central vertical axis : Lightness (L*),                                100

  runs from 0 (black) to 100 (white).

 a-a' axis: +a values indicate amounts of
                                                                          L*
  red, -a values indicate amounts of green.    -a                                    +b

 b-b' axis, +b indicates amounts of yellow;
  -b values indicates amounts of blue. For
  both axes, zero is neutral gray.             -b                                    +a
                                                    (L1*, a1*, b1*)

 Only values for two color axes (a*, b*)           (L2*, a2*, b2*)
  and the lightness or grayscale axis (L*)
                                                                         0
  are required to specify a color.
                                                             CIE L*a*b* color axes
 CIELAB Color difference, E*ab, is
  between two points is given by:



                                                                                          55
 CIELAB Image Data




Full Color Image     L data




  L-a channel      L-b channel   56
                 XYZ to CIELAB
 Given Xn, Yn, and Zn, which are the tristimulus values for the
  reference white, for a point X, Y, Z:-




                                                                   57
                CIELAB to XYZ
 Reverse transformation to XYZ, given L*a*b* values.

For




                                                        58
            CIE L*C*h* (LCh)
 Often referred to simply as LCh.                                   100%




                                                         L* (Lightness)
 Same system is the same as the
  CIELab color space, except that it
  describes the location of a color in
  space by use of polar coordinates
  rather than rectangular coordinates.
 L* is a measure of the lightness of a            H (Hue)

  sample, ranging from 0 (black) to 100
  (white).
 C* is a measure of chroma (saturation),
  and represents distance from the
  neutral axis.
 h is a measure of hue and is
  represented as an angle ranging from                                    0%
  0° to 360.
                                            100%         C* (Chroma)           0%



                                                                                    59
          Y’U’V’1 (EBU2) Color Space
                         Red:                 xR = 0.630            yR = 0.340
                         Green:               xG = 0.310            yG = 0.595
                         Blue:                xB = 0.155            yB = 0.070
                         White                xW= 0.312713          yW = 0.329016
     Standard color space used for analogue television transmissions in
      European TVs (PAL3 and SECAM4).
     Y is the luminance (or luma) or black and white component
     U and V represent the color differences: U = B - Y; V = R - Y
     U represents the Blue - Yellow axis; V, the Red - Green axis.
     Gamma for PAL is assumed to be 2.8



1 Y = Luminance, U and V are chrominance components
2 European Broadcasting Union
3 Phase Alternation Line video standard for Europe; U = 0.492(B-Y); V = 0.877(R-Y)

4 Sequential Couleur avec Mémoire, video standard for France, the Middle East and most of Eastern Europe   60
               Y'UV Channels




Full Color Image                       Y




                   U (Blue - Yellow)       V (Red - Green)   61
              Nonlinear Y’U’V’
              Transformations
 The following matrices allow transformations of nonlinear signals
  between Y’U’V’ and R’G’B.




                                                                      62
Linear Y’U’V’ Transformations
  The following matrices allow transformations of linear signals
   between YUV RGB and XYZ.




                                                                    63
                              Y’I’Q’1 Color Space
                               Red:                    xR = 0.67              yR = 0.33
                               Green:                  xG = 0.21              yG = 0.71
                               Blue:                   xB = 0.14              yB = 0.08
                               White                   xW= 0.310063           yW = 0.316158

           Used in NTSC2 color broadcasting in USA; compatible
            with black and white television, which only uses Y.
           U and V defines colors clearly, but do not align with
            desired human perceptual sensitivities.
           Y [0..1] is the luminance (or luma) component.
           I [-0.523 .. 0.523] represents the Orange-Blue axis.
           Q [-0.596 .. 0.596] represents the Purple-Green axis.

1Y’I’Q’   = Luminance, In-phase, and Quadrature phase.
2National    Television Standards Committee video standard for North America                   64
         YIQ Channels




Full Color Image       Y Channel




I (Orange - Blue)   Q (Purple - Green)   65
                 Y’I’Q’ – R’G’B’
 Use the following matrices to transform linear signals between
  Y’I’Q’ and gamma-corrected RGB values.




                                                                   66
                  YIQ - YUV
 YIQ - YUV transformation is simply a color rotation of 33º.
 The following matrices can be used to transform between
  NTSC based YIQ and PAL based YUV.




                                                                67
                         Y’CbCr* Color Space
                                 Independent of scanning standard and
                                 system primaries, therefore:-
                                  No chromaticity coordinates.
                                  No CIE XYZ matrices.
                                  No assumptions about white point.
                                  No assumptions about CRT gamma.

         Y’ is luminance, Cb is the chromaticity component for blue, and Cr
          is the chromaticity component for red.
         Very closely related to the YUV, it is a scaled and shifted YUV.
                 Cb = (B - Y) / 1.772 + 0.5            Cr = (R - Y) / 1.402 + 0.5
         Chrominance values Cb and Cr are [ 0..1 ].
         Deals only with digital representation of R’G’B’ signals in Y’CbCr
          form.
         Color format for JPEG1 and MPEG2.

1JPEG   = Joint Photography Experts Group
2MPEG    = Motion Pictures Experts Group                                            68
           Y'CbCr - RGB[0..+1]
 Use the following matrices to convert between YCbCr
  and RGB ranging from [0 .. +1]




                                                        69
           ITU-R.601 YCbCr - R’G’B’219
         ITU-R.601 defines 16 =< Y >= 235, and 16 =< Cb and Cr >= 240,
          with 128 corresponding to 0.
         These BT.601 equations are used by many video ICs to convert
          between digital R’G’B’ and BT.601 YCbCr data.




         The R’G’B’ values produced have a nominal range of 16 - 235.
ITU-R.601 = International Telecommunication Union – Radio communications Recommendation 601
RGB219 = A restricted color space used to match YUV standard transmission values              70
ITU-R.601 YCbCr - R’G’B’0-255
 If 24 bit R’G’B’ data needs to have a range of 0-255, the following
  equation should be used.
 The R’, G’, and B’ values must be saturated at the 0 and 255
  values.




                                                                        71
                YCbCr 4:4:4
 Full resolution                 Y     Y     Y     Y
 YCbCr 4:4:4 is in              Cb Cr Cb Cr Cb Cr Cb Cr
  uncompressed data format.
                                  Y     Y     Y     Y
 Each pixel has all Y, Cb and   Cb Cr Cb Cr Cb Cr Cb Cr
  Cr values.
                                  Y     Y     Y     Y
 Chrominance data can be        Cb Cr Cb Cr Cb Cr Cb Cr
  subsampled without
  significant degradation in      Y     Y     Y     Y
  image quality.                 Cb Cr Cb Cr Cb Cr Cb Cr
                                        YCbCr 4:4:4




                                                           72
                YCbCr 4:2:2
 Obtained by a 2:1 horizontal    Y     Y     Y     Y
  subsampling of YCbCr 4:4:4     Cb Cr Cb Cr Cb Cr Cb Cr
  values.
                                  Y     Y     Y     Y
 Often used digital cameras,    Cb Cr Cb Cr Cb Cr Cb Cr
  and many video ICs.
 Restore original colors by      Y     Y     Y     Y
                                 Cb Cr Cb Cr Cb Cr Cb Cr
  interpolating missing Cb and
  Cr values from the values       Y     Y     Y     Y
  present.                       Cb Cr Cb Cr Cb Cr Cb Cr
                                              4:2:2
                                        YCbCr 4:4:4




                                                           73
                YCbCr 4:2:0
 YCbCr 4:2:0 obtained by a       Y     Y     Y     Y
  2:1 horizontal and vertical    Cb Cr Cb Cr Cb Cr Cb Cr
  subsampling of YCbCr 4:4:4
  values.                         Y     Y     Y     Y
                                 Cb Cr Cb Cr Cb Cr Cb Cr
 YCbCr (or, often called
  “YUV”) values are often         Y     Y     Y     Y
  subsampled to 4:2:0 before     Cb Cr Cb Cr Cb Cr Cb Cr
  JPEG compression.
                                  Y     Y     Y     Y
 Restore original colors by     Cb Cr Cb Cr Cb Cr Cb Cr
  interpolating missing Cb and
                                              4:2:0
                                        YCbCr 4:4:4
  Cr values from available
  values.



                                                           74
                          YCbCr 4:1:1
 YCbCr 4:1:1 obtained by a       Y     Y     Y     Y
  4:1 horizontal subsampling     Cb Cr Cb Cr Cb Cr Cb Cr
  of YCbCr 4:4:4 values.
                                  Y     Y     Y     Y
 VHS* quality color.            Cb Cr Cb Cr Cb Cr Cb Cr

                                  Y     Y     Y     Y
                                 Cb Cr Cb Cr Cb Cr Cb Cr

                                  Y     Y     Y     Y
                                 Cb Cr Cb Cr Cb Cr Cb Cr
                                              4:1:1
                                        YCbCr 4:4:4


 VHS: Video Home System




                                                           75
                YCbCr 4:2:2 - RGB
1. Convert YCbCr 4:2:2 to YCbCr 4:4:4, through
   interpolation.




    Y       Y     Y      Y                    Y     Y     Y     Y
   Cb Cr         Cb Cr                       Cb Cr Cb Cr Cb Cr Cb Cr
                             Interpolation
    Y       Y     Y      Y   of Cb and Cr     Y     Y     Y     Y
   Cb Cr         Cb Cr          values       Cb Cr Cb Cr Cb Cr Cb Cr
    Y       Y     Y      Y                    Y     Y     Y     Y
   Cb Cr         Cb Cr                       Cb Cr Cb Cr Cb Cr Cb Cr
    Y       Y     Y      Y                    Y     Y     Y     Y
   Cb Cr         Cb Cr                       Cb Cr Cb Cr Cb Cr Cb Cr
           YCbCr 4:2:2                            YCbCr 4:4:4

                                                                       76
        YCbCr 4:2:2 - RGB
1. Convert YCbCr 4:2:2 to YCbCr 4:4:4, through
   interpolation.
2. Convert YCbCr 4:4:4 to nonlinear R’G’B’.




                                                 77
            YCbCr 4:2:2 - RGB
1. Convert YCbCr 4:2:2 to YCbCr 4:4:4, through
   interpolation.
2. Convert YCbCr 4:4:4 to nonlinear R’G’B’.
3. If necessary, convert nonlinear R’G’B’ to
   linear RGB by removing gamma information.
    For (R’, G’, B’) < 21   For (R’, G’, B’)  21




                                                    78
  SMPTE*-C RGB Color Space
                    Red:                     xR = 0.630     yR = 0.340
                    Green:                   xG = 0.310     yG = 0.595
                    Blue:                    xB = 0.155     yB = 0.070
                    White                    xW= 0.312713   yW = 0.329016

 Current color standard for broadcasting in America, replacing older
  NTSC standard.
 Reason for standard change: original set of (YIQ) primaries being
  slowly changed to YUV primaries.
 CRT gamma assumed to be 2.2 with NTSC, 2.8 with PAL.




  *Society of Motion Picture and Television Engineers                        79
       Linear SMPTE-C RGB
         Transformations
 The following matrices allow transformations of linear signals
  between SMPTE-C RGB and XYZ.




                                                                   80
   Nonlinear SMPTE-C RGB
       Transformation
 The transformation matrices for non-linear signals are the same as
  that of the older YIQ (NTSC) standard.




                                                                       81
                      ITU.BT-709 in Y'CbCr
                          Red:                   xR = 0.64      yR = 0.33
                          Green:                 xG = 0.30      yG = 0.60
                          Blue:                  xB = 0.15      yB = 0.06
                          White (D65):           xW= 0.312713   yW = 0.329016


          Recent standard, defined only as an interim standard
           for HDTV studio production.
          Defined by the CCIR (now the ITU-R) in 1988, but is
           not yet recommended for use in broadcasting.
          The primaries are the R and B from the EBU, and a G
           which is midway between SMPTE-C and EBU.
          CRT gamma is assumed to be 2.2.


ITU: International Telecommunication Union
CCIR: Comite Consultatif International des Radiocommunications                   82
Linear XYZ Rec.709 – RGBD65
 The following matrices allow transformation between
  linear signals of Rec.709 XYZ values and RGBD65.




                                                        83
                              RGBEBU – RGB709
        The following matrices allow transformation between linear Rec.
         709 RGB signals and EBU* RGB signals.




European Broadcasting Union                                                84
  Nonlinear Y’CbCr 709– R’G’B’
 The following matrices allow transformation between nonlinear Rec.709
  Y’CbCr signals and R’G’B’.
 Scaling optimized for digital video.




                                                                          85
      SMPTE-240M Y’PbPr (HDTV*)
                          Red:     xR = 0.67      yR = 0.33
                          Green:   xG = 0.21      yG = 0.71
                          Blue:    xB = 0.15      yB = 0.06
                          White    xW= 0.312713   yW = 0.329016


         This one of the developments of NTSC component coding, in which
          the B primary and white point were changed. With this space color,
          all three components Y’, Pb, and Pr are linked to luminance.
         Standard for coding High Definition TV broadcasts in the USA.
         The CRT gamma law is assumed to be 2.2.




*High Definition TeleVision
                                                                               86
                                     RGB              240M   - RGB
                                                                 709


       The following transforms between SMPTE* 240M
        (SMPTE RP 145 or Y'PbPr) RGB to Rec. 709 RGB.




*Society of Motion Picture and Television Engineers
 240M = Recommended Standard for USA’s HDTV                            87
           RGB     240M   - RGB   EBU

 The following transforms from SMPTE 240M (SMPTE
  RP 145, or YPbPr) RGB into to Rec. 709 RGB.




                                                    88
Linear SMPTE-240M XYZ - RGB
  The following matrices allow linear transformations
   between SMPTE-240M XYZ and RGB.




                                                         89
Nonlinear SMPTE-240M Y’PbPr
       Transformations
  The following matrices allow nonlinear transformations between
   Y’PbPr and R’G’B’.
  Scaling suited for component analogue video.




                                                                    90
             Xerox Corporation Y’E’S’1

         Standard proposed by Xerox Corporation.
         YES has three components:
                Y, or luminancy,
                E, or chrominancy of the red-green axis, and
                S, chrominancy of the yellow-blue axis.
         The following examples assume a CRT gamma of 2.2.




1YES   = Luminance, E = red-green chromaticity, S = blue-yellow chromaticity   91
Y’E’S’ to XYZD50 Transformation
  If you start with non-linear Y’E’S’ values, apply a gamma
   correction to convert to linear YES values first:-




  Next, apply the following transformation to the linear YES.




                                                                 92
XYZD50 to YES Transformation
 First, apply the following transformation matrix to obtain linear
  YES from XYZD50.




 For non-linear Y’E’S’ values, apply a gamma correction.




                                                                      93
YES to XYZD65 Transformation
 As before, if you start with non-linear Y’E’S’ values, apply a
  gamma correction to convert to linear YES values first:-




 Next, apply the following transformation to the linear YES.




                                                                   94
XYZD65 to YES Transformation
  First, apply the following transformation matrix to obtain linear
   YES from XYZD50.




  If required, apply a gamma correction to obtain Y’E’S’.




                                                                       95
Kodak Photo CD YCC (YC1C2)
       Color Space
 Based on Rec. 709 and 601-1, the YCC color space has color
  gamut defined by the Rec. 709 primaries and a luminance -
  chrominance representation of color like ITU 601-1's YCbCr.

 YCC provides a color gamut that is greater than that which can
  currently be displayed, and is therefore suitable not only for
  both additive and subtractive (RGB and CMY(K)) reproduction.

 Extended color gamut obtainable by the PhotoCD system is
  achieved by allowing both positive and negative values for
  each primary, allowing YCC to store more colors than current
  display devices, such as CRT monitors and dye-sublimation
  printers, can produce.


                                                                   96
 Transformations to Encode
     Kodak YC1C2 Data
 First, apply a gamma correction:


  For R709, G709, B709  0.018               For R709, G709, B709  0.018




 Next, transform the R’G’B’ data into YC1C2 data.
 Scaling is optimized for films.




                                                                            97
Transformations to Encode
   YC1C2 Data (cont’d)
 Finally, store the floating point values as 8-bit integers.




 The unbalanced scale difference between Chroma1 and
  Chroma2 is designed, according to Kodak, to follow the typical
  distribution of colors in real scenes.




                                                                   98
Transforming YC1C2 Data to
        24-bit RGB
 Kodak YCC can store more information than current display
  devices can cope with (it allows negative RGB values), so the
  transforms from YCC to RGB are not simply the inverse of RGB
  to YCC, they depend on the target display system.

  First, recover normal Luma (Y) and Chroma (C1 and C2) data.




  Second, if the display primaries match Rec. 709 primaries in
  their chromaticity, then




                                                                  99
YC1C2 – RGB Signal Voltages

 First, recover normal Luma (Y) and Chroma (C1 and C2).




 Then, calculate the RGB display voltages as follows;




                                                           100
            PhotoYCC - YCbCr
 Transform PhotoYCC color
  space into YCbCr values as
  follows:-


 As the PhotoYCC color space is larger than the YCbCr color
  space, the produced image may be poorer than the original.



 Transform YCbCr data into
  PhotoYCC color space as
  follows:-



 The image produced may not match an image that was one
  encoded directly in PhotoYCC color space.
                                                               101
sRGB specs
                     CIE chromaticities for ITU-R BT.709 reference primaries
                     and CIE standard illuminant

                              Red      Green     Blue     D65 White Point
                     x        0.6400   0.3000    0.1500   0.3127
                     y        0.3300   0.6000    0.0600   0.3290
                     z        0.0300   0.1000    0.7900   0.3583

sRGB Viewing Environment Summary
Condition                           sRGB
Display Luminance level             80 cd/m2
Display White Point                 x = 0.3127, y = 0.3290 (D65)
Display model offset (R, G and B)   0.0
Display input/output characteristic 2.2
Reference ambient illuminance level 64 lux
Reference Ambient White Point       x = 0.3457, y = 0.3585 (D50)
Reference Veiling Glare             0.2 cd m-2

                                                                               102
                Glossary of Color Models




 brightness      - the human sensation by which an area exhibits more or less light.
 lightness     - the sensation of an area's brightness relative to a reference white in the scene.
 luma         - Luminance component corrected by a gamma function and often noted Y'.
 chroma         - the colorfulness of an area relative to the brightness of a reference white.
 saturation     - the colorfulness of an area relative to its brightness.



CCIR: Comite Consultatif International des Radiocommunications                                       103
Glossary of Illuminants and
  Their Reference Whites

   Illuminant     wx      wy
        A       0.488   0.407
        B       0.348   0.352
        C       0.310   0.316
      D5500     0.332   0.348
      D6500     0.313   0.329
      D7500     0.299   0.315
        E       0.333   0.333

                                104
                               ITU Color Space


2D Color Spaces
         RGB Color Space

                             NTSC Color Space




         HLS Color Space

                            SMPTE Color Space




         HSV Color Space   Rec.709 Color Space




                                           105
                     References
 BARCO Introduction to Color Theory, Monitor Calibration and
  Color Management,
  http://www.barco.com/display_systems/support/colorthe/colorthe.htm
 R. S. Berns, Principles of Color Technology (3rd Ed)., 2000
 S. M. Boker, The Representation of Color Metrics and Mappings in
  Perceptual Color Space,
  http://kiptron.psyc.virginia.edu/steve_boker/ColorVision2/ColorVision2.h
  tml
 D. Bourgin, Color spaces FAQ,
  http://www.inforamp.net/~poynton/notes/Timo/colorspace-faq, 1996,
 R. Buckley, Xerox Corp., G. Bretta, Hewlett-Packard Laboratories,
  Color Imaging on the Internet,
  http://www.inventoland.net/imaging/cii/nip01.pdf, 2001
 Color Representation,
  http://203.162.7.85/unescocourse/computervision/comp_frm.htm


                                                                             106
          References (cont’d)
 A. Ford and A. Roberts, Color Space Conversions,
  www.inforamp.net/~poynton/PDFs/coloureq.pdf, 1998
 Gonzales, Woods, Digital Image Processing, 2000
 A. Kankaanpaa, Color Formats,
  www.physics.utu.fi/ett/kurssi/sfys3066/arto_tiivis.pdf, 2000.
 M. Nielsen and M. Stokes, Hewlett-Packard Company, The Creation
  of the sRGB ICC Profile, http://www.srgb.com/c55.pdf
 C. Poynton, Frequently Asked Questions about Color,
  http://www.inforamp.net/~poynton/ColorFAQ.html, 1999
 C. Poynton, Frequently Asked Questions about Gamma,
  http://www.inforamp.net/~poynton/GammaFAQ.html, 1999
 G. Starkweather, Colorspace interchange using sRGB,
  http://www.microsoft.com/hwdev/tech/color/sRGB.asp, 2001




                                                                    107
         The End

- Question and Answer Session -




                                  108

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:47
posted:11/17/2011
language:English
pages:108