Computação Gráfica Interativa - Gattass

Apresentações semelhantes


Apresentação em tema: "Computação Gráfica Interativa - Gattass"— Transcrição da apresentação:

1 Computação Gráfica Interativa - Gattass
Luz e Cor 4/13/2017 MGattass Luz e Cor

2 Espectro de fontes luminosas Processos de formação de cor
Luz Espectro de fontes luminosas Processos de formação de cor MGattass

3 Computação Gráfica Interativa - Gattass
Natureza da luz 4/13/2017 Ondulatória ou partículas? c = velocidade da luz @ 3.0x108 m/s l = v / f v c = l f MGattass Luz e Cor

4 Ondas eletromagnéticas
Computação Gráfica Interativa - Gattass 4/13/2017 Ondas eletromagnéticas 102 104 106 108 1010 1012 1014 1016 1018 1020 rádioAM FM,TV Micro-Ondas Infra-Vermelho Ultra-Violeta RaiosX f (Hertz) l (m) 106 104 102 10 10-2 10-4 10-6 10-8 10-10 10-12 VISÍVEL vermelho (4.3 1014 Hz), laranja, amarelo,..., verde, azul, violeta (7.51014 Hz) MGattass Luz e Cor

5 Computação Gráfica Interativa - Gattass
4/13/2017 Luz branca (Newton) vermelho alaranjado amarelo verde azul violeta luz branca prisma Cor l Violeta nm Azul nm Verde nm Amarelo nm Laranja nm Vermelho nm 1 nm = 10-9 m luz branca (acromática) tem todos os comprimentos de onda MGattass Luz e Cor

6 Espectro de fontes luminosas
Computação Gráfica Interativa - Gattass 4/13/2017 Espectro de fontes luminosas Energia E 100 luz branca 50 luz colorida l (nm) 400 500 600 700 comprimento de onda 380 nm 780 nm MGattass Luz e Cor

7 Medidas do espectro da luz solar
380 nm 780 nm MGattass made by J. Parkkinen and P. Silfsten.

8 Espectro CIE D65 e da lâmpada incandecente (illuminant A)
380 nm 780 nm MGattass made by J. Parkkinen and P. Silfsten.

9 Espectros Idit Haran MGattass

10 Espectro de quatro fontes luminosas artificiais
380 nm 780 nm MGattass made by H.Sugiura.

11 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. Correlated Color Temperature - the color temperature of the the black body that is closest to the chromaticity coordinates of the light source. MGattass

12 Temperatura da cor Temperature 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

13 What is Color? Frédo Durand and Barb Cutler MIT- EECS Illuminant D65
Spectral Power Distribution Illuminant D65 Electromagnetic Wave (nm) Reflectance Spectrum Spectral Power Distribution Frédo Durand and Barb Cutler MIT- EECS

14 What is Color? Frédo Durand and Barb Cutler MIT- EECS Neon Lamp
Spectral Power Distribution Illuminant F1 Reflectance Spectrum Spectral Power Distribution Under D65 Spectral Power Distribution Under F1 Frédo Durand and Barb Cutler MIT- EECS

15 Reflectâncias espectrais de flores
MGattass Measurements by E.Koivisto.

16 Características das fontes luminosas
Computação Gráfica Interativa - Gattass 4/13/2017 Características das fontes luminosas 400 500 600 700 l (nm) E brilho (brightness) intensidade define o brilho (brightness) l (nm) E matiz (hue) comprimento de onda dominante define a 400 500 600 700 400 500 600 700 l (nm) E saturação a concentração no comprimento de onda dominante define a saturação ou pureza cores pastéis são menos saturadas ou menos puras MGattass Luz e Cor

17 Características das fontes luminosas
Computação Gráfica Interativa - Gattass 4/13/2017 Características das fontes luminosas MGattass Luz e Cor

18 Processos aditivos de formação de cores
Computação Gráfica Interativa - Gattass 4/13/2017 Processos aditivos de formação de cores l Ea Eb a b a+b Ea+b O olho não vê componentes! MGattass Luz e Cor

