130 likes | 244 Views
Computer Graphics SS 2014 Color. Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung. Appearance modelling. How do we assign appearance attributes to the object , for instance color ?
E N D
Computer Graphics SS 2014 Color Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung
Appearancemodelling • How do weassignappearanceattributestotheobject, forinstancecolor? • First, specifyhowtodefine a colorA colorisdefinedby a superpositionof 3 primarycolorsRedGreenBlue(0 0 0) -> Black(0 1 1) -> Cyan(0.5 0.5, 0.0) -> Yellowish … • Colors areassignedtopolygonverticesin themodelingstageas additional properties White Cyan Magenta Blue Green Yellow blacK Red
Appearancemodelling • Triangle mesh representation • Shared vertex („indexed face set“) representation (OBJ, OFF files) • Array of coordinates, normals and colors of all vertices • Array of triangles with indices into the vertex list
RGB color model Cyan White • Additive system: Black + [r,g,b] • Used in color displays • With 8 bits per primary=> components from 0-255 => 16M different colors=> 24 bits per pixel=> 1024x1024 image consumes 3 MBytes Magenta Blue Green Yellow blacK Red
CMY(K) color model • Complementary colors to RGB • Cyan, magenta, yellow • Mix to white in additive model • Mix to black in subtractive model • Subtractive color system for printers • Additional black ink Cyan White Magenta Blue Green Yellow blacK Red
Colors in RGB/CMYK • Not all possiblecolorscanberepresented in RGB and CMYK
HSV color space • Alternative representation of color • Visual effect of chromatic (“bunt”) light, i.e. its light spectrum, can also be characterized by • Hue (Farbton): dominant wavelength • Saturation (Sättigung): pureness, inverse proportional to the amount of white light • Value/Brightness (Helligkeit): intensity of light • Achromatic (“unbunt”) light is only characterized by brightness
More color models • The chromaticity diagram • http://en.wikipedia.org/wiki/CIE_1931_color_space • http://hyperphysics.phy-astr.gsu.edu/hbase/hframe.html • The YUV color model • http://en.wikipedia.org/wiki/YUV
YUV color model • In the YUV color model, a color is represented by a luminance (brightness) value Y and 2 chrominance (hue) values UV • i.e., separates brightness from chrominance • Used in JPEG image compression • The human eye is less sensitive to chrominance than luminance; ie. by separating chrominance it can be compressed more aggressively.
YUV color model • RGB vs. YUV
YUV color model • Advantage of YUV color model • Compatible with black and white TV • Gives rise to data compression, because the human eye can perceive higher difference of luminosity than difference of colorsi.e., store Y in full resolution but U and V in a quarter resolution ⇒ 1024x1024 RGB image ⇒ 1024x1024 Y image + 512x512 U image + 512x512 V image
YUV color model • YUV in full resolution (left), Y in full but U and V in a quarter resolution (right)