290 likes | 425 Vues
In this lecture from Georgia Gwinnett College, Dr. Jim Rowan delves into the complex world of color theory, exploring how we perceive color and how it can be modeled. The discussion includes an overview of the RGB model, which uses three values to represent any color, and the differences in color perception in different media, such as monitors and print. The lecture also touches on the biology of human and animal vision, including the evolutionary significance of color perception, and concludes with insights into color depth and its implications for digital media.
E N D
Digital Media Lecture 6: Color Part 1 Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan
Refer to Supplemental text: What is color anyway? How do we model color? Color Theory
Color • Is a mess (humans are a mess!) • It’s a subjective sensation PRODUCED in the brain • Color differs for light and paint/ink • Print is different than viewing monitors • Monitors EMIT light • Print ABSORBS the colors EXCEPT the color that you see • A ball that is painted green and viewed in a room that is lit by blue light will look black... • Why? • HMMMMMmmmm…
Light http://en.wikipedia.org/wiki/Electromagnetic_spectrum
Light • Visible light from the sun is a mix of different wavelengths of light at different intensities • Most light is composed of different frequencies at different intensities • Spectral Power Distribution
Color • We need to reproduce it electronically and manipulate it digitally • So… we need a way to model color as numbers
But first… Bird eye trivia • Eagles have 600,000 cones per square mm of retina, humans have 150,000 • The chestral (a bird) has cones that can see UV light (we don’t) • Owls “see” with their ears • they have flaps that are offset in front of the ear openings to detect vertical positioning
One model of color:roughly based on the eye • Human eye has: • Rods (night vision, B&W) • Cones (3 kinds, one for red, one for blue and one for green) ==> RGB • tri-stimulus theory: • the theory that states any color can be completely specified with just 3 values
RGB model • Color is captured as 3 numbers • one for red • one for green • one for blue • Color is displayed on a monitor by generating 3 different colors • one for red • one for green • one for blue
RGB • 3 colored things with the number representing the intensity • Results in the display of most (Not All!) of the visible colors • Why not all colors? ==>
Most (not all) colors? • The 3 different cones in the eye are cross connected in very complex ways • The firing of one receptor can inhibit or accentuate the firing of another • The model we use assumes (wrongly) that each receptor is strictly sensing R or G or B • ==> RGB cannot completely reproduce the visual stimulus
Color Gamut http://en.wikipedia.org/wiki/Gamut
RGB • Pure red • (255,0,0) • Pure green • (0,255,0) • Pure blue • (0,0,255) • White/Black/Gray? • R = G = B • (25,25,25) • (150,150,150) • (200, 200, 200)
RGB • Full onred • (255,0,0) • Full ongreen • (0,255,0) • Noblue • (0,0,0) • What color do you get? • HMMMMMmmmm…
RGB • It’s yellow! • Weird but true! • Full onred • (255,0,0) • Full ongreen • (0,255,0) • Noblue • (0,0,0)
Mixing Colors • Mixing light.. • is an additive process • monitors emit light • Mixing paint… • is a subtractive process • paint absorbs light
How many colors? • Different cultures have different ideas about when 2 colors differ • People individually differ in their ability to distinguish between two colors • A range of 0-255 • can be encoded in 1 byte (8 bits) • 24 bit RGB results in 16.8 million possible colors • 2**24 = 16,777,216
Color Depth • Usually expressed in bits • One byte for each of the RGB • => 24 bits • Back to binary... • 1 bit => 21 => 2 choices • 2 bits => 22 => 4 choices • 4 bits => 24 => 16 choices • 8 bits => 28 => 256 choices • 24 bits => 224 => 16,777,216 choices
Color at 16 bit Color Depth16 bits to represent a color • RGB with 24 bit color depth • 24 bits => 3 bytes • 3 bytes, 3 colors => one byte per color • RGB with 16 bit color depth • 16 bits => 2 bytes • 2 bytes, 3 colors... • 16/3 = 5 bits with one left over... • HMMMmmmm... • What to do?
…16 bit color depth • 16/3 = 5 bits with one bit left over... • What to do with the extra bit? • Go back to human perception • Humans do not discriminate Red or Blue as well as they do Green • Evolutionary roots? • Our environment is green • Lots of green to discriminate • Assign 5 bits to R & B, and 6 bits to G • allows twice as many greens as blues and reds
Why would you want more than 16.8 million? • 24 bit depth is plenty for human vision... • 48 and 64 bit color are WAY more than needed for human vision... • If you scan at 48 bit color there is a lot of information buried in the image that we cannot see BUT... • This information can be used by the program to make extremely fine distinctions during image manipulation (edge finding for example) • (Failed rocket engine example)
Indexed (indirect) color vs. 8 bit (direct) color • 8 bit (direct) color defines only 256 colors • red through blue • 256 choices, whether they are used or not • Indexed color allows 256 different colors • colors that actually exist in the image
Indexed color vs. 8 bit direct color • But images in nature have a narrower range of colors... a palate • 8 bit direct color only allows 256 choices • With indirect color you can store 256 different colors that are actually found in the image • results in an image that more closely mimics scene
Indexed (indirect) colorwith 256 colors in palate • Even though it allows for a closer-to-real-life image • natural images will have more than 256 different colors… • What to do about this? • use the nearest color • optical mixing... dithering
Nearest color results in posterization http://en.wikipedia.org/wiki/Posterization
Dithering (optical mixing)Black and White to shades of Gray http://www.flickr.com/photos/edward_on_flickr/4790092474/sizes/l/in/photostream/
Dithering (optical mixing) http://en.wikipedia.org/wiki/Dither