1
play

1 The Hum an Eye The Hum an Eye The eye: The center of the retina - PDF document

Basics Of Color CS 4 7 3 1 : Com put e r Gr a phics Elements of color: Lect ure 2 4 : Color Science Em m anuel Agu W hat is color? I ntroduction Color description: Red, greyish blue, white, dark green Computer Scientist:


  1. Basics Of Color CS 4 7 3 1 : Com put e r Gr a phics Elements of color: � Lect ure 2 4 : Color Science Em m anuel Agu W hat is color? I ntroduction � Color description: Red, greyish blue, white, dark green… � Computer Scientist: � Hue: dom inant wavelengt h, color we see � Saturation • how pure the mixture of wavelength is � Color is defined m any ways • How far is the color from gray (pink is less saturated than red, � Physical definition sky blue is less saturated than royal blue) � Wavelength of photons � Light ness/ bright ness: how int ense/ bright is t he light � Elect rom agnet ic spect rum : infra-r ed t o ult r a-violet But so much more than that… � � Excit at ion of phot osensit ive m olecules in eye � Elect rical im pulses t hrough opt ical nerves � I nterpretation by brain 1

  2. The Hum an Eye The Hum an Eye The eye: The center of the retina is a densely packed region called � � the fovea . The retina � � Eye has about 6- 7 m illion cones � Rods � Cones m uch denser here t han t he periphery � Cones • Color! The Hum an Eye Tristim ulus theory � Rods: � 3 t ypes of cones � relat ively insensit ive t o color, det ail � Loosely identify as R, G, and B cones � Good at seeing in dim light , general obj ect form � Each is sensit ive t o it s ow n � Hum an eye can distinguish spect rum of wavelengt hs � 128 different hues of color � Com binat ion of cone cell � 20 different saturations of a given hue st im ulat ions give percept ion Visible spectrum : about 380nm to 720nm � of CO LO R Hue, lum inance, saturation useful for describing color � Given a color, tough to derive HSL though � 2

  3. The Hum an Eye: Cones The Hum an Eye: Seeing Color � The tristim ulus curve shows Three types of cones: � overlaps, and different levels of � L or R , m ost sensit ive t o r ed light ( 610 nm ) responses � M or G , m ost sensit ive t o green light ( 560 nm ) � Eyes m ore sensitive around � S or B , m ost sensit ive t o blue light ( 430 nm ) 550nm, can distinquish sm aller differences � What color do we see the best? � Yellow - gr een at 550 nm � What color do we see the worst? � Blue at 440 nm � Color blindness result s from m issing cone t ype( s) Color Spaces CI E Color Space � Three t ypes of cones suggest s color is a 3D quant it y. CIE (Com m ission I nternationale d’Eclairage) cam e up � with three hypothetical lights X, Y, and Z with these � How t o define 3D color space? spectra: � Color m at ching idea: � shine given wavelength ( λ ) on a screen � Mix three other wavelengths (R,G,B) on same screen. Note that: � Have user adjust intensity of RGB until colors are identical: X ~ R Y ~ G Z ~ B I dea: any wavelength λ can be m atched perceptually by � positive com binations of X,Y,Z CI E created table of XYZ values for all visible colors � 3

  4. CI E Chrom aticity Diagram ( 1 9 3 1 ) CI E Color Space � The gamut of all colors perceivable is thus a three- •For simplicity, we often dim ensional shape in X,Y,Z project to the 2D plane Color = X’ X + Y’ Y + Z’ Z � •Also normalize X’+Y’+Z’=1 X’’ = X’ / (X’+Y’+Z’) Y’’ = Y’ / (X’+Y’+Z’) Z’’ = 1 – X’’ – Y’’ • Note: I nside horseshoe visible, outside invisible to eye CI E uses Color Spaces � Find com plem entary colors: � CI E very exact, defined � equal linear dist ances from whit e in opposit e direct ions � Alternate lingo m ay be better for other dom ains � Measure hue and saturation: � Artists: tint, tone shade � ext end line from color t o whit e t ill it cut s horseshoe ( hue) � CG: Hue, saturation, lum inance � Sat urat ion is rat io of dist ances color -to -white/ hue -to -w hit e � Many different color spaces � Define and com pare device color gam ut (color ranges) � RGB � Problem : not perceptually uniform : � CMY � Sam e am ount of changes in different direct ions generat e � HLS perceived difference t hat are not equal � HSV Color Model � CI E LUV - uniform � And m ore….. 4

  5. Com bining Colors: Additive and Subtractive RGB Color Space Rem ove com ponents Define colors with (r, g, b) am ounts of red, green, and � Add com ponents from white blue � Most popular Additive (RGB) Subtractive (CMYK) � Additive � Som e color spaces are additive, others are subtractive � Exam ples: Additive (light) and subtractive (paint) CMY HLS � � Subtractive Hue, Light ness, Sat urat ion � For print ing � Based on warped RGB cube � Cyan, Magenta, Yellow � Look from ( 1,1,1) t o ( 0,0,0) or RGB cube � Som et im es black ( K) is also used for richer black � All hues then lie on hexagon � � ( c, m , y) m eans subt ract Express hue as angle in degrees t h e c, m , y of t h e � 0 degrees: red com plim ent s of C ( red) M ( gr een) and Y ( blue) 5

  6. HSV Color Space Converting Color Spaces � Converting between color m odels can also be expressed � A m ore intuitive color space Value as such a matrix transform: Saturation � H = Hue � S = Sat ur at ion � V = Value ( or br ight ness)  −  � Based on artist Tint, Shade, 2 . 739 1 . 110 0 . 138   [ ] [ ] Tone = − − 1 . 145 2 . 029 0 . 333 R G B X Y Z Hue   � Similar to HLS in concept  −   0 . 424 0 . 033 1 . 105  Color Quantization Gam m a Correction � True color can be quite large in actual description � Color spaces, RGB, HLS, etc are all linear. � Sometimes need to reduce size � E.g. (0.1,0.1,0.1) in RGB is half the intensity of (0.2,0.2,0.2) However, CRT I ntensity: I = kN γ � Exam ple: take a true- color description from database and � convert to web im age form at � N is no. of elect rons hit t ing screen ( volt age) , relat ed t o pixel value � k and γ are const ant s for each m onit or � Replace true- color with “best m atch” from sm aller subset � Quantization algorithm s: � Intensity- voltage relationship is non- linear, different m in/ m ax N for different devices � Uniform quant izat ion � Gam m a correction: m ake relationship linear, m atch up � Popularity algorithm intensity on different devices � Median-cut algorithm How? I nvert above equation so that N = (I / k) 1/ γ � Oct ree algorit hm � Choose k and γ so that I becomes linearly related to N � 6

  7. Gam m a Correction Device Color Gam uts Typical gam m a values in range [ 1.7 – 2.3] Since X, Y, and Z are hypothetical light sources, no real � � device can produce the entire gam ut of perceivable color E.g. NTSC TV standard in US defines gam m a = 2.2 � � Depends on physical m eans of producing color on device Som e m onitors perform the gam m a correction in hardware � ( SGI’s) � Exam ple: R,G,B phosphors on CRT m onitor � Others do not (most PCs) � Tough to generate im ages that look good on both platform s (i.e. im ages from web pages) Device Color Gam uts References � The RGB color cube sits within CI E color space � Hill, chapter 12 � We can use the CI E chrom aticity diagram to com pare the gamuts of various devices � E.g. com pare color printer and m onitor color gam uts 7

Recommend


More recommend