19

20 Processos subtrativos de formação de cores
Computação Gráfica Interativa - Gattass 4/13/2017 Processos subtrativos de formação de cores filtros Luz branca Filtro verde l Ei Ef t transparência MGattass Luz e Cor

21 Processos de formação de cores: por pigmentos
Computação Gráfica Interativa - Gattass 4/13/2017 Processos de formação de cores: por pigmentos por pigmentação A sucessão de reflexão e refração determinam a natureza da luz refletida índices de refração distinto do material base tinta preta tinta branca tinta colorida (saturada) tons mais escuros (shade) claros (tints) Cinzas (greys) tons PALHETA DO PINTOR MGattass Luz e Cor

22 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

23 3D Color Spaces Tri-cromatico sugere espaço 3D Cartesiano Polar
Luminância Saturação Matiz(Hue) G B R MGattass

24 What is Color? Observer Stimulus
Frédo Durand and Barb Cutler MIT- EECS

25 What is Color? S M L Rods Distribution of Cones and Rods
Spectral Sensibility of the L, M and S Cones S M L Rods Distribution of Cones and Rods Light Retina Optic Nerve Amacrine Cells Ganglion Horizontal Bipolar Rod Cone Frédo Durand and Barb Cutler MIT- EECS

26 Anatomia do olho humano
Computação Gráfica Interativa - Gattass 4/13/2017 Anatomia do olho humano retina bastonetes cones vermelho verde azul MGattass Luz e Cor

27 Sensibilidade dos cones do olho humano
Computação Gráfica Interativa - Gattass 4/13/2017 Sensibilidade dos cones do olho humano Olho humano: Cones (SML) e Bastonetes (cegos para cor) .20 .18 .16 .14 .12 fração de luz absorvida por cada cone .10 .08 .06 .04 .02 Curvas se sobrepõe! Não temos como saber qual a sensação de um dado cone! 400 440 480 520 560 600 640 680 l comprimento de onda (nm) 380 nm 780 nm MGattass Luz e Cor

28 Sensibilidade do olho em função do comprimento de onda
Computação Gráfica Interativa - Gattass 4/13/2017 Sensibilidade do olho em função do comprimento de onda Fração da luz absorvida pelo olho 100% sensibilidade relativa 50% 0% 400 500 600 700 l (nm) 380 nm 780 nm MGattass Luz e Cor

29 Computação Gráfica Interativa - Gattass
4/13/2017 Percepção de cor Luz Colorida c( ) Luz Branca Intensidade 400 440 480 520 560 600 640 680 l comprimento de onda (nm) não é assim! MGattass Luz e Cor

30 Metamerismo Two lights that appear the same visually. They might have different SPDs (spectral power distributions) Idit Haran MGattass

31 O problema de reprodução de cor em CG
Computação Gráfica Interativa - Gattass 4/13/2017 O problema de reprodução de cor em CG Mundo Real E 400 700 l Espaço Virtual E R G B l objetivo: produzir a mesma sensação de cor olho só distingue 400 mil cores (< 219) Þ 19 bits deveriam ser suficientes MGattass Luz e Cor

32 Computação Gráfica Interativa - Gattass
4/13/2017 CIE RGB o o MGattass Luz e Cor

33 Representação perceptual da cor CIE RGB
Computação Gráfica Interativa - Gattass 4/13/2017 Representação perceptual da cor CIE RGB R = 700 nm G = 546 nm B = nm r(l) R g(l) G b(l) B Cor Monocromática C(l) C(l ) = r(l) R + g(l) G + b(l) B Problema: Não consegue se representar todas as cores visíveis (falta saturação) MGattass Luz e Cor

34 colour Matching Experiment 1
Image courtesy Bill Freeman MGattass

35 colour Matching Experiment 1
Image courtesy Bill Freeman MGattass

36 colour Matching Experiment 1
Image courtesy Bill Freeman MGattass

37 colour Matching Experiment 2
Image courtesy Bill Freeman MGattass

