lecture13.ppt

37
CS 445 / 645 Introduction to Computer Graphics Lecture 13 Lecture 13 Color Color

Transcript of lecture13.ppt

CS 445 / 645Introduction to Computer GraphicsLecture 13Lecture 13ColorColorAssignment 3Due March 23Due March 23Fourth years plan for thesis collision Fourth years plan for thesis collisionWell provide lots of details to keep the assignment doable Well provide lots of details to keep the assignment doableMorphing algorithmMorphing algorithmLast ClassWe discussed vision physiology andWe discussed vision physiology andperception of gradientsperception of gradientsToday:Today:Color perceptionColor perceptionColor representationsColor representationsHalftoningA techniue used in ne!spaper printing A techniue used in ne!spaper printing"nly t!o intensities are possi#le$ #lo# of in% and no"nly t!o intensities are possi#le$ #lo# of in% and no #lo# of in% #lo# of in%&ut$ the si'e of the #lo# can #e varied &ut$ the si'e of the #lo# can #e variedAlso$ the dither patterns of small dots can #e used Also$ the dither patterns of small dots can #e usedHalftoningHalftoning dot sieHalftoning !oire "atterns(epeated use of same dot(epeated use of same dot pattern for particularpattern for particular shade results inshade results in repeated pattern repeated patternPerceived as a moire pattern Perceived as a moire patternInstead, randomize halftoneInstead, randomize halftone pattern pattern#ithering)alftoning for color images )alftoning for color imagesSpecif$ing ColorColor perception usually involves three uantities: Color perception usually involves three uantities:Hue Hue: istinguishes bet!een colors like red, green, blue, etc : istinguishes bet!een colors like red, green, blue, etcSaturation Saturation: "o! far the color is from a gray of e#ual intensity : "o! far the color is from a gray of e#ual intensityLightness Lightness: $he perceived intensity of a reflecting ob%ect : $he perceived intensity of a reflecting ob%ect*ometimes lightness is called*ometimes lightness is called %rightness%rightness if the o#+ect isif the o#+ect is emitting light instead of reflecting it, emitting light instead of reflecting it,-n order to use color precisely in computer graphics$ !e-n order to use color precisely in computer graphics$ !e need to #e a#le to specify and measure colors, need to #e a#le to specify and measure colors,Com%ining ColorsAdditive (RGB)Shining colored lightson a white ballSubtractive (CMYK)Mixing paint colors andilluinating with white lightHo& #o Artists #o It'Artists often specify color as tints$ shades$ and tonesArtists often specify color as tints$ shades$ and tones of saturated .pure/ pigments of saturated .pure/ pigments(int (int: : 0otten #y adding !hite to a pure pigment$0otten #y adding !hite to a pure pigment$ decreasing saturation decreasing saturationShade Shade: : 0otten #y 0otten #y addingadding #lac% to a pure pigment$#lac% to a pure pigment$ decreasing lightness decreasing lightness(one (one: : 0otten #y adding0otten #y adding !hite and #lac% to a pure!hite and #lac% to a pure pigment pigment!hite"ure ColorBlac#Gra$s%intsShades%onesHS) Color SpaceComputer scientists freuently use an intuitive Computer scientists freuently use an intuitive color space that corresponds to tint$ shade$ and color space that corresponds to tint$ shade$ and tone:tone:"ue "ue & $he color !e see 'red, green, purple( & $he color !e see 'red, green, purple()aturation )aturation & "o! far is the color from gray 'pink is less& "o! far is the color from gray 'pink is less saturated than red, sky blue is less saturated than royal blue( saturated than red, sky blue is less saturated than royal blue(*rightness '+uminance( *rightness '+uminance( & "o! bright is the color 'ho! bright& "o! bright is the color 'ho! bright are the lights illuminating the ob%ect,( are the lights illuminating the ob%ect,(HS) Color !odel)ue .)/ is the angle)ue .)/ is the angle around the vertical a1is around the vertical a1is*aturation .*/ is a value *aturation .*/ is a valuefrom 2 to 1 indicating from 2 to 1 indicatingho! far from the vertical ho! far from the verticala1is the color lies a1is the color lies3alue .3/ is the height of3alue .3/ is the height of the he1cone4 the he1cone4HS) Color !odel&igure '()'*+'()', -ro .+B H S V Color/ ')/ ')/ Red'0/ ')/ ')/ Green01/ ')/ ')/ Blue 2 /)/ ')/ !hite 2 /)/ /)( Gra$ 22 /)/ Blac#*/ ')/ ')/ 30,/ /)( ')/ 30,/ /)/ /), 3Intuiti*e Color SpacesA top5do!n vie! of he1cone A top5do!n vie! of he1coneHS) Color SpaceA more intuitive color spaceA more intuitive color space" - "ue " - "ue) - )aturation ) - )aturation. - .alue 'or brightness( . - .alue 'or brightness(4alueSaturation.ue"recise Color SpecificationsPigment&mi/ing is sub%ective &&& depends on human observer,Pigment&mi/ing is sub%ective &&& depends on human observer, surrounding colors, lighting of the environment, etc surrounding colors, lighting of the environment, etcWe need an ob%ective color specification We need an ob%ective color specification+ight is electromagnetic energy in the 011 to 211 nm !avelength+ight is electromagnetic energy in the 011 to 211 nm !avelength range rangeDominant wavelength Dominant wavelength is the !avelength of the color !e 3see4 is the !avelength of the color !e 3see4Excitation purity Excitation purity is the proportion of pure colored light to !hite light is the proportion of pure colored light to !hite lightLuminance Luminance is the amount 'or intensity( of the light is the amount 'or intensity( of the light+lectromagnetic Spectrum3isi#le light freuencies range #et!een ,,,3isi#le light freuencies range #et!een ,,,5ed - 067 / 81 5ed - 067 / 818080 hertz '211nm( hertz '211nm(.iolet - 269 / 81 .iolet - 269 / 818080 hertz '011nm( hertz '011nm(&igures '()' -ro .+B)isi%le Light)ue 6 dominant freuency .highest pea%/ )ue 6 dominant freuency .highest pea%/*aturation 6 e1citation purity .ratio of highest to rest/ *aturation 6 e1citation purity .ratio of highest to rest/Lightness 6 luminance .area under curve/ Lightness 6 luminance .area under curve/!hite 5ight6range 5ight&igures '()781 -ro .+BHo& &ell do &e see color'What color do !e see the #est7 What color do !e see the #est7:ello!&green at 991 nm :ello!&green at 991 nmWhat color do !e see the !orst7 What color do !e see the !orst7*lue at 001 nm *lue at 001 nm8lash#ac%: Colorta#les .colormaps/ for color storage 8lash#ac%: Colorta#les .colormaps/ for color storageWhich 5;* value gets the most bits, Which 5;* value gets the most bits,Can perceive color differences of 12 nm at e1tremes .violet and red/Can perceive color differences of 12 nm at e1tremes .violet and red/ and 2 nm #et!een #lue and yello! and 2 nm #et!een #lue and yello!MetamersMetamers 9 different energy radiations loo% li%e the same color 9 different energy radiations loo% li%e the same colorColor perception also affected #y surrounding light and adaptation Color perception also affected #y surrounding light and adaptation,ust noticea%le difference -,.#/012 full$ saturated hues can %e distinguished012 full$ saturated hues can %e distinguishedCannot percei*e hue differences &ith less Cannot percei*e hue differences &ith less saturated light3saturated light3Sensiti*it$ to changes in saturation for a fi4ed hue Sensiti*it$ to changes in saturation for a fi4ed hue and %rightness ranges from 06 to 13 depending and %rightness ranges from 06 to 13 depending on hue3on hue3(al5ed a%out representing intensities last lecture(al5ed a%out representing intensities last lectureHuman Color )ision)umans have 3 light sensitive pigments in their cones$)umans have 3 light sensitive pigments in their cones$ called L$ M$ and * called L$ M$ and *:ach has a different:ach has a different spectral response cur*e spectral response cur*e: :This leads to This leads to metamerism metamerism; ;Tristimulus4 color theory Tristimulus4 color theoryL = L()E()dM = M()E()dS = S()E()dColor SpacesThree types of cones suggests color is a 3D uantity,)o!Three types of cones suggests color is a 3D uantity,)o! to define 3D color space7 to define 3D color space7-dea:-dea: )hine given !avelength ' )hine given !avelength ' ( on a screen ( on a screend%ust intensity of 5;* until colors are identical >d%ust intensity of 5;* until colors are identical?ote phosphors of $. are not perfect 5;* ?ote phosphors of $. are not perfect 5;*emitters as the results to right demonstrate emitters as the results to right demonstrateA "ro%lem +4ists:1act target match . :1act target match . / !ith phosphors not possi#le / !ith phosphors not possi#le)ome red had to be added to target color to permit e/act match using)ome red had to be added to target color to permit e/act match using 3knobs4 on 5;* intensity output of @5$ 3knobs4 on 5;* intensity output of @5$A#uivalently 'theoretically(,A#uivalently 'theoretically(, some red could have beensome red could have been removed from @5$ output removed from @5$ outputFigure sho!s that redFigure sho!s that red phosphor must remove somephosphor must remove some cyan for perfect match cyan for perfect match@5$ phosphors cannot@5$ phosphors cannot remove cyan, so 911 nmremove cyan, so 911 nm cannot be generated cannot be generatedCI+ Color Space$ ?$ and @ !ith these spectra: these spectra:-dea: any !avelength-dea: any !avelength cancan #e matched perceptually#e matched perceptually #y#y positi*e positi*e com#inationscom#inations of >$ ?$ and @ of >$ ?$ and @/ B 5y B ;z B *CI+ Color SpaceTheThe gamut gamut of all colors perceiva#le is thus a three5dimensional shape inof all colors perceiva#le is thus a three5dimensional shape in >$ ?$ @ >$ ?$ @Color 6 1> A y? A '@ Color 6 1> A y? A '@CI+ Chromaticit$ #iagram -0630/For simplicity, !e often pro%ect to the C plane / D y D z - 8/ - / E '/DyDz(y - y E '/DyDz(z - 8 F / & y#e*ice Color Gamuts*ince >$ ?$ and @ are hypothetical light sources$ *ince >$ ?$ and @ are hypothetical light sources$ no real device can produce the entire gamut of no real device can produce the entire gamut of perceiva#le colorperceiva#le color:1ample: C(T monitor:1ample: C(T monitor#e*ice Color GamutsWe can use the C-: chromaticity diagram to We can use the C-: chromaticity diagram to compare the gamuts of various devices:compare the gamuts of various devices: