39
Color

Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Embed Size (px)

Citation preview

Page 1: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Color

Page 2: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Acknowledgement

Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d like to thank Prof. Leslie Smith and Dr. Bruce Graham who create such a good work on those lecture notes.

Page 3: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Outline

• What is colour?

• Computer-centric view of colour

• Colour models

• Monitor production of colour

• Accurate colour reproduction

Page 4: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Electromagnetic Spectrum

Page 5: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

What is colour?• There are two possible reasons why an object may be

coloured:

– It may reflect light unevenly over the visible spectrum

– It may emit light unevenly over the visible spectrum.• If an object reflects light evenly, it will be white or grey

or black• If it emits light whose energy is spread evenly over the

spectrum, the light will be white.

Page 6: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 7: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Why are things coloured?• Most things reflect, rather than emit, light• Materials have different absorption and scattering amounts fo

r the different wavelengths of light

Examples:• A yellow object absorbs a lot of blue light, but scatters in the l

onger (red and green) wavelengths

• Black clothing gets very hot in sunlight, because it doesn’t scatter much light (obviously not, as it’s black!) so it absorbs a lot (as heat)

Page 8: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Additive Colour Matching• This is the mixing of different coloured lights

– Red+green produces yellow

– Green+blue produces cyan

– Red+blue produces magenta

• If you carefully choose the wavelength distributions of the primaries (red,green,blue), you can get white light.

• The additive colour model RGB corresponds to that used by human vision (approximately!)

Page 9: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Maxwell’s Trichromatic Color Theory

Page 10: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Colour ModelsDifferent ways of constructing colours

– some ways are from primaries– some are more numerical ways

Some of the more common systems:– RGB (red green blue)– CMY (cyan magenta yellow)– CMYK (cyan magenta yellow black)– HSV (hue saturation value)– CIE (Commission Internationale d’Eclairange) prima

ries

Page 11: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

RGB• Additive colour scheme

• Adds red, green and blue amounts starting from black.

• Typical colour scheme used in graphics programming, image files, HTML etc.

• R, G, B values typically all from 0-255 (so stored in 1 byte)

Examples:

• Orange R=255 G=135 B=75

• Turquoise R=23 G=173 B=178

Page 12: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

CMY and CMYK• CMY = Cyan Magenta Yellow • CMYK has added black and is used for printing (m

ore in later lectures)• Amount of Cyan in a colour is the same as how m

uch red is “missing” in the colour compared to white (with the red fully on)

• Similarly,

– Amount of Magenta = amount of green missing

– Amount of Yellow = amount of blue missing• Subtractive system

Page 13: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Subtractive Color Model : CMYK

Page 14: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 15: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

HSV/HSB/HSL

Closer to how we think about colour• Hue

– which colour along spectrum of red-yellow-green-blue-violet

• Lightness or Brightness or Value– how much or little light is produced from an area

• Saturation or Colourfulness

– how much colour it exhibits (greys are very unsaturated)

Page 16: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Hue

Page 17: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 18: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 19: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

HSV and RGB

Page 20: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Device-Dependent Colour Models

• Colour models so far: RGB, HSV,CMY,CMYK• They are all device-dependent

– specific to particular hardware

– e.g. a colour with RGB values (140,60,203) will show up as slightly different colours on different monitors

• There is a need to achieve colour fidelity

– imagine an image being created, displayed on the screen, then printed. It can be important to keep the colours the same at each stage of the process.

• What we need: a device-independent colour model.

Page 21: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

CIE and the Standard Observer• Based on experiments, the CIE (Committee Inter

nationale de l’Éclairage) in 1931 defined a

– Standard Observer

– A standard set of three primaries (X,Y,Z)• These primaries are “imaginary” primaries in that

they do not actually correspond to real visible colours

• They are “not real” in the sense that they are more saturated (intensely colourful) than real colours

• Y is chosen to match a standard measure of brightness - also known as Gamma

Page 22: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Wavelength in nanometers

Page 23: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

XYZ and Device Independence

• XYZ is one industry standard for a device independent colour space