38 colour Matching Experiment 2
Image courtesy Bill Freeman MGattass

39 colour Matching Experiment 2
Image courtesy Bill Freeman MGattass

40 Artifício para “subtrair” uma componente
Computação Gráfica Interativa - Gattass 4/13/2017 Artifício para “subtrair” uma componente g(l) G b(l) B r(l) R C(l) C(l ) + r(l) R = g(l) G + b(l) B C(l ) = r(l) R + g(l) G + b(l) B, onde r(l) = - r(l) MGattass Luz e Cor

41 Componentes das cores monocromáticas - CIE RGB -
Computação Gráfica Interativa - Gattass 4/13/2017 Componentes das cores monocromáticas - CIE RGB - C(l ) = r(l) R + g(l) G + b(l) B 0.4 b(l ) r(l ) g(l ) 0.2 Valores dos tri-esimulos l (nm) 400 500 600 700 438 nm 546 nm - 0.2 Combinação de três cores (RGB) para reproduzir as cores espectrais MGattass Luz e Cor

42 Componentes das cores monocromáticas - CIE RGB -
Computação Gráfica Interativa - Gattass 4/13/2017 Componentes das cores monocromáticas - CIE RGB - C(l ) = r(l) R + g(l) G + b(l) B b(l ) g(l ) r(l ) Valores dos tri-esimulos l (nm) R = 700 nm G = 546 nm B = nm Combinação de três cores (RGB) para reproduzir as cores espectrais MGattass Luz e Cor

43 Componentes das cores monocromáticas - CIE RGB -
Computação Gráfica Interativa - Gattass 4/13/2017 Componentes das cores monocromáticas - CIE RGB - b(l ) r(l ) 0.4 g(l ) 0.2 Valores dos tri-esimulos l (nm) 400 500 600 700 - 0.2 MGattass Luz e Cor

44 Conversão da base CIE RGB para CIE XYZ
Computação Gráfica Interativa - Gattass 4/13/2017 Conversão da base CIE RGB para CIE XYZ C(l) = r(l) R + g(l) G + b(l) B X R = Y G Z B MGattass Luz e Cor

45 Componentes das cores monocromáticas - CIE XYZ -
Computação Gráfica Interativa - Gattass Componentes das cores monocromáticas - CIE XYZ - 4/13/2017 Cores Básicas do CIE 1931 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 Nota: Y foi escolhida de forma a y(l) ser semelhante à curva de sensibilidade do olho (luminância) Valor l (nm) 400 500 600 700 MGattass Luz e Cor

46 Computação Gráfica Interativa - Gattass
CIE XYZ (2o e 10o) 4/13/2017 MGattass Luz e Cor

47 Cores visíveis representadas no sistema CIE XYZ
Computação Gráfica Interativa - Gattass 4/13/2017 Cores visíveis representadas no sistema CIE XYZ X Y Z MGattass Luz e Cor

48 Retirando a luminosidade ou brilho da definição da cor em CIE XYZ
Computação Gráfica Interativa - Gattass 4/13/2017 Retirando a luminosidade ou brilho da definição da cor em CIE XYZ Um parenteses sobre luminosidade ou brilho Valores típicos de luminosidade de um de uma superfície Modo Valores (lux) Luz do dia (máximo) Luz de dia sombrio Interior próximo a janela Minimo p/ trabalho Lua cheia Luz das estrelas … e o olho se acomoda! MGattass Luz e Cor

49 MGattass

50 Retirando a luminosidade ou brilho da definição da cor em CIE XYZ
Computação Gráfica Interativa - Gattass 4/13/2017 Retirando a luminosidade ou brilho da definição da cor em CIE XYZ X Y Z Plano X+Y+Z=1 Retirar o fator luminosidade ou brilho projetando no plano X+Y+Z=1 x = X/(X+Y+Z) y = Y/(X+Y+Z) z = Z/(X+Y+Z) X = (x / y ) Y Y = Y Z = (1-x-y ) Y / y note que x+y+z =1 MGattass Luz e Cor

