MGattass Luz e Cor. MGattass Luz a) Espectro de fontes luminosas b) Processos de formação de cor.

Post on 07-Apr-2016

217 views 4 download

Transcript of MGattass Luz e Cor. MGattass Luz a) Espectro de fontes luminosas b) Processos de formação de cor.

MGattass

Luz e Cor

MGattass

Luz

a) Espectro de fontes luminosasb) Processos de formação de cor

MGattass

Natureza da luz

c = f

c = velocidade da luz 3.0x108 m/s

v / f

v

Ondulatória ou partículas?

MGattass

Ondas eletromagnéticas

(m)

VISÍVEL

f (Hertz)

102 104 106 108 1010 1012 1014 1016 1018 1020

rádioAM FM,TVMicro-Ondas

Infra-VermelhoUltra-Violeta

RaiosX

106 104 102 10 10-2 10-4 10-6 10-8 10-10 10-12

vermelho (4.3 1014 Hz), laranja, amarelo,..., verde, azul, violeta (7.51014

Hz)

MGattass

Luz branca (Newton)

luzbranca

prisma

vermelhoalaranjadoamareloverdeazulvioleta

luz branca (acromática) tem todos os comprimentos de onda

Cor Violeta 380-440 nmAzul 440-490 nmVerde 490-565 nmAmarelo 565-590 nmLaranja 590-630 nmVermelho 630-780 nm

1 nm = 10-9 m

MGattass

Espectro de fontes luminosas

Energia

100

0

50

nm

Eluz branca

luz colorida

400 500 600 700comprimento de onda

380 nm 780 nm

MGattass

Medidas do espectro da luz solar

made by J. Parkkinen and P. Silfsten.380 nm 780 nm

MGattass

Espectro CIE D65 e da lâmpada incandecente (illuminant A)

made by J. Parkkinen and P. Silfsten.380 nm 780 nm

MGattass

Espectros

Idit Haran

MGattass

Espectro de quatro fontes luminosas artificiais

made by H.Sugiura.380 nm 780 nm

MGattass

Color temperature e back body temperature

Color temperature - Any light source that has the same chromaticity coordinates as a black body can be described as having the color temperature of that black body . The terms color temperature and black body temperature are not synonymous. Color temperature is derived from colorimetric calculations. There are limitless different spectra that possess a particular color temperature and have little or no resemblance to the black body curve for that temperature.

Black Body – a heated material that emits light as a result of being hot. The spectrum of a black body is determined by the temperature alone. An incandescent lamp and a hot electric stovetop have spectra that are good approximations to black body spectra.

http://www.sunriseinstruments.com/terminology.html

Correlated Color Temperature - the color temperature of the the black body that is closest to the chromaticity coordinates of the light source.

Temperatura da corTemperature Typical Sources

1000K Candles; oil lamps

2000K Very early sunrise; low effect tungsten lamps

2500K Household light bulbs

3000K Studio lights, photo floods

4000K Clear flashbulbs

5000K Typical daylight; electronic flash

5500K The sun at noon near Kodak's offices :-) 6000K Bright sunshine with clear sky

7000K Slightly overcast sky

8000K Hazy sky

9000K Open shade on clear day

10,000K Heavily overcast sky

11,000K Sunless blue skies

20,000+K Open shade in mountains on a really clear day

Monitor ideal

http://webphysics.davidson.edu/alumni/MiLee/java/bb_mjl.htm

What is Color?

Reflectance

Spectrum

Spectral

Power

Distribution

Spectral

Power

Distribution

Illuminant D65

Electromagnetic Wave

(nm)

Frédo Durand and Barb Cutler MIT- EECS

Frédo Durand and Barb Cutler MIT- EECS

What is Color?

Reflectance

Spectrum

Spectral

Power

Distribution

Under F1

Spectral

Power

Distribution

Illuminant F1

Spectral

Power

Distribution

Under D65

Neon Lamp

MGattass

Reflectâncias espectrais de flores

Measurements by E.Koivisto.

MGattass

Características das fontes luminosas

400 500 600 700

nm

E

brilho (brightness)

intensidadedefine o brilho

(brightness)

400 500 600 700 nm

E

saturação

a concentração no comprimento de onda dominante

define asaturação ou pureza

cores pastéissão menos saturadas oumenos puras

nm

E

matiz (hue)

comprimento de onda dominante

define a matiz (hue)

