1 / 12

Image encodings

Image encodings. CSC 1040. What’s a picture?. We have seen that programs represent pictures as grids of picture elements or pixels. Stephanos with his eraser collection. Pixel encodings. RGB Color 3 colors: red, green, blue 8 bits/color 24 bits. Bitmap 1 bit. Grayscale 8 bits.

geri
Télécharger la présentation

Image encodings

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Image encodings CSC 1040 CSC 1040 - Computing with Images

  2. What’s a picture? • We have seen that programs represent pictures as grids of picture elements or pixels Stephanos with his eraser collection CSC 1040 - Computing with Images

  3. Pixel encodings • RGB Color • 3 colors: red, green, blue • 8 bits/color • 24 bits • Bitmap • 1 bit • Grayscale • 8 bits CSC 1040 - Computing with Images

  4. Additive color model: RGB • In RGB, a color has three component: • R: Amount of redness • G: Amount of greenness • B: Amount of blueness • These values are usually represented by numbers in the range 0…255 • Additive color model: Based on the way the light mixes on a computer screen. It is called an additive color model because if you add the three primaries (red, green and blue) together, you get pure white light. CSC 1040 - Computing with Images

  5. Subtractive color model: CYM • In CYM, a color has three component: • C: Amount of cyan • Y: Amount of yellow • M: Amount of magenta • Usually numbers in the range 0…255 • Subtractive color model: CMY is based on the way translucent inks combine to block light – thus “subtracting” light. • In reality you need to add pure black ink (“K”) to get real black – therefore CYMK CSC 1040 - Computing with Images

  6. Encoding RGB • Each component color (red, green, and blue) is encoded as a single byte • Colors go from (0,0,0) to (255,255,255) • If all three components are the same, the color is in greyscale • (50,50,50) at (2,2) • (0,0,0) (at position (1,2) in example) is black • (255,255,255) is white CSC 1040 - Computing with Images

  7. red=108 green=86 blue=142 y = 9 Color:(108,86,142) Position: (12,9) x = 12 CSC 1040 - Computing with Images

  8. Additive/Subtractive Color We choose 3 primary colors that can be combined to produce most (but NOT all) the visible colors: • Additive primaries (Combining light): RedGreenBlue • Subtractive primaries (combining ink, thus subtracting light):CyanYellowMagenta CSC 1040 - Computing with Images

  9. Let’s practice making these colors in Photoshop Additive primaries • Start with black background, • use a hard edged brush of large diameter and set mode to “Lighten” • Apply red, green, blue Subtractive primaries • Start with white background, • use a hard edged brush of large diameter and set mode to “Darken” • Apply cyan, yellow, magenta CSC 1040 - Computing with Images

  10. Dimensions of color Source: http://www.huevaluechroma.com/012.php CSC 1040 - Computing with Images

  11. Color in the eye: What does one million colors look like? • This image (when viewed in full size, 1000 pixels wide) contains 1 million pixels, each of a different color. • The human eye can distinguish about 10 million different colors. • Source: Wikipedia commons CSC 1040 - Computing with Images

  12. The color gamut Not all visible colors can be produced by any 3 primaries! • The color gamut refers to the range of colors for a particular color system Source: http://dx.aip.org/advisor/cmyk_color.html CSC 1040 - Computing with Images

More Related