51 Cores visíveis representadas no sistema CIE xyY
Computação Gráfica Interativa - Gattass 4/13/2017 Cores visíveis representadas no sistema CIE xyY X Y Z MGattass Luz e Cor

52 Cores visíveis representadas no sistema CIE xyY
Computação Gráfica Interativa - Gattass 4/13/2017 Cores visíveis representadas no sistema CIE xyY 520 480 490 500 510 540 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 MGattass Luz e Cor

53 Nome das cores MGattass

54 Nome das cores y x 0.9 green yellow- yellow orange white cyan red pink
650 610 590 550 570 600 580 560 540 505 500 510 520 530 490 495 485 480 470 450 1.0 0.5 0.0 0.9 green yellow- yellow orange red magenta purple blue cyan white pink y MGattass

55 Planckian locus MGattass

56 Saturação e cor complementar no diagrama de cromaticidade xy
Computação Gráfica Interativa - Gattass 4/13/2017 Saturação e cor complementar no diagrama de cromaticidade xy saturação de C1 C é complementar a C Û a C + b C = Branco y x 0.2 0.4 0.6 0.8 1.0 Branco C2 C1 cores saturadas a b y x 0.2 0.4 0.6 0.8 1.0 Branco C MGattass Luz e Cor

57

58

59

60

61 After-Image-white MGattass

62 Opponent Colors Image Afterimage MGattass

63 Gamute de cromaticidade de dispositivos
Computação Gráfica Interativa - Gattass 4/13/2017 Gamute de cromaticidade de dispositivos y 0.1 0.2 0.3 0.4 0.6 0.5 0.7 0.8 0.9 1.0 C2 cor não realizável C1 cor não realizável na impressora C2 gamute de um monitor C1 W gamute de uma impressora 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 x MGattass Luz e Cor

64 Gamut de cores de um monitor RGB
MGattass

65 Cores perceptualmente equidistantes representadas no sistema CIE xyY
Computação Gráfica Interativa - Gattass 4/13/2017 Cores perceptualmente equidistantes representadas no sistema CIE xyY Par de cores perceptualmente equidistantes Luz e Cor

66 Weber's law The change in a stimulus that will be just noticeable (JND) is a constant ratio of the original stimulus. E. H. Weber, in 1834 MGattass

67 Correção Gama MGattass

68 Correção Gama Percepção humana "uniforme" Intensidade luminosa
MGattass

69 Correção Gama (a coincidência)
Computação Gráfica Interativa - Gattass 4/13/2017 Correção Gama (a coincidência) Sinal de vídeo (voltagem ou código) Intensidade luminosa Percepção humana MGattass Luz e Cor

70 O sistema tem muitos Gamas!
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

71 Gama de uma ponta a outra (end to end)
“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

72 Computação Gráfica Interativa - Gattass
4/13/2017 Que ajuste adotar? 36 73 109 146 182 219 255 96 136 167 193 216 236 255 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 MGattass Luz e Cor

73 Tons de cinza igualmente espaçados
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza igualmente espaçados Luz e Cor

74 Tons de cinza corrigidos
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza corrigidos Luz e Cor

75 Tons de cinza igualmente espaçados
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza igualmente espaçados Luz e Cor

76 Tons de cinza corrigidos
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza corrigidos Luz e Cor

77 Tons de cinza igualmente espaçados
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza igualmente espaçados Luz e Cor

78 Tons de cinza corrigidos
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza corrigidos Luz e Cor

79 Tons de cinza igualmente espaçados
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza igualmente espaçados Luz e Cor

80 Tons de cinza corrigidos
Computação Gráfica Interativa - Gattass 4/13/2017 Tons de cinza corrigidos Luz e Cor

81 CIE L* Correção perceptual
100 90 80 70 60 L* 50 40 30 20 10 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 veja: MGattass