• Some printers and monitors are capable of using this standard to produce colour output that is faithful to the input colours

• What happens (in brief) is that the device is calibrated, so that it knows how to convert to and from XYZ and its own (device-dependent) colour model (RGB or CMYK)

Page 24: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

L*a*b* color space• one of the most widely used and useful of the color

models. • developed by CIE in 1976 as a refinement of the X

YZ color space. • device independent and represents every color thr

ough three components.

- The L value represents luminance and ranges from 0 for black to 100 for white in uniform steps.

- The a and b values are represented as +a/-a for red/green and +b/-b for blue/yellow.

• One of the main application area of the L*a*b color space is in color faxing and JPEG compression.

Page 25: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Generating ColourIssues to consider in colour production:

• Physical limits of hardware

• Range of colours available

• Ways to circumvent limits

– e.g. by trying to increase number of colours

• Non-linearity (a.k.a. gamma correction)

• Portability

– i.e. how to keep the colours of an image true to life

Page 26: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Monitors• Electron guns at the back fire a stream of electron

s towards the front

• The electrons are accelerated towards the front of the tube by a grid which has a large positive voltage applied to it

• The front is covered with phosphors (RGB in colour monitors) which emit light when hit by electrons

• The higher the voltage applied to the guns, the more the current, and the greater the brightness of the phosphors

Page 27: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Monitors (2)• The beams of electrons sweep from left to

right and top to bottom (using the deflection coils) to cover the whole screen

• Voltages applied to the guns is varied, to adjust the intensity of the electron beams, and hence the brightness of individual pixels

• The shadow mask ensures the right guns hit the right coloured phosphors

• The data for the pixels is stored in Video RAM

Page 28: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

CRT (Cathode Ray Tube)

Page 29: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 30: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 31: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Monitor Gamut• The gamut is the range of displayable colour• Choice of exactly which primaries (phosphor col

ours) is a trade-off between

– obtaining a large gamut

– making the display sufficiently bright to see easily

• Note that the gamut shrinks as ambient (surrounding) light increases

– as you will know from trying to use a monitor when the sun is shining

• The darkest colours are lost first

Page 32: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 33: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Gamma Correction• Important issue to be aware of concerning monitors • Brightness is an easily understandable concept but a

subjective one

– the same level of light is perceived to be dim in a bright environment, and very bright in a dark environment

• Luminance (Y, gamma) is an objective measure designed to correspond to our idea of brightness

– measure of power, weighted by a particular spectral sensitivity function characteristic of human vision

Page 34: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Gamma Correction• Roughly speaking...

– Luminance (Y) proportional to Voltage gamma

– Gamma approximately 2.2• In other words, a linear increas

e in the voltage does not mean a linear increase in brightness!

• Gamma correctionmay be needed to produce linearity.

Page 35: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

• This nonlinear relationship is roughly a power function, i.e.

displayed_intensity = pixel_value^gamma.

• Most monitors have a gamma between 1.7 and 2.7.

• Gamma correction consists of applying the inverse of this relationship to the image before display, i.e. by computing

new_pixel_value = old_pixel_value^(1.0/gamma).

Page 36: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d
Page 37: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Gamma corrected

No gamma corrected

Page 38: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Accurate Colour Matching• Monitor calibration alone doesn’t ensure colour

matching• Colour matching technology requires software to

perform calculations matching colours between screen and printer (or other devices)

• The calculations are between the colour models used by the devices (e.g. the RGB of a monitor or the CMYK of a printer) and an objective deviceindependent colour model, such as a CIE colour model

– XYZ, or Lab (as used in Photoshop)

Page 39: Color. Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia and HCI course of University of Stirling, UK. I’d

Colour Matching SystemsExamples:• PANTONE has about 1000 unique colours identified by

swatches• COLORCURVE identifies colours by a lightness value,

a red/green value, and a blue/yellow value• TRUMATCH and FOCOLTONE use “swatch books” tha

t allow the user to select CMYK colours according to what is printed on the printer

How to use:• Install software on computer, print out samples, then ch

oose your colour according to the printout