400 500 600 700

MGattass

Características das fontes luminosas

MGattass

Processos aditivos de formação de cores

Ea

Eb

a

ba+b

Ea+b

O olho não vê componentes!

)()()( baba EEE

MGattass

Processos subtrativos de formação de cores

filtros

Luz branca

Filtro verde

Luz verde

Ei Efttransparência

)()()( if EtE

MGattass

Processos de formação de cores:por pigmentos

índices de refração distinto do material base

por pigmentação

A sucessão de reflexão e refração determinam a natureza da luz refletida

tinta preta

tinta branca tinta colorida(saturada)

tons mais escuros(shade)

tons mais claros(tints)

Cinzas(greys)

PALHETADO

PINTOR

tons

MGattass

Colorimetria e Sistemas de Cores

CIE (Commission Internationale de l’Eclairage)» RGB» XYZ» xyY» Lu*v*» La*b*

Sistemas por exumeração» Munsell» Pantone

Sistemas dependentes de dispositivos» mRGB» CMY» CMYK

Sistemas para especificação interativa» HSV» HLS

MGattass

3D Color Spaces

Tri-cromatico sugere espaço 3D

Polar

Luminância

Saturação

Matiz(Hue)

R

G

B

Cartesiano

What is Color?

Stimulus

ObserverObserver

Frédo Durand and Barb Cutler MIT- EECS

Frédo Durand and Barb Cutler MIT- EECS

What is Color?

Spectral

Sensibility

of the

L, M and S

Cones

SM L

RodsRods ConesCones Distribution of Distribution of Cones and RodsCones and Rods

Light

Light

Retina Optic Nerve

AmacrineCells

GanglionCells

HorizontalCells

BipolarCells Rod

Cone

MGattass

Anatomia do olho humano

retina bastonetes

cones vermelhoverdeazul

MGattass

Sensibilidade dos cones do olho humano

Olho humano: Cones (SML) e Bastonetes (cegos para cor)

.020

.04

.06

.08

.10

.12

.14

.16

.18

.20

400 440 480 520 560 600 640 680

fraç

ão d

e lu

z ab

sorv

ida

por

cada

con

e

comprimento de onda (nm)

Curvas se sobrepõe!Não temos como saber qual a sensação de um dado cone!

)()(m

)(s

380 nm 780 nm

MGattass

Sensibilidade do olho em função do comprimento de onda

0%

50%

100%

sens

ibili

dade

rela

tiva

nm

400 500 600 700

Fração da luz absorvida pelo olho

380 nm 780 nm

MGattass

Percepção de cor

400 440 480 520 560 600 640 680

Inte

nsid

ade

comprimento de onda (nm)

Luz Colorida

Luz Branca

não é assim!

dcL

dmcM

dscS

)()(

)()(

)()(

c( )

)(

)(m

)(s

MGattass

Metamerismo

Two lights that appear the same visually. They might have different SPDs (spectral power distributions)

Idit Haran

MGattass

O problema de reprodução de cor em CG

Mundo Real

Espaço Virtual

E

400 700

E

BG

R

• objetivo: produzir a mesma sensação de cor

• olho só distingue 400 mil cores (< 219) 19 bits deveriam ser suficientes

MGattass

CIE RGB

1931 - 2o

1964 - 10o

MGattass

Representação perceptual da cor CIE RGB

r() Rg() G

b() B

Cor MonocromáticaC()

Problema:Não consegue se representar todas as cores visíveis (falta saturação)

R = 700 nmG = 546 nmB = 435.8 nm

C) = r R + gG + bB

MGattass

colour Matching Experiment 1

Image courtesy Bill Freeman

MGattass

colour Matching Experiment 1

Image courtesy Bill Freeman

MGattass

colour Matching Experiment 1

Image courtesy Bill Freeman

MGattass

colour Matching Experiment 2

Image courtesy Bill Freeman

MGattass

colour Matching Experiment 2

Image courtesy Bill Freeman

MGattass

colour Matching Experiment 2

Image courtesy Bill Freeman

MGattass

Artifício para “subtrair” uma componente

C + r R = g G + b B

C = r R + g G + b B, onde r = - r

r() R

g() G

b() B

C()

MGattass

- 0.2

0

0.2

0.4

400 500 600 700

438

nm

546

nm

(nm)Valo

res

dos

tri-e

sim

ulos

Combinação de três cores (RGB) para reproduzir as cores espectrais

r)g)

b)

C) = r) R + gG + bB

Componentes das cores monocromáticas- CIE RGB -

http://www/cvision.ucsd.edu/

MGattass

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

3

380 430 480 530 580 630 680 730 780 (nm)

Valo

res

dos

tri-e

sim

ulos

Combinação de três cores (RGB) para reproduzir as cores espectrais

r)g)

C) = r) R + gG + bB

Componentes das cores monocromáticas- CIE RGB -

b)

R = 700 nmG = 546 nmB = 435.8 nm

http://cvision.ucsd.edu/

MGattass

- 0.2

0

0.2

0.4

400 500 600 700 (nm)

Valo

res

dos

tri-e

sim

ulos r)

g)b)

Componentes das cores monocromáticas- CIE RGB -

dbckB

dgckG

drckR

)()(

)()(

)()(

)(c

MGattass

C = r R + g G + b B

Conversão da base CIE RGB para CIE XYZ

0.490 0.310 0.2000.177 0.813 0.0110.000 0.010 0.990

RGB

XYZ

=

ZzYyXxC )()()()(

MGattass

0.20.40.60.81.01.21.41.61.82.0

Valo

r

nm

400 500 600 700

Cores Básicas do CIE 1931

Componentes das cores monocromáticas- CIE XYZ -

)(x)(y

)(z

Nota: Y foi escolhida de forma a y ser semelhante à curva de sensibilidade do olho (luminância)

ZzYyXxC )()()()(

MGattass

CIE XYZ (2o e 10o)

MGattass

Cores visíveis representadas no sistema CIE XYZ

X

Y

Z

780

380

780

380

780

380

780

380

780

380

780

380

)(

)()(

)(

)()(

)(

)()(

dz

dzcZ

dy

dycY

dx

dxcX)(x)(y

)(z

)(c

nm400

nm700

MGattass

Valores típicos de luminosidade de umde uma superfície

Modo Valores (lux)Luz do dia (máximo) 100 000Luz de dia sombrio 10 000Interior próximo a janela 1 000Minimo p/ trabalho 100Lua cheia 0.2Luz das estrelas 0.0003

… e o olho se acomoda!

• Um parenteses sobre luminosidade ou brilho

Retirando a luminosidade ou brilhoda definição da cor em CIE XYZ

MGattass

MGattass

x = X/(X+Y+Z)y = Y/(X+Y+Z)z = Z/(X+Y+Z)

• Retirar o fator luminosidade ou brilho projetando no plano X+Y+Z=1

note que x+y+z =1

Retirando a luminosidade ou brilhoda definição da cor em CIE XYZ

X = (x / y ) YY = YZ = (1-x-y ) Y / y

X

Y

Z

Plano X+Y+Z=1

MGattass

Cores visíveis representadas no sistema CIE xyY

X

Y

Z

MGattass

520

480

490

500

510540

560

Purpura

580

600

= 700

400

Azul

Cian

Verde

Amarelo

Vermelho

x

y

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

Branco

0.1

0.2

0.3

0.4

0.6

0.5

0.7

0.8

0.9

1.0

Cores visíveis representadas no sistema CIE xyY

MGattass

Nome das cores

MGattass

Nome das cores

x

650610

590

550

570

600

580

560

540

505

500

510

520 530

490

495

485

480

470450

1.00.50.0

0.5

0.9

greenyellow-green

yelloworange

red

magenta

purpleblue

cyan whitepink

y

MGattass

Planckian locus

MGattass

y

x0.2 0.4 0.6 0.8 1.0

Branco0.2

0.4

0.6

0.8

1.0

C2

C1

cores saturadas

a

b

saturação de C1

y

x0.2 0.4 0.6 0.8 1.0

Branco0.2

0.4

0.6

0.8

1.0

C

C

C + C = Branco

Saturação e cor complementar no diagrama de cromaticidade xy

baas

C é complementar a C

MGattass

After-Image-white

MGattass

Opponent Colors

Image Afterimage

MGattass

x

y

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

0.1

0.2

0.3

0.4

0.6

0.5

0.7

0.8

0.9

1.0

gamute de um monitor

gamute de uma impressora

C1

C2

W

C2 cor não realizável

C1 cor não realizável na impressora

Gamute de cromaticidade de dispositivos

MGattass

Gamut de cores de um monitor RGB

Par de coresperceptualmenteequidistantes

Cores perceptualmente equidistantes representadas no sistema CIE xyY

MGattass

Weber's law

The change in a stimulus that will be just noticeable (JND) is a constant ratio of the original stimulus.

IIL

)log(IL I

L

E. H. Weber, in 1834

MGattass

Correção Gama

inout

1xy

2yg

21xg

21xg 0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

15.0

0.1

2.25.1

25.1

MGattass

Correção Gama

Intensidade luminosa

Perc

epçã

o hu

man

a "u

nifo

rme"

MGattass

Correção Gama(a coincidência)

Perc

epçã

o hu

man

a

Sina

l de

víde

o (v

olta

gem

ou

códi

go)

Intensidade luminosa

MGattass

O sistema tem muitos Gamas!

http://www.w3.org/TR/2003/REC-PNG-20031110/

input_exponent the exponent of the image sensor.

encoding_exponent the exponent of any transfer function performed by the process or device writing the datastream.

decoding_exponent the exponent of any transfer function performed by the software reading the image datastream.

LUT_exponent the exponent of the transfer function applied between the frame buffer and the display device (typically this is applied by a Look Up Table).

output_exponent the exponent of the display device. For a CRT, this is typically a value close to 2.2.

MGattass

Gama de uma ponta a outra (end to end)

http://www.libpng.org/pub/png/spec/1.2/PNG-GammaAppendix.html

“Good end-to-end exponents are determined from experience. For example, for photographic prints it's about 1.0; for slides intended to be projected in a dark room it's about 1.5; for television it's about 1.14.”

MGattass

Que ajuste adotar?0 36 73 10

9

146

182

219

255 0 96 136

167

193

216

236

255

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

5.0

0.1

Tons de cinza igualmente espaçados

Tons de cinza corrigidos

Tons de cinza igualmente espaçados

Tons de cinza corrigidos

Tons de cinza igualmente espaçados

Tons de cinza corrigidos

Tons de cinza igualmente espaçados

Tons de cinza corrigidos

MGattass

CIE L* Correção perceptual

L*

008850.019.903

008850.016116 3*

ww

ww

YYse

YY

YYse

YY

L

wYY

0

10

20

30

40

50

60

70

80

90

100

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

veja: http://www.graphics.cornell.edu/~westin/gamma/gamma.html

1 xdxdy

MGattass

(X,Y,Z) = componentes da cor no espaço CIE XYZ(Xw,Yw,Zw) = componentes do branco de referência

Dados:

u* = 13L*(u’- uw)

v* = 13L*(v’- vw)

u’=4X/(X+15Y+3Z)v’=9Y/(X+15Y+3Z)

uw=4Xw/(Xw+15Yw+3Zw)vw=9Yw/(Xw+15Yw+3Zw)

Calcula-se:

L* = 116 (Y/Yw)1/3 - 16 se Y/Yw > 0.008850ou

L* = 903.19(Y/Yw) se Y/Yw 0.008850

a* = 500[(X/Xw)1/3- (Y/Yw)1/3]

b* = 200[ (Y/Yw)1/3) - (Z/Zw)1/3]