82 Sistemas de cor perceptualmente uniformes do CIE Luv e CIE Lab (1976)
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor perceptualmente uniformes do CIE Luv e CIE Lab (1976) Dados: (X,Y,Z) = componentes da cor no espaço CIE XYZ (Xw,Yw,Zw) = componentes do branco de referência Calcula-se: u’=4X/(X+15Y+3Z) v’=9Y/(X+15Y+3Z) uw=4Xw/(Xw+15Yw+3Zw) vw=9Yw/(Xw+15Yw+3Zw) L* = 116 (Y/Yw)1/ se Y/Yw > ou L* = (Y/Yw) se Y/Yw £ u* = 13L*(u’- uw) v* = 13L*(v’- vw) a* = 500[(X/Xw)1/3- (Y/Yw)1/3] b* = 200[ (Y/Yw)1/3) - (Z/Zw)1/3] u*,v* (ou a*,b*) são as componentes de cromaticidade da cor L* é a luminosidade corrigida para uma escala percetualmente linear MGattass Luz e Cor

83 Computação Gráfica Interativa - Gattass
4/13/2017 CIE xyY  CIE LUV MGattass Luz e Cor

84 CIE LAB MGattass

85 CIE 1976 (L*a*b*) colour space, Lightnedd
L = Lightness (black= 0 and white = 100) MGattass

86 CIE 1976 (L*a*b*) colour space, Hue and Chroma
Hue (Matiz): Chroma: MGattass

87 CIE 1976 a,b colour difference and CIELAB components
just noticeble difference small color differences variação de ângulo ou MGattass

88 CIE 1994 colour difference k parametric factors, industry dependent
S weighting functions, depend on location in colour space: MGattass

89 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 35.2 C 98.074 97.285 D50 96.422 82.521 96.72 81.427 D55 95.682 92.149 95.799 90.926 D65 (Daylight) 95.047 94.811 D75 94.972 94.416 F2 (Fluorescent) 99.187 67.395 103.28 69.026 F7 95.044 95.792 F11 64.37 65.627 MGattass

90 Conversão Lab - XYZ var_X = X /            //Observer = 2°, Illuminant = D65 var_Y = Y / var_Z = Z / if ( var_X > ) var_X = var_X ^ ( 1/3 ) else                    var_X = ( * var_X ) + ( 16 / 116 ) if ( var_Y > ) var_Y = var_Y ^ ( 1/3 ) else                    var_Y = ( * var_Y ) + ( 16 / 116 ) if ( var_Z > ) var_Z = var_Z ^ ( 1/3 ) else                    var_Z = ( * var_Z ) + ( 16 / 116 ) CIE-L* = ( 116 * var_Y ) - 16 CIE-a* = 500 * ( var_X - var_Y ) CIE-b* = 200 * ( var_Y - var_Z ) var_Y = ( CIE-L* + 16 ) / 116 var_X = CIE-a* / var_Y var_Z = var_Y - CIE-b* / 200 if ( var_Y^3 > ) var_Y = var_Y^3 else                      var_Y = ( var_Y - 16 / 116 ) / if ( var_X^3 > ) var_X = var_X^3 else                      var_X = ( var_X - 16 / 116 ) / if ( var_Z^3 > ) var_Z = var_Z^3 else                      var_Z = ( var_Z - 16 / 116 ) / X = ref_X * var_X     //ref_X =    Observer= 2°, Illuminant= D65 Y = ref_Y * var_Y     //ref_Y = Z = ref_Z * var_Z     //ref_Z =

91 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

92 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: (dark ... pure white) Chroma: (neutral ... saturated) Example: 5YR 8/4 MGattass

93 Munsell Book of Colors MGattass

94 Munsell Book of Colors MGattass

95 Sistemas de cores por enumeração
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cores por enumeração Munsell Albert H. Munsell - artista plástico (1905) valor ou intensidade mapas de cores base para os sistemas de interface croma ou saturação tonalidade ou matiz Pantone (início dos 60’s) MGattass Luz e Cor

96 Computação Gráfica Interativa - Gattass
4/13/2017 Monitores I ) Sistemas dos Monitores - mRGB pixel HiColor processo aditivo MGattass Luz e Cor

