Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC Computing with Images

Similar presentations


Presentation on theme: "CSC Computing with Images"— Presentation transcript:

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

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

3 CSC 1040 - Computing with Images
Pixel encodings RGB Color 3 colors: red, green, blue 8 bits/color 24 bits Bitmap 1 bit Grayscale 8 bits CSC 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 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 Computing with Images

6 CSC 1040 - Computing with Images
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 Computing with Images

7 CSC 1040 - Computing with Images
red=108 green=86 blue=142 y = 9 Color:(108,86,142) Position: (12,9) x = 12 CSC 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): Subtractive primaries (combining ink, thus subtracting light): Cyan Yellow Magenta Red Green Blue CSC Computing with Images

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

10 Dimensions of color CSC 1040 - Computing with Images
Source: CSC 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 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: CSC Computing with Images


Download ppt "CSC Computing with Images"

Similar presentations


Ads by Google