Sistemas de cor perceptualmente uniformes do CIE Luv e CIE Lab

(1976)

u*,v* (ou a*,b*) são as componentes de cromaticidade da corL* é a luminosidade corrigida para uma escala percetualmente linear

MGattass

CIE xyY CIE LUV

MGattass

CIE LAB

MGattass

CIE 1976 (L*a*b*) colour space, Lightnedd

11616116*

31

nYYL

L = Lightness (black= 0 and white = 100)

MGattass

CIE 1976 (L*a*b*) colour space, Hue and Chroma

31

31

500*nn Y

YXXa

31

31

200*nn Z

ZYYb

**arctan

abhab

Hue (Matiz):

22 ** baCab

Chroma:

MGattass

CIE 1976 a,b colour difference and CIELAB components

222* *** baLEab

51 just noticeble difference

small color differences

*abH variação de ângulo ou

2*22** * ababab CLEH

2*2*2* * ababab HCLE

MGattass

CIE 1994 colour difference

k parametric factors, industry dependent S weighting functions, depend on location in colour

space:

E Lk S

Ck S

Hk S94

2 2 21 2

**

/

L L

ab*

C C

ab*

H H

MGattass

Branco de referência

Observer 2° (CIE 1931) 10° (CIE 1964)

Illuminant X2 Y2 Z2 X10 Y10 Z10

