COLORCOLOR Angel 1.4 and 2.4 J. Lindblad 2001-11-01.

Post on 05-Jan-2016

223 views 2 download

Tags:

transcript

COLORAngel 1.4 and 2.4

J. Lindblad 2001-11-01

Elements of color

Color = The eye’s and the brain’s impression of electromagnetic radiation in the visual spectra.

How is color perceived?

light source

reflecting object

detector

s( )r( )

r

g

b

( )

( )

( )

rodsrods & cones

red-sensitive

green-sensitive

blue-sensitive

Visible spectrum

The Fovea

There are three types of cones, S, M and L

RodsSense luminance, or ”brightness”, but not color.Are spread out across the whole retina, and dominate when the pupil is large, i.e. night vision. Less color is seen at night. The respons is not linear, but logarithmic.The appearance of an object’s intensity depends on the surroundings; the sensation is relativ and not absolute.

Three kinds of conesr

g

b

( )

( )

( )

red-sensitive

green-sensitive

blue-sensitive

wavelength

r=700nmg=546.1nm

b=435.8nm

In order to standardize the description of color, a large number of people were instructed to say what combination of basic colors a certain color sample consisted of in standard lighting. This resulted in the color matching curves, i.e. transform

r g b( ), ( ), ( ) x y z( ), ( ), ( )

CIE standard(Comission Internationale de L’Eclairage, 1931)

Color perception•Different spectra can result in identical sensations, called metamers•Color perception results from the simultaneous stimulation of 3 cone types (trichromat)•Our perception of color is affected by surrounding effects and adaptation

standard lightsource

object reflectance

CIE 1931 standard observer

CIE XYZ values

400nm 700nm 400nm 700nm 400nm 700nm

xy

z

xx =X=14.27Y=14.31Z=71.52

s( ) r( )

Each color is represented by a point (X,Y,Z) in the 3D CIE color space. The point is called the tristimulus value.

X s r x d

Y s r y d

Z s r z d

( ) ( ) ( )

( ) ( ) ( )

( ) ( ) ( )

Projection of the CIE XYZ-space

Perceptual equal distances

RGB/CMY color space

RGB - for additive color mixing, e.g. computer screen.CMY - for subtractive color mixing, e.g. printing or painting.

Additive Subtractive

R G B C M Y (K)

Mixing light and mixing pigment

Mixing light and mixing pigment

green

blue

red

yellow

cyan

magenta

green

blue

red

yellow

cyan

magenta

CMY

RGB

= 1- [][] R+B+G=white (additive) R+G=Y

C+M+Y=black (subtractive) C+M=B etc...

(CMYK common in printing, where K is black pigment)

RGB within CIE XYZ-space

HLS color spaceHueLightnesSaturation

Hue=dominant wavelength, toneLightness=intensity, brightnessSaturation=purity, dilution by white

Important aspects:•Intensity decoupled from color•Related to how humans perceive color

YIQ color space

Y= Lightness I= Inphase = ammount red-greenQ= Quadrature = ammount blue-yellow

• Optimised for transmission (TV broadcast).

• Compatible with BW monitors (use only Y component)

• Human eye is more sensitive to variations in lightness than variations in hue and saturation and more bandwith (bits) is used for Y.

NCS color description

NCS=Natural Color SystemA psychological more than a physiological description of color.Common among artists, designers etc.

w

b

c

2060-R50B=20% white60% blackred with 50% blue20

60

40

Color is relative

gröngrön lilalila gulgul blåblå svartsvart

hjärnan är lättlurad

Non-existing colors(without use of psychadelic drugs)

Blind spot; look at left cross with your right eye

Colour context

Shape context

Chromaticadaption

Mach bands

Gamma correctionMost displays have non-linear intensity scales. The most common correction method is called gamma correction (usually implemeted with a lookup table)

Sometimes in computer graphics this effect is exaggerated to compensate for the adaptation of the eye.

True-color frame buffer

Store R,G,B values directly in the frame-buffer.

Each pixel requires at least 3 bytes => 2^24 colors.

Indexed-color frame buffer

Store index into a color map in the frame-buffer.

Each pixel requires at least 1 bytes => 2^8 simultaneous colors.

Enables color-map animations.

Different blending versions(how to combine color values)

Additive blending

C=A+B

e.g. combining light

Subtractive blending

C=A-(1-B)

e.g. filter effect

Average blending

C=(A+B)/2 or C=uA+vB

e.g. for anti-aliasing

Multiplicative blending

C=A*B

e.g. combining light and matter