97 Sistemas de cor dependentes de dispositivo - mRGB
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor dependentes de dispositivo - mRGB processo aditivo I ) Sistemas dos Monitores - mRGB G verde Y 1.0 amarelo W C ciano branco K vermelho normalmente temos 1 byte para cada componente mapeando [0, 255] em [0,1] preto 1.0 R azul 1.0 M magenta B Componentes somam como vetores MGattass Luz e Cor

98 Sistemas de cor dependentes de dispositivo - mRGB
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor dependentes de dispositivo - mRGB I ) Sistemas dos Monitores - mRGB MGattass Luz e Cor

99 Conversão do mRGB para CIE XYZ e vice-versa
Computação Gráfica Interativa - Gattass 4/13/2017 Conversão do mRGB para CIE 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 white x y ITU-R BT.709 International Telecommunication Union 2) Determine a coordenada z = 1 - x - y ex. R G B white z 3) As coordenadas X,Y,Z são obtidas de: X Y Z XR YR ZR XG YG ZG XB YB ZB R G B = + O problema agora consiste em encontrar as componentes XYZ do R, G e B MGattass Luz e Cor

100 Conversão do mRGB para CIE XYZ (cont.)
Computação Gráfica Interativa - Gattass 4/13/2017 Conversão do mRGB para CIE XYZ (cont.) xR = XR/ (XR+YR+ZR), se CR = XR+YR+ZR então XR = xRCR YR = yRCR e ZR = zRCR e XG = xGCG , YG = yGCG e ZG = zGCG XB = xBCB , YB = yBCB e ZB = zBCB da mesma forma substituindo na matriz da equação X Y Z xRCR yRCR zRCR R G B = XR YR ZR XG YG ZG XB YB ZB 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 xGCG yGCG zGCG xBCB yBCB zBCB 1 xR yR zR xG yG zG xB yB zB CR CG CB = = MGattass Luz e Cor

101 Conversão do mRGB para CIE XYZ (cont.)
Computação Gráfica Interativa - Gattass 4/13/2017 Conversão do mRGB para CIE XYZ (cont.) Suponha que o a luminosidade do branco YW = 1.00, temos: YW = yW CW Þ CW = YW / yW = 1.0/ = 3.04 XW = xW CW = 0.31x = ZW = zW CW = x = 1.089 0.95 1.00 1.09 = CR CG CB CR CG CB resolvendo = 0.644 1.192 1.203 Concluindo: = X Y Z R G B R G B = X Y Z MGattass Luz e Cor

102 RGB normalizado Cubo RGB MGattass

103 - 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

104 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

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

106 XYZ  sRGB: Passo 1 Converte utilizando ITU-R BT.709: MGattass

107 XYZ  sRGB: Passo 2 The sRGB tristimulus values are next transformed to nonlinear sR'G'B' values as follows: If                          else if                         MGattass

108 XYZ  sRGB: Passo 3 –Digital Color
MGattass

109 XYZ  RGB ref_X =          //Observer = 2°, Illuminant = D65 ref_Y = ref_Z = var_X = X / 100        //X = From 0 to ref_X var_Y = Y / 100        //Y = From 0 to ref_Y var_Z = Z / 100        //Z = From 0 to ref_Y var_R = var_X *   var_Y * var_Z * var_G = var_X * var_Y *   var_Z *   var_B = var_X *   var_Y * var_Z *   if ( var_R > ) var_R = * ( var_R ^ ( 1 / 2.4 ) ) else                     var_R = * var_R if ( var_G > ) var_G = * ( var_G ^ ( 1 / 2.4 ) ) else                     var_G = * var_G if ( var_B > ) var_B = * ( var_B ^ ( 1 / 2.4 ) ) else                     var_B = * var_B R = var_R * 255 G = var_G * 255 B = var_B * 255 MGattass

110 sRGB  XYZ S N MGattass

111 XYZ  RGB var_R = ( R / 255 )        //R = From 0 to 255 var_G = ( G / 255 )        //G = From 0 to 255 var_B = ( B / 255 )        //B = From 0 to 255 if ( var_R > ) var_R = ( ( var_R ) / ) ^ 2.4 else                   var_R = var_R / if ( var_G > ) var_G = ( ( var_G ) / ) ^ 2.4 else                   var_G = var_G / if ( var_B > ) var_B = ( ( var_B ) / ) ^ 2.4 else                   var_B = var_B / var_R = var_R * 100 var_G = var_G * 100 var_B = var_B * 100 //Observer. = 2°, Illuminant = D65 X = var_R * var_G * var_B * Y = var_R * var_G * var_B * Z = var_R * var_G * var_B * MGattass

112 Reflexão da luz num papel
Reflexão difusa ou lambertiana MGattass

113 Sistemas de cor dependentes de dispositivo - CMY
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor dependentes de dispositivo - CMY II ) Sistemas das Impressoras -CMY ou CMYK processo predominantemente subtrativo luz branca (1,1,1) normal q luz ciano (0,1,1) tinta ciano (0,1,1) papel branco (1,1,1) componente vermelha é absorvida C Y M R G B K MGattass Luz e Cor

114 Computação Gráfica Interativa - Gattass
4/13/2017 R=M+Y magenta B G R yellow B G R + B G R red = Idit Haran MGattass Luz e Cor

115 Sistemas de cor dependentes de dispositivo - CMY
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor dependentes de dispositivo - CMY II ) Sistemas das Impressoras -CMY ou CMYK MGattass Luz e Cor

116 CMYK Color Model B G R B G R B G R transmit Cyan – removes Red
CMYK = Cyan, Magenta, Yellow, blacK B G R transmit Cyan – removes Red Magenta – removes Green B G R Yellow – removes Blue B G R MGattass Black – removes all

117 Conversão RGB para CMY e vice-versa
Computação Gráfica Interativa - Gattass 4/13/2017 Conversão RGB para CMY e vice-versa B R G 1.0 Y M C W K vermelho azul preto verde amarelo ciano magenta branco (r,g,b) (c,m,y) MGattass Luz e Cor

118 Sistemas de cor dependentes de dispositivo - CMYK
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor dependentes de dispositivo - CMYK 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. Y K K := a min (C, M, Y) a Î [0,1] C := C - K M := M - K Y := Y - K M base linearmente dependente C MGattass Luz e Cor

119 Computação Gráfica Interativa - Gattass
4/13/2017 CMY + Black C + M + Y = K (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 = 50 + 100 50 70 50 20 C M Y K C M Y MGattass Luz e Cor

120 HSV MGattass

121 HSV/HSB Color Space HSV = Hue Saturation Value
HSB = Hue Saturation Brightness Saturation Scale Brightness Scale MGattass

122 HSV Value Saturation Hue MGattass

123 Sistemas de cor mais indicados para interface com usuário - HSV
Computação Gráfica Interativa - Gattass 4/13/2017 Sistemas de cor mais indicados para interface com usuário - HSV K S V H R Y G C B M Saturation Hue Value R G B C M Y W R G B V decompor (r,g,b) na base de V e do espaço ortogonal a ele. MGattass Luz e Cor

124 Transformação RGB para HSV e vice-versa
Computação Gráfica Interativa - Gattass 4/13/2017 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 V = Max R G B S = ( Max-Min ) / Max B R S=0 S=1 Min Max MGattass Luz e Cor

125 Conversão RGB para HSV cálculo de H
Computação Gráfica Interativa - Gattass 4/13/2017 Conversão RGB para HSV cálculo de H G(120o) V Y (60o) C(180o) R (0o) 120o 60o B(240o) 180o M(300o) 0o 240o 300o H S r R 120o H b g 180o B MGattass Luz e Cor

126 HLS Color Space HLS = Hue Lightness Saturation V H S red 0° green 120°
yellow Blue 240° cyan magenta V black 0.0 0.5 H S MGattass

127 HLS L Pierre Courtellemont MGattass

128 Opponent Color Spaces - - - + + + black-white blue-yellow red-green
MGattass

129 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) MGattass