A (Incandescent) 109.85 100 35.585 111.144 100 35.2

C 98.074 100 118.232 97.285 100 116.145

D50 96.422 100 82.521 96.72 100 81.427

D55 95.682 100 92.149 95.799 100 90.926

D65 (Daylight) 95.047 100 108.883 94.811 100 107.304

D75 94.972 100 122.638 94.416 100 120.641

F2 (Fluorescent) 99.187 100 67.395 103.28 100 69.026

F7 95.044 100 108.755 95.792 100 107.687

F11 100.966 100 64.37 103.866 100 65.627

Conversão Lab - XYZ

var_X = X /  95.047          //Observer = 2°, Illuminant = D65var_Y = Y / 100.000var_Z = Z / 108.883

if ( var_X > 0.008856 ) var_X = var_X ^ ( 1/3 )else                    var_X = ( 7.787 * var_X ) + ( 16 / 116 )if ( var_Y > 0.008856 ) var_Y = var_Y ^ ( 1/3 )else                    var_Y = ( 7.787 * var_Y ) + ( 16 / 116 )if ( var_Z > 0.008856 ) var_Z = var_Z ^ ( 1/3 )else                    var_Z = ( 7.787 * var_Z ) + ( 16 / 116 )

CIE-L* = ( 116 * var_Y ) - 16CIE-a* = 500 * ( var_X - var_Y )CIE-b* = 200 * ( var_Y - var_Z )

var_Y = ( CIE-L* + 16 ) / 116var_X = CIE-a* / 500 + var_Yvar_Z = var_Y - CIE-b* / 200

if ( var_Y^3 > 0.008856 ) var_Y = var_Y^3else                      var_Y = ( var_Y - 16 / 116 ) / 7.787if ( var_X^3 > 0.008856 ) var_X = var_X^3else                      var_X = ( var_X - 16 / 116 ) / 7.787if ( var_Z^3 > 0.008856 ) var_Z = var_Z^3else                      var_Z = ( var_Z - 16 / 116 ) / 7.787

X = ref_X * var_X     //ref_X =  95.047  Observer= 2°, Illuminant= D65Y = ref_Y * var_Y     //ref_Y = 100.000Z = ref_Z * var_Z     //ref_Z = 108.883

http://www.easyrgb.com/math.php

31

31

500*nn Y

YXXa

31

31

200*nn Z

ZYYb

11616116*

31

nYYL

MGattass

The Artist Point of View

Hue - The color we see (red, green, purple) Saturation - How far is the color from gray (pink is less saturated

than red, sky blue is less saturated than royal blue) Brightness/Lightness (Luminance) - How bright is the color

white

MGattass

Munsell Color System

Equal perceptual steps in Hue Saturation Value.Hue: R, YR, Y, GY, G, BG, B, PB, P, RP (each subdivided into 10)Value: 0 ... 10 (dark ... pure white)Chroma: 0 ... 20 (neutral ... saturated)

Example: 5YR 8/4

MGattass

Munsell Book of Colors

MGattass

Munsell Book of Colors

MGattass

Sistemas de cores porenumeração

MunsellAlbert H. Munsell - artista plástico (1905)

Pantone (início dos 60’s)

mapas de cores

croma ou saturação

tonalidadeou matiz

valor ou intensidade

base para os sistemas de interface

MGattass

Monitores

I ) Sistemas dos Monitores - mRGB

processo aditivo

pixel

HiColor

MGattass

Sistemas de cor dependentes de dispositivo - mRGB

I ) Sistemas dos Monitores - mRGB

normalmentetemos 1 byte para cada componentemapeando[0, 255] em [0,1]

processo aditivo

R

G

B

1.0

1.0

1.0

Y

M

CW

K vermelho

azul

preto

verdeamarelo

ciano

magenta

branco

Componentes somam como vetores

MGattass

Sistemas de cor dependentes de dispositivo - mRGB

I ) Sistemas dos Monitores - mRGB

MGattass

Conversão do mRGB paraCIE XYZ e vice-versa

Dados (R,G,B) determine (x,y)

1) O fabricante deve informar as coordenadas x,y dos fosforos do monitor

ex. R G B whitex 0.64 0.30 0.15 0.3127y 0.33 0.60 0.06 0.3290

2) Determine a coordenada z = 1 - x - y

