digital media dr. jim rowan itec 2110 color. roll call sanchez-casas, jon f. simson, davis sinnock,...

30
Digital Media Dr. Jim Rowan ITEC 2110 Color

Upload: edwin-kennedy

Post on 19-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Digital Media

Dr. Jim Rowan

ITEC 2110

Color

Page 2: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Roll call

Sanchez-Casas, Jon F.Simson, DavisSinnock, Grant A.Swaim, Mark S.Tran, Dung Q.Vyas, Anand A.Woldeyohannes, Tesfamichael

Barton, Paul H.Bois, Lauren C.Bonds, Allison E.Duncan, Jarred T.Lawson, Joseph I.Mulongo, Julio B.Pennison, Heather L.Reilly, Daniel J.

Page 3: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Roll call

Jones, Crystal L.Marsh, Kerreen A.Thompson, Daniel G.Tran, Christopher V.

Page 4: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

COLOR• Is a mess• It’s a subjective sensation PRODUCED in the

brain• Color differs for light and paint/ink• Printing is different than viewing a monitor

– a monitor EMITS light of a specific wavelength (or a combination of them)

– print is like paint... it absorbs all the colors EXCEPT the color that you see which is reflected by the paint

– a ball that is painted yellow and is viewed in a room that is lit by a light that is completely blue will look black... Why?

Page 5: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Light

• Is electromagnetic radiation (just like microwaves and radio signals... just different wavelengths)

• Visible light has a wavelength that is between 400 and 700 nanoMeters

• A nanoMeter is 1 billionth of a meter... – HINT: It’s a very short wave

Page 6: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

http://en.wikipedia.org/wiki/Electromagnetic_spectrum

Page 7: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

http://en.wikipedia.org/wiki/Electromagnetic_spectrum

Page 8: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Light

• Visible light is a mix of different wavelengths of light at different intensities

• The sun has one Spectral Power Distribution, fluorescent light another, a camera flash another and an LED light another

Page 9: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Color

• To reproduce it electronically or manipulate it digitally we need a way to model color.

• i.e. we need a way to convert a subjective sensation to a reproducible physical phenomenon

Page 10: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

A model of color:roughly based on the eye

• 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

Page 11: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

RGB

• Color is specified by 3 numbers– one for red– one for green– one for blue

• Color is displayed on a monitor by 3 different colored things – one for red– one for green – one for blue

Page 12: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

The 3 colored things

• Phosphor for a CRT and Flat panel displays (aka SED or surface conductor electron emitter display)

• Pockets of fluorescent gas for Plasma• a bunch of other stuff too...• All of them have the ability to adjust the

intensity of each of the three things resulting in the display of most of the visible colors

http://en.wikipedia.org/wiki/Computer_display

Page 13: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

RGB...Good but not all visible colors

• In truth, the 3 different cones in the eye are cross connected in very complex ways

• This keeps the model, which assumes (wrongly) that each is strictly sensing R or G or B, from being able to completely reproduce the visual stimulus

Page 14: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

RGB

• Pure red – (100%, 0%, 0%)– (255,0,0)

• Pure green– (0%, 100%, ,0%)– (0,255,0)

• Pure blue– (0%, 0%, 100%)– (0,0,255)

Page 15: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Mixing the Color of Light

• Is an additive process – monitors emit light

• Is not like mixing paint which is a subtractive process – paint absorbs light

Page 16: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

How many colors?

• Different cultures have different ideas about when 2 colors differ

• People individually differ in their ability to distinguish between two colors

• With the range of 0-255 (which can be encoded in one byte) for each of the Red, Green and Blue there are 16.8 million possibilities

Page 17: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

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

Page 18: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Color and Grey

• RGB (0, 0, 0) is black

• RGB (255, 255, 255) is white

• When R = G = B you get grey– RGB (25, 25, 25) is dark grey– RGB (200, 200, 200) is light grey

Page 19: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Color at 16 bit Color Depth

• RGB at 24 bits – 24 bits => 3 bytes– 3 bytes, 3 colors => one byte per color

• RGB at 16 bits– 16 bits => 2 bytes– 2 bytes, 3 colors... – 16/3 = 5 bits with one left over...– HMMMmmmm...– What to do?

Page 20: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

16 bit color

• 16/3 = 5 bits with one left over...• What to do with the extra bit?• Go back to human perception

– Humans do not discriminate Blue as well as they do Green vision

– Evolutionary roots?• Lots of blue light in daylight • Lots of green to discriminate

• Assign 5 bits to R & B, and 6 bits to G– allows twice as many greens as blues

Page 21: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Why more than 16.8 million?

• 24 bits is plenty for human vision...• 30 and 48 bits 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 than we can distinguish 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)

Page 22: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Why worry about color depth?

• One reason: file size• Any reduction in color depth has a 3-fold

effect on the final image size• A 100X100 RGB image

– at 24 bit color => 30,000 bytes uncompressed– at 16 bit color => 20,000 bytes uncompressed– 1 byte => 1/3 reduction of size

Page 23: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Why is too big bad?• It wastes valuable computer resources

– hard drive disk space– vram space– data transit time

VRAM

internet

monitor

mainmemory

hard drive

• Sure, computers are really fast and big now BUT...

• Consider Video...

Page 24: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Indexed color

• We’ve seen this before... the color table

• Used by a number of file formats– tiff, png, bmp, gif,

• Use a table (color pallete) to store colors

• Use a map of logical colors to reference the color map

Page 25: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Indexed color vs. 8 bit color

• 8 bit color defines only 256 colors • Indexed color allows 256 different colors• What’s the difference?

– 8 bit defines 256 colors---whether they are used or not

– Indexed color allows 256 different colors that exist in the image

Page 26: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Indexed color vs. 8 bit color

• 8 bit direct color... an example– suppose...

• Red gets 3 bits ==> 000, 001, 010, 011... 111 ==> 8 values• Green gets 3 bits ==> 000, 001, 010, 011... 111 ==> 8 values• Blue gets 2 bits ==> 00, 01, 10, 11 ==> 4 values• total different colors ==> 8 x 8 x 4 = 256 different colors

• But images in nature have a narrower range of colors... a pallete

• With indirect color you can store 256 different colors that are actually found in the image– results in an image that more closely mimics the image

Page 27: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Indexed color

• Even though it allows for a closer-to-real-life image, some colors must be modified

• How to do this?– use the nearest color– optical mixing... dithering

Page 28: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Nearest color

• Loss of some detail

• Distorted color

• Generates artifacts – Banding or posterization

Page 29: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Optical mixing: Dithering

• Dithering uses a group of colors to approximate the desired color

• Works well for high resolution images

• Works poorly for low resolution images

• See figure 6.8, p169 for dithering effects

Page 30: Digital Media Dr. Jim Rowan ITEC 2110 Color. Roll call Sanchez-Casas, Jon F. Simson, Davis Sinnock, Grant A. Swaim, Mark S. Tran, Dung Q. Vyas, Anand

Questions?