130 Computação Gráfica Interativa - Gattass
4/13/2017 Codificação de Vídeo Função de Transferência CCIR Rec.709 0,2 0,4 0,6 0,8 1 0,1 0,3 0,5 0,7 0,9 Intensidade da luz Sinal de vídeo (voltagem ou código) R’709 = R G’709 = G B’709 = B MGattass Luz e Cor

131 Sistema (Y’, B’-Y’, R’-Y’)
Computação Gráfica Interativa - Gattass 4/13/2017 Sistema (Y’, B’-Y’, R’-Y’) Y’601 = R’ G’ B’ Componente luma de vídeo B’-Y’601 = B’ -( R’ G’ B’) R’-Y’601 = R’ -( R’ G’ B’) Componente de diferença de cor = Y’ B’- Y’ R’- Y’ R’ G’ B’ Motivação: As componentes de diferença de cor podem ser sub-amostradas! MGattass Luz e Cor

132 Cubo RGB no espaço (Y’, B’-Y’, R’-Y’)
Computação Gráfica Interativa - Gattass 4/13/2017 Cubo RGB no espaço (Y’, B’-Y’, R’-Y’) MGattass Luz e Cor

133 Computação Gráfica Interativa - Gattass
4/13/2017 Conversão para vídeo vídeos analógicos (BetaCam e M-II) vídeos digitais com 8 bits/componente (JPEG, MPEG) MGattass Luz e Cor

134 Uma fórmula para conversão para video
RGB to YCrCb YCrCb to RGB MGattass

135 Aparencia de cor MGattass

136 Computação Gráfica Interativa - Gattass
4/13/2017 Banda de Mach Branco Intensidade Preto Posição Efeito da Banda de Mach MGattass Luz e Cor

137 Computação Gráfica Interativa - Gattass
4/13/2017 Contraste Simultâneo MGattass Luz e Cor

138 Contraste MGattass

139 Conclusões do cérebro MGattass

140 Computação Gráfica Interativa - Gattass
4/13/2017 This is a demonstration of a spatial phenomenon, caused by the fact that we have relatively few S cones in our retina. In turn, this means that S cones alias signals that have high spatial frequency. The most obvious signs of this are that narrow blue stripes look green (and blue text is notoriously hard to read). Look at the sets of stripes in the next three slides --- do the narrow ones look greener? Luz e Cor

141

142

143 Computação Gráfica Interativa - Gattass
4/13/2017 Here’s a chance to see them all together; again, narrower ones should look greener. You can also demonstrate adaptation with this slide. Luz e Cor

144 Computação Gráfica Interativa - Gattass
4/13/2017 Tente ler as cores da coluna da esquerda, da direita e do centro (nesta ordem) o mais rápido possivel. Qual voce demorou mais? MGattass Luz e Cor

145 25 6 45 8 29 56 MGattass

146 Referências http://cvision.ucsd.edu/
MGattass

147 FIM

148 Computação Gráfica Interativa - Gattass
4/13/2017 Reflexão e Refração qi qr incidente refletida refratada material 1 material 2 N hi = velocidade da luz no material i velocidade da luz no vácuo h1 h2 sen qr = sen qi lei de Snell (1621) MGattass Luz e Cor

149 MGattass

150 MGattass

151 Processos aditivos de formação de cores
Computação Gráfica Interativa - Gattass 4/13/2017 Processos aditivos de formação de cores Ea+b(l) = Ea (l)+Eb(l) Ea Ea+b a l a+b Eb b l l O olho não vê componentes! MGattass Luz e Cor

152 Intensidade vs contraste
Computer Vision - A Modern Approach Set: Color Slides by D.A. Forsyth MGattass

153 Computação Gráfica Interativa - Gattass
4/13/2017 Reflexão e Refração li MGattass Luz e Cor

154 Refração da luz MGattass


Carregar ppt "Computação Gráfica Interativa - Gattass"
Anúncios Google