R G B whitez 0.04 0.12 0.787 0.3582

ex.

3) As coordenadas X,Y,Z são obtidas de:

XYZ

XR

YR

ZR

XG

YG

ZG

XB

YB

ZB

RGB

XR

YR

ZR

XG

YG

ZG

XB

YB

ZB

=GR B= + +

O problema agora consiste em encontrar as componentes XYZ do R, G e B

ITU-R BT.709International Telecommunication Union

MGattass

Conversão do mRGB paraCIE XYZ (cont.)

xR = XR/ (XR+YR+ZR), se CR = XR+YR+ZR então XR = xRCR

substituindo na matriz da equação

XYZ

xRCR

yRCR

zRCR

RGB

=XR

YR

ZR

XG

YG

ZG

XB

YB

ZB

RGB

=xGCG

yGCG

zGCG

xBCB

yBCB

zBCB

para determinar as componetes CR , CG e CB usamos o fato de que R=G=B=1 é a cor branca.

XW

YW

ZW

xRCR

yRCR

zRCR

111

=xR

yR

zR

xG

yG

zG

xB

yB

zB

CR

CG

CB

=xGCG

yGCG

zGCG

xBCB

yBCB

zBCB

YR = yRCR e ZR = zRCR eXG = xGCG , YG = yGCG e ZG = zGCG XB = xBCB , YB = yBCB e ZB = zBCB

da mesma forma

MGattass

Conversão do mRGB paraCIE XYZ (cont.)

Suponha que o a luminosidade do branco YW = 1.00, temos:

0.951.001.09

=CR

CG

CB

0.64 0.30 0.15 0.33 0.60 0.060.03 0.10 0.79

CR

CG

CB

resolvendo =0.6441.1921.203

=0.412 0.358 0.1800.213 0.715 0.0720.019 0.119 0.950

XYZ

RGB

3.240 -1.537 -0.499-0.969 1.876 0.042 0.056 -0.204 1.057

RGB

=XYZ

Concluindo:

YW = yW CW CW = YW / yW = 1.0/0.3290 = 3.04 XW = xW CW = 0.31x3.04 = 0.9506 ZW = zW CW = 0.3582x316.45 = 1.089

MGattass

RGB normalizado

Cubo RGB

222

222

222

BGR

Bb

BGR

Gg

BGRRr

BGRBb

BGRGg

BGRRr

MGattass

- sRGB – “A Standard Default Color Space for the Intenet”

Hewlett-Packard and Microsoft propose the addition of support for a standard color space, sRGB, within the Microsoft operating systems, HP products, the Internet, and all other interested vendors.

The aim of this color space is to complement the current color management strategies by enabling a third method of handling color in the operating systems, device drivers and the Internet that utilizes a simple and robust device independent color definition.

MGattass

ITU-R BT.709

CIE chromaticities for ITU-R BT.709 reference primaries and CIE standard illuminant

Red Green Blue D65 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

MGattass

sRGB viewing environment Parameters

Condition sRGB Luminance level (typical CRT) 80 cd/m2 Illuminant White x = 0.3127, y = 0.3291 (D65) Image surround 20% reflectance Encoding Ambient Illuminance Level 64 lux Encoding Ambient White Point x = 0.3457, y = 0.3585 (D50) Encoding Viewing Flare 1.0% Typical Ambient Illuminance Level 200 lux Typical Ambient White Point x = 0.3457, y = 0.3585 (D50) Typical Viewing Flare 5.0%

MGattass

XYZ sRGB: Passo 1

