4.3 CMY Color Model - Jacobs University Bremen · 320322: Graphics and Visualization 348...
Transcript of 4.3 CMY Color Model - Jacobs University Bremen · 320322: Graphics and Visualization 348...
320322: Graphics and Visualization 346
Visualization and Computer Graphics LabJacobs University
4.3 CMY Color Model
320322: Graphics and Visualization 347
Visualization and Computer Graphics LabJacobs University
CMY color model
• The CMY color model is related to the RGB colormodel.
• Its base colors are– cyan (C)– magenta (M)– yellow (Y)
• They are arranged in a 3D Cartesian coordinatesystem.
• The scheme is substractive.
320322: Graphics and Visualization 348
Visualization and Computer Graphics LabJacobs University
Subtractive color scheme
• RGC color model is subtractive, i.e., adding colors makes theresulting color darker.
• Application: color printers.• As it only works perferctly in theory, typically a black cartridge
is added (CMYK color model).
320322: Graphics and Visualization 349
Visualization and Computer Graphics LabJacobs University
CMY color cube
• All colors c that can be generated are represented bythe unit cube in the 3D Cartesian coordinate system.
red
green
blue
black
white
greyyellow
magenta
cyan
320322: Graphics and Visualization 350
Visualization and Computer Graphics LabJacobs University
CMY color cube
320322: Graphics and Visualization 351
Visualization and Computer Graphics LabJacobs University
CMY color model
320322: Graphics and Visualization 352
Visualization and Computer Graphics LabJacobs University
CMYK color model
320322: Graphics and Visualization 353
Visualization and Computer Graphics LabJacobs University
Conversion• RGB -> CMY:
• CMY -> RGB:
320322: Graphics and Visualization 354
Visualization and Computer Graphics LabJacobs University
Conversion• RGB -> CMYK:
• CMYK -> RGB:
320322: Graphics and Visualization 355
Visualization and Computer Graphics LabJacobs University
4.4 HSV/HLS Color Models
320322: Graphics and Visualization 356
Visualization and Computer Graphics LabJacobs University
HSV color model
• While RGB and CMY color models have theirapplication in hardware implementations, the HSV color model is based on properties of human perception.
• Its application is for human interfaces
320322: Graphics and Visualization 357
Visualization and Computer Graphics LabJacobs University
HSV color model
The HSV color model also consists of 3 channels:• H: When perceiving a color, we perceive the dominant
wavelength. This is represented by the hue (H).• S: The purity of a color is measured by the amount of
frequencies in the light. The smaller the frequencyspectrum, the purer the color. This is represented bythe saturation (S).
• V: The maximum amplitude of the light is given at itsdominant wavelength. It represents the energy of thelight given in form of its value (V).
320322: Graphics and Visualization 358
Visualization and Computer Graphics LabJacobs University
HSV coordinate system
• The coordinate system of the HSV color model is givenin form of a cone:– H is given in form of an angle in the range [0,360) which
represents the rotational symmetry of the cone.The order of the colors is given by the frequency spectrum.
– S is in the range [0,1] and its axis perpendicular to the V axis.– V is in the range [0,1] and its axis is the rotational symmetry
axis of the cone.
320322: Graphics and Visualization 359
Visualization and Computer Graphics LabJacobs University
HSV coordinate system
320322: Graphics and Visualization 360
Visualization and Computer Graphics LabJacobs University
HSV coordinate system
• Sometimes the cone is approximated by a 6-sided pyramid:
• The hexagon at the base of the 6-sided pyramid isthe RGB cube projected along the grey axis.
red: 0°
green: 120°
blue: 240°
black
white
grey
yellow: 60°
magenta: 300°
cyan: 180°
320322: Graphics and Visualization 361
Visualization and Computer Graphics LabJacobs University
HSV color model
320322: Graphics and Visualization 362
Visualization and Computer Graphics LabJacobs University
Conversion: RGB -> HSV
Let max = max {R,G,B} and min = min {R,G,B}:
red: 0°
green: 120°
blue: 240°
yellow: 60°
magenta: 300°
cyan: 180°
320322: Graphics and Visualization 363
Visualization and Computer Graphics LabJacobs University
Conversion HSV -> RGB
320322: Graphics and Visualization 364
Visualization and Computer Graphics LabJacobs University
HLS color model
• HLS color model is identical to HSV color model, butvalue V is replaced by lightness L.
• Lightness is also in the range [0,1]• The cone coordinate system is replaced by a double-
cone coordinate system, where the maximum coneradius is reached at L = 0.5.
320322: Graphics and Visualization 365
Visualization and Computer Graphics LabJacobs University
HLS coordinate system
320322: Graphics and Visualization 366
Visualization and Computer Graphics LabJacobs University
HLS color model
320322: Graphics and Visualization 367
Visualization and Computer Graphics LabJacobs University
Conversion RGB -> HLS
320322: Graphics and Visualization 368
Visualization and Computer Graphics LabJacobs University
4.5 CIE Color Models
320322: Graphics and Visualization 369
Visualization and Computer Graphics LabJacobs University
CIE color models
• CIE: Commission Internationale d‘ Eclairage
• Human color space (tristimulus):– x, y, and z axes represent the stimuli for the long-
wavelength (L), medium-wavelength (M), and short-wavelength (S) receptors.
– The human color space is a horse-shoe-shaped cone.– The origin corresponds to black and is the tip of the cone.– Brighter colors are farther removed from the origin. – The most saturated colors are located at the outer rim of
the cone.
320322: Graphics and Visualization 370
Visualization and Computer Graphics LabJacobs University
Human color space
320322: Graphics and Visualization 371
Visualization and Computer Graphics LabJacobs University
Gamut
• The set of colors described by a color model, is calledits gamut.
• We observed that the RGB gamut is a real subset of the human tristimulus gamut.
• CIE tried to overcome this problem by replacing theR, G, and B wavelength with the tristimuluswavelengths.
• They defined chromaticity curves with no negative components.
• The 3 color channels are called X, Y, and Z.
320322: Graphics and Visualization 372
Visualization and Computer Graphics LabJacobs University
CIE XYZ color model
• The amplitudes of the curve were rather arbitrary.• The CIE xyz color model modifies them by scaling to
equal areas under the curves.
320322: Graphics and Visualization 373
Visualization and Computer Graphics LabJacobs University
CIE XYZ Color Model
320322: Graphics and Visualization 374
Visualization and Computer Graphics LabJacobs University
Conversion
• RGB -> CIE XYZ:
• CIE XYZ -> RGB:– inverse matrix– caveat: not always all entries will be nonnegative!
320322: Graphics and Visualization 375
Visualization and Computer Graphics LabJacobs University
CIE xyY color model
• Normalization:
• z is not stored explicitly.• Instead we store a luminance channel Y.• x and y represent the chromatic channels.
320322: Graphics and Visualization 376
Visualization and Computer Graphics LabJacobs University
CIE xyY chromaticity diagram
320322: Graphics and Visualization 377
Visualization and Computer Graphics LabJacobs University
Comparison CIE xyY vs. RGB
320322: Graphics and Visualization 378
Visualization and Computer Graphics LabJacobs University
CIE L*a*b* color model• To further strengthen the correlation between the
color model and human perception, we apply thefollowing non-linear transformation:
with
where (Xn,Yn,Zn) are the tristimulus values of thereference white point.
320322: Graphics and Visualization 379
Visualization and Computer Graphics LabJacobs University
CIE L*a*b* color model
• L* represents a luminance or lightness channel.• a* and b* represent chromatic channels.
320322: Graphics and Visualization 380
Visualization and Computer Graphics LabJacobs University
CIE L*a*b* color model
Chromaticity diagram for various luminances:
320322: Graphics and Visualization 381
Visualization and Computer Graphics LabJacobs University
CIE L*a*b* color model
Perceptually uniform:• The CIE L*a*b* color model is perceptually uniform,
i.e., a change of the same amount in a color valueshould produce a change of about the same visualimportance.
• In other words, Euclidean distance in the color spaceis propotional to human perception.
320322: Graphics and Visualization 382
Visualization and Computer Graphics LabJacobs University
L*a*b* & RGB
• L*a*b* chromaticity diagram reduced to the colorsthat can be represented in RGB color space.