24
Week 6 Colour

Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

Embed Size (px)

Citation preview

Page 1: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

Week 6Colour

Page 2: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

2

Overview

By the end of this lecture you will be familiar with:– Human visual system– Foundations of light and colour– HSV and user-oriented colour models

Page 3: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

3

The Human Eye

Page 4: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

4

HVS Function

• Part of the nervous system• Light enters through the pupil (2mm-9mm)• The lens focuses the light onto the retina• Retina cells are of two types: cones and rods• Huge dynamic range of around 80dB

– 30,000 candel/m2 (white A4 in bright sunlight)– 0.03 cd/m2 (same page in moonlight)

Page 5: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

5

The Human Visual System• Retina

– light-sensitive membrane consisting of three types of colour sensors (cones)

– each type is most receptive to wavelengths in either the red, green or blue ranges

– perceived colour is a result of the relative excitation of each group of cones

• Leads to a 3-D representation of colour based on red, green & blue primaries

Page 6: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

6

Contrast Sensitivity of the Eye

• The perception of fine detail is dependent on luminance level

• The eye is good at identifying sharp boundaries• Detail can be missed if the changes are gradual• The eye prefers richness in colour than

resolution– consider PlayStation or Nintendo

• The eye can only resolve about 40 grey levels

Page 7: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

7

Implications for Multimedia

• Preserve edge information• Consider brightness for fine detail• Consider number of colour shades in use• Consider when to use inverse video• Carefully choose contrasting colours• Useful properties for image & video coding...

Page 8: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

Colour Models

Page 9: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

9

Light• A narrow frequency band within the spectrum

of electromagnetic energy– the visible spectrum from 400-700nm – others are ultraviolet, infrared, microwaves etc.– each wavelength within the visible spectrum

produces light of a different colour– 400nm=violets, blues, greens, yellows,

700nm=oranges, reds

Page 10: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

10

Spectral Density• P() - The power per unit wavelength of a

coloured light

P()

(nm)400 700

viol

et

Indi

go

Blu

e

Gre

en

Yel

low

Ora

nge

Red

Page 11: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

11

Why we see colours?

• Materials have different absorption and scattering amounts for the different wavelengths of light

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

longer (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 12: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

12

Additive Colour Matching

• Mixing different amounts and wavelengths of light together produces colours

• Maxwell’s trichromatic colour theory

Page 13: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

13

Colour Description• Coloured light is described in terms of :

– Hue: the “perceived colour” (red/yellow etc) determined by the dominant wavelength. No dominant wavelength = achromatic

– Saturation: the purity of the colour– Brightness/Luminance: the perceived intensity

of the light

• The Chrominance of a colour is the combination of hue and saturation

Page 14: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

14

Colour Definition

• Dominant wavelength method– useful for description of colours, but not for

precisely obtaining and representing colour values

• A more precise method is based on the reception of coloured light by the human eye

Page 15: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

15

RGB Colour CubeGreen

Red

Blue

Green (0,1,0)

Cyan (0,1,1)

Yellow (1,1,0)

White (1,1,1)

Black (0,0,0)

Blue (0,0,1) Magenta (1,0,1)

Red (1,0,0)

Page 16: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

16

Using RGB• Hardware-oriented model

– Equally defined & independent RGB values are well suited to graphics architecture

– Greyscales along line where R=G=B– Additive colour specification (additive primaries)

• colours defined in terms of an addition to black

– Linear colour combination operation• suitable for colour merging operations, but less useful for

colour mixing

Page 17: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

17

HSV (Hue, Saturation, Value)• Developed by AR Smith (1978)

– re-coding of RGB colour cube to generate a user-view of colour

– set RGB cube on black vertex and look down from the white vertex

– primary and secondary colours are arranged radially around the centre axis

Page 18: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

18

The HSV Hexicone

Black

Red

Green

Blue

Yellow

Cyan

Magenta

White

Saturation

Value

Hue

Page 19: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

19

Using HSV• First, select the colour

(pure hue) which most closely matches the desired colour (hue)

Page 20: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

20

Using HSV cont.

• Lighten the colour by adding white (saturation)

• Saturation indicates the degree to which the hue differs from a neutral gray. The values run from 0%, which is no color saturation, to 100%, which is the fullest saturation of a given hue at a given percentage of illumination.

Page 21: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

21

Using HSV cont.

• Darken or lighten the colour appropriately by changing the level of illumination. Values run as percentages; 0% appears as black (no light), whilst 100% is full illumination, which washes out the colour.

Page 22: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

22

Overview of the HSV cone

Page 23: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

23

Other Hardware Oriented Models

• CMYK– Cyan, Magenta, Yellow, Black– Subtractive primaries

• colour is specified as a subtraction from white• used in printing industry

• YUV, YIQ– Broadcast standards (YUV=UK, YIQ=USA)– Y=Luminance, UV/IQ are chrominance– RGB re-coded for narrow transmission

bandwidth

Page 24: Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented

24

User-Oriented Models

• RGB-based models are derived from a good fit with hardware requirements– but they do not provide an intuitive means of user

colour specification– e.g. how to specify brown, gold, etc.?

• User-oriented models attempt to view colour using the perceptive terms identified earlier