Converte utilizando ITU-R BT.709:

]10[

MGattass

XYZ sRGB: Passo 2The sRGB tristimulus values are next transformed to nonlinear sR'G'B' values as follows:

If                         

else if                        

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

MGattass

XYZ sRGB: Passo 3 –Digital Color

MGattass

XYZ RGB

ref_X =  95.047        //Observer = 2°, Illuminant = D65ref_Y = 100.000ref_Z = 108.883

var_X = X / 100        //X = From 0 to ref_Xvar_Y = Y / 100        //Y = From 0 to ref_Yvar_Z = Z / 100        //Z = From 0 to ref_Y

var_R = var_X *  3.2406 + var_Y * -1.5372 + var_Z * -0.4986var_G = var_X * -0.9689 + var_Y *  1.8758 + var_Z *  0.0415var_B = var_X *  0.0557 + var_Y * -0.2040 + var_Z *  1.0570

if ( var_R > 0.0031308 ) var_R = 1.055 * ( var_R ^ ( 1 / 2.4 ) ) - 0.055else                     var_R = 12.92 * var_Rif ( var_G > 0.0031308 ) var_G = 1.055 * ( var_G ^ ( 1 / 2.4 ) ) - 0.055else                     var_G = 12.92 * var_Gif ( var_B > 0.0031308 ) var_B = 1.055 * ( var_B ^ ( 1 / 2.4 ) ) - 0.055else                     var_B = 12.92 * var_B

R = var_R * 255G = var_G * 255B = var_B * 255 http://www.easyrgb.com/

MGattass

sRGB XYZ

S

N

MGattass

XYZ RGB

var_R = ( R / 255 )        //R = From 0 to 255var_G = ( G / 255 )        //G = From 0 to 255var_B = ( B / 255 )        //B = From 0 to 255

if ( var_R > 0.04045 ) var_R = ( ( var_R + 0.055 ) / 1.055 ) ^ 2.4else                   var_R = var_R / 12.92if ( var_G > 0.04045 ) var_G = ( ( var_G + 0.055 ) / 1.055 ) ^ 2.4else                   var_G = var_G / 12.92if ( var_B > 0.04045 ) var_B = ( ( var_B + 0.055 ) / 1.055 ) ^ 2.4else                   var_B = var_B / 12.92

var_R = var_R * 100var_G = var_G * 100var_B = var_B * 100

//Observer. = 2°, Illuminant = D65X = var_R * 0.4124 + var_G * 0.3576 + var_B * 0.1805Y = var_R * 0.2126 + var_G * 0.7152 + var_B * 0.0722Z = var_R * 0.0193 + var_G * 0.1192 + var_B * 0.9505

http://www.easyrgb.com/

MGattass

Reflexão da luz num papel

Reflexão difusa ou lambertiana

MGattass

Sistemas de cor dependentes de dispositivo - CMY

II ) Sistemas das Impressoras -CMY ou CMYK

processo predominantementesubtrativo

C

Y

M

R G

B

K

luz branca (1,1,1)

tinta ciano (0,1,1)

luz ciano (0,1,1)

componente vermelha é absorvidapapel branco (1,1,1)

normal

MGattass

yellow

B G R

+

B G R

red

R

=

magenta

B G R

B G R

Idit Haran

R=M+Y

MGattass

Sistemas de cor dependentes de dispositivo - CMY

II ) Sistemas das Impressoras -CMY ou CMYK

MGattass

CMYK Color Model

CMYK = Cyan, Magenta, Yellow, blacK

Magenta – removes Green

B G R

Black – removes all

Yellow – removes Blue

B G R

B G R

trans

mit

Cyan – removes Red

MGattass

Conversão RGB para CMY e vice-versa

B

R

G

1.0

1.0

1.0

Y

M

CW

K vermelho

azul

preto

verdeamarelo

ciano

magenta

branco

1.0

1.0

1.0

Y

M

C

W

Kpreto

amarelo

ciano

magenta

branco

verde

vermelho

azul

(r,g,b) (c,m,y)

BGR

YMC

111

MGattass

Sistemas de cor dependentes de dispositivo - CMYK

K := min (C, M, Y)

C := C - KM := M - KY := Y - K

O sistema CMYK usa o preto (blacK) porque o pigmento (carbono) é mais barato;

A superposição de ciano, magenta e amarelo para produzir preto gera um tom meio puxado para o marron.

M

Y

K

C

base linearmentedependente

MGattass

C + M + Y = K (black)

100 50 70

=

50 0 2050

+

C M Y C M YK

CMY + Black

Using three inks for black is expensive C+M+Y = dark brown not black Black instead of C+M+Y is crisper with more contrast

MGattass

HSV

MGattass

HSV/HSB Color Space

Brightness Scale

Saturation Scale

HSV = Hue Saturation Value HSB = Hue Saturation Brightness

MGattass

HSV

ValueSaturation

Hue

MGattass

Sistemas de cor mais indicados para interface com usuário - HSV

R

G

B

C

M

Y

W

R

G

B

V decompor (r,g,b)na base de V e doespaço ortogonala ele.

K S

V

H

R

YG

C

B M

Saturation

Hue

Value

MGattass

Transformação RGB para HSV e vice-versa

R

G

B

Max = max(R,G,B)Min = min(R,G,B)

