COMS 161 Introduction to Computing Title: Digital Images Date: February 23, 2005 Lecture Number: 17
Announcements Homework Due 2/25/05
Review The nature of images How digital images are Natural vs. artificial images How digital images are Organized Created Stored Processed
Outline Color Images Color Models Storing Images RGB CMYK HSB Color index
Color Images High-quality digital cameras, scanners, and other image acquisition devices capture millions of colors There are several different color models Methods to represent colors Color models map colors onto 2D, 3D, and 4D Cartesian space Color space Color components are called color channels
RGB Color Model RGB color model is additive RGB color model represents color as a combination of three channels: RED, GREEN, and BLUE RGB color model is additive RGB color is in most color video displays Red, Green, and Blue are the primary colors Other colors are secondary (mixed) Colors are emitted in the RGB Color Model
RGB Color Images
RGB Color Images RGB images contain data representing each channel 1 byte for each channel 3 bytes/pixel 200 X 200 RGB image requires 200 X 200 X 3 bytes 120,000 bytes
RGB Color Space Origin (0, 0, 0) is black Opposite corner is white No color Opposite corner is white All colors Solid cube of colors
CMYK Color Model Cyan, Magenta, Yellow & Black Primarily used in color printing cyan, magenta, and yellow (CMY) are primary colors red, green, and blue are secondary colors Black is added to improve printing CMYK is a subtractive color model Ink absorbs light, the color we see is the color of the reflected light, not the absorbed color
CMYK Color Model Shine a white light on a an area and the color seen is cyan The red component of the white light is absorbed leaving only cyan to be reflected Cyan absorbs red Magenta absorbs green Yellow absorbs blue CMY is the anti-color space of RGB C = 255 – R, M = 255 – G, Y = 255 - B
CMYK Color Model CMYK image
CMYK Images CYAN channel
CMYK Images MAGENTA channel
CMYK Images YELLOW channel
CMYK Images BLACK channel
CMYK Color Space White is (0,0,0) Black is (1,1,1) Black is the absence of color
HSB Color Model RGB and CMYK are not the way we think of color Paint your room Think of the color you want it to be How bright we want that color to be If it should be pastel or vivid
HSB Color Model HSB resembles how artists conceive color properties Hue: corresponds to what we think of as color Saturation: purity of the hue Highly saturated colors are vivid Lowly saturated colors are washed out Grayed out Pastels Brightness: relative amount of whiteness or lightness of a color
HSB Color Model HSB color is depicted by a 3-D polar coordinate system Increasing brightness adds white to the hue Decreasing brightness adds black to the hue
HSB Color Model
Storing Digital Images A single hue depicted with a series of changing brightness and saturation values
Indexed Color Images Most digital color images do NOT use all possible colors that can be represented in their color model RGB model 8 bits of R, G, and B 224 colors = 16 million different colors In fact, the human eye cannot distinguish this many different colors!!
Indexed Color Images Indexed color images store different colors in a look-up table Pixel values are indices into the look-up table Red Yellow Tan Purple Sky Blue . 255 2 1
Indexed Color Images INDEXED COLOR images are smaller or more compact in storage Composed of pixels selected from a limited palette of colors or shades