no caso G e B, respectivamente

R

G

B

V = Max

S = ( Max-Min ) / Max B

R

S=0

S=1

Min

Max

MGattass

Conversão RGB para HSVcálculo de H

R (0o)

Y (60o)G(120o)

C(180o)

B(240o) M(300o)

SH

V

0o

60o120o

180o

240o 300o

120o

180o

R

B

r

b gH

Hg b

g

120 60

MGattass

HLS Color Space

red0

green120 yellow

Blue240

cyan

magenta

V

black0.0

0.5

HS

HLS = Hue Lightness Saturation

MGattass

HLS

L

Pierre Courtellemont

MGattass

Opponent Color Spaces

+black-white

red-green

blue-yellow

+

+

-

-

-

MGattass

YIQ Color Model YIQ is the color model used for color TV in America

(NTSC= National Television Systems Committee) Y is luminance, I & Q are color (I=red/green,Q=blue/yellow)

» Note: Y is the same as CIE’s Y » Result: backwards compatibility with B/W TV!

Convert from RGB to YIQ:

The YIQ model exploits properties of our visual system, which allows to assign different bandwidth for each of the primaries (4 MHz to Y, 1.5 to I and 0.6 to Q)

BGR

QIY

31.052.021.032.028.060.0

11.059.030.0

MGattass

Função de Transferência CCIR Rec.709

0

0,2

0,4

0,6

0,8

10

0,1

0,2

0,3

0,4

0,5

0,6

0,7

0,8

0,9 1

Intensidade da luz

Sina

l de

víde

o (v

olta

gem

ou

códi

go)

R’709 = 1.099 R0.45 - 0.099G’709 = 1.099 G0.45 - 0.099B’709 = 1.099 B0.45 - 0.099

Codificação de Vídeo

MGattass

Sistema (Y’, B’-Y’, R’-Y’)

= 0.299 0.587 0.114-0.299 -0.587 0.886 0.701 -0.587 0.114

Y’

B’- Y’R’- Y’

R’G’B’

Y’601 = 0.2999 R’ + 0.587 G’ + 0.114 B’ Componenteluma de vídeo

B’-Y’601 = B’ -(0.2999 R’ + 0.587 G’ + 0.114 B’)R’-Y’601 = R’ -(0.2999 R’ + 0.587 G’ + 0.114 B’)

Componentede diferençade cor

Motivação:As componentes de diferença de cor podem ser sub-amostradas!

MGattass

Cubo RGB no espaço (Y’, B’-Y’, R’-Y’)

MGattass

Conversão para vídeo

vídeos analógicos

(BetaCam e M-II)vídeos

digitais com 8 bits/componente

(JPEG, MPEG)

P B Y

P R Y

b

r

0 51 0114

0 51 0 299

..

( ' ' )

..

( ' ' )

Y Y

C B Y

C R Y

b

b b

r b

' '..

( ' ' )

..

( ' ' )

,

,

8

8

8

16 235

128 11205

1 0114

128 1120 5

1 0 299

MGattass

Uma fórmula para conversãopara video

RGB to YCrCb

YCrCb to RGB

http://www.efg2.com/Lab/Library/Color/Science.htm

MGattass

Aparencia de cor

MGattass

Banda de Mach

Posição

Branco

PretoIn

tens

idad

e

Efeito da Banda de Mach

MGattass

Contraste Simultâneo

MGattass

Contraste

MGattass

Conclusões do cérebro

MGattass

MGattass

25 6

45 8

56 29

MGattass

Referências

http://cvision.ucsd.edu/ http://www.poynton.com/Poynton-color.html http://www.efg2.com/Lab/ http://www.easyrgb.com/ http://cvrl.ioo.ucl.ac.uk/cmfs.htm

FIM

MGattass

Reflexão e Refração

i = velocidade da luz no material ivelocidade da luz no vácuo

sen r = sen i

lei de Snell(1621)

i

r

incidente refletida

refratada

material 1i

material 2

N

MGattass

MGattass

MGattass

Processos aditivos de formação de cores

Ea+b() = Ea ()+Eb()

Ea

Eb

a

ba+b

Ea+b

O olho não vê componentes!

MGattass

Intensidade vs contraste

Computer Vision - A Modern ApproachSet: Color

Slides by D.A. Forsyth

MGattass

Reflexão e Refração

i

MGattass

Refração da luz