Digital Images ColorColor. Color  The human eye combines 3 primary colors using the 3 different types of cones to discern all visible colors. This suggests.

Slides:



Advertisements
Similar presentations
Introduction to Computer Graphics ColorColor. Specifying Color Color perception usually involves three quantities: Hue: Distinguishes between colors like.
Advertisements

Incorporating Color Techniques
Color Image Processing
Achromatic and Colored Light CS 288 9/17/1998 Vic.
Light Light is fundamental for color vision Unless there is a source of light, there is nothing to see! What do we see? We do not see objects, but the.
Fundamentals of Digital Imaging
The eyes have three different kinds of color receptors; One kind is most sensitive to short wavelengths, one to middle wavelengths, and one to long wavelengths.
School of Computing Science Simon Fraser University
Multi-media Graphics JOUR 205 Color Models & Color Space 5 ways of specifying colors.
Color Mixing There are two ways to control how much red, green, and blue light reaches the eye: “Additive Mixing” Starting with black, the right amount.
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
Adobe Photoshop CS Design Professional TECHNIQUES INCORPORATING COLOR.
Display Issues Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Fundamentals of Multimedia Chapter 4 Color in Image and Video Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
CSc 461/561 CSc 461/561 Multimedia Systems Part A: 2. Image.
1 Perception. 2 “The consciousness or awareness of objects or other data through the medium of the senses.”
1 CSCE441: Computer Graphics: Color Models Jinxiang Chai.
Color of (digital image) Raed S. Rasheed Agenda Color. Color Image. Color Models – RGB color model. – CMYK color model. – HSV and HSL color model.
Color Models AM Radio FM Radio + TV Microwave Infrared Ultraviolet Visible.
Color & Color Management. Overview I. Color Perception Definition & characteristics of color II. Color Representation RGB, CMYK, XYZ, Lab III. Color Management.
Selecting the Right Color Palette: Understanding RGB and CMYK Color Presented by Pat McClure and Tony Kugler.
Color Systems. Subtractive Color The removal of light waves to perceive color: –Local or physical attributes of pigments, dyes, or inks reflect certain.
Colour Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 6 This presentation © 2004, MacAvon Media Productions Colour.
Understanding Colour Colour Models Dr Jimmy Lam Tutorial from Adobe Photoshop CS.
Guilford County SciVis V104.02
CS 376 Introduction to Computer Graphics 01 / 26 / 2007 Instructor: Michael Eckmann.
2001 by Jim X. Chen: 1 The purpose of a color model is to allow convenient specification of colors within some color gamut.
Chapter 6: Color Image Processing Digital Image Processing.
Color Management. How does the color work?  Spectrum Spectrum is a contiguous band of wavelengths, which is emitted, reflected or transmitted by different.
© 2011 Delmar, Cengage Learning Chapter 5 Incorporating Color Techniques.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Color Sources:
Color. There are established models of color, each discipline uses it own method for describing and discussing color intelligently.
Color Models. Color Vision The color-responsive chemicals in the cones are called cone pigments and are very similar to the chemicals in the rods. The.
Color 2011, Fall. Colorimetry : Definition (1/2) Colorimetry  Light is perceived in the visible band from 380 to 780 nm  distribution of wavelengths.
CSC Computing with Images
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Digital Image Processing Part 1 Introduction. The eye.
CSC361/ Digital Media Burg/Wong
CS6825: Color 2 Light and Color Light is electromagnetic radiation Light is electromagnetic radiation Visible light: nm. range Visible light:
A color model is a specification of a 3D color co-ordinate system and a visible subset in the co-ordinate System within all colors in a particular color.
Ch 6 Color Image processing CS446 Instructor: Nada ALZaben.
Digital Image Processing In The Name Of God Digital Image Processing Lecture6: Color Image Processing M. Ghelich Oghli By: M. Ghelich Oghli
Three-Receptor Model Designing a system that can individually display thousands of colors is very difficult Instead, colors can be reproduced by mixing.
Color Color Color Tsung-Yi Wu.
Introduction to Computer Graphics
Color Models. Color models,cont’d Different meanings of color: painting wavelength of visible light human eye perception.
Intro to Color Theory. Objectives Identify and discuss various color models including RGB, CMYK, Black/white and spot color. Investigate color mixing.
Chapter 4: Color in Image and Video
Image credit: Wikipedia (Fovea) Human Eye Some interesting facts – Rod cells: requires only low light b/w vision blur, all over retina EXCEPT fovea – Cone.
Computer Graphics: Achromatic and Coloured Light.
The Visible Spectrum And how we see it. What is Visible Light? The cones in the eye are only sensitive to a narrow range of EM frequencies. Visible Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Colour CPSC Colour ● Models ● RGB ● CMY(K) ● HSB (or HSV) ● RYB ● Harmonies ● Monochrome ● Complementary ● Analogous ● Triadic.
Multimedia systems Lecture 5: Color in Image and Video.
Color Models Light property Color models.
Color Image Processing
Color Image Processing
Color Image Processing
COLOR space Mohiuddin Ahmad.
Chapter 6: Color Image Processing
Color Image Processing
Introduction to Computer Graphics with WebGL
COMS 161 Introduction to Computing
Color Image Processing
Slides taken from Scott Schaefer
Color Image Processing
Color Model By : Mustafa Salam.
Color Models l Ultraviolet Infrared 10 Microwave 10
Presentation transcript:

Digital Images ColorColor

Color  The human eye combines 3 primary colors using the 3 different types of cones to discern all visible colors. This suggests that color is a 3-dimensional entity.  Color Model  Is an abstract mathematical system for representing color.  Is a 3 dimensional abstractions.  Defines three primary colors along three dimensions  Is typically limited in the range of colors they can represent and hence often can’t represent all colors in the visible spectrum  Gamut or Color Space  The range of colors that are covered by a color model.

Color Models  Color models can be classified as either additive or subtractive.  Additive:  Assumes that light is used to generate colors.  Human perception is additive since black is the absence of light and white the presence of all wavelengths of light.  Devices: computer monitor, LCD screens, projectors  Subtractive:  Assumes that pigment is used to generate colors. White light is reflected off of an object which ‘absorbs’ or ‘subtracts’ certain wavelengths. The viewer then sees the light that is not absorbed.  The absence of pigment is “white” (blank piece of paper) while the presence of all types of pigment is “black”.  Devices: painting, pencils, pen, printers

Additive and Subtractive Color Models  Primary colors of light are additive  Primary colors are red, green, and blue  Combining red + green + blue yields white  No red, green or blue yields black (no light)  Primary colors of pigment are subtractive  Primary colors are cyan, magenta, and yellow  Combining cyan + magenta + yellow yields black  No cyan, magenta or yellow yields white (white paper) 4

RGB Color Model  RGB color model  A common way of representing color in computing systems.  The RGB model is additive.  Uses red, green, and blue as the primary colors.  A color can be obtained by combining different amounts of these three primaries.  Analogy :  Consider a flashlight that has a slider that chooses the strength of light emitted.  Setting the slider to zero, the flashlight is turned completely off  Setting the slider to one, the flashlight generates as much light as it is capable of generating.  Consider three such flashlights  Each light emits purely red; green; or blue light.  If all three flashlights are aimed at the same spot on a white wall any color can be projected onto the wall by adjusting the slider values on the three lights in different ways.  If all sliders are set to zero: black  If all sliders are set to one: white  if all sliders are set to 0.5: gray

CMY Color Model  CMY color model  A common way of representing color in computing systems.  The CMY model is subtractive  Uses cyan, magenta, and yellow as the primary colors.  A color can be obtained by combining different amounts of these three primaries.  Analogy:  Consider an artist working with a pallette of three paint colors.  Consider mixing these colors together in various proportions:  Any color can be generated on the canvas by adjusting the ratio of the pigments in different ways.  If all pigments are thoroughly mixed together: black  If all pigments are completely absent: white  if all pigments are partially present on a white background: gray

Illustration

RGB Color Model  RGB color model  Color is defined by a 3-tuple that gives the amount of red, green and blue light in the color.  Red is the first dimension  Green is the second dimension  Blue is the third dimension  The amount of each primary color is often given in normalized form as a value in the range 0 to 1  0 means “none”  1 means “maximum amount”  Examples:  Red is then given as  Green is given as  Blue is given as  Define yellow, gray, magenta or dark green?

CMY Color Model  CMY color model is a subtractive model  Color is defined by a 3-tuple that gives the amount of cyan, magenta and yellow light in the color.  Cyan is the first dimension  Magenta is the second dimension  Yellow is the third dimension  The amount of each primary color is often given in normalized form as a value in the range 0 to 1  0 means “none”  1 means “maximum amount”  Examples:  Cyan is then given as  Magenta is given as  Yellow is given as  Define yellow, gray, magenta or dark green?

CMY  CMY  Similar to RGB and has the same color space but the coordinates are inverted such that the origin is white and black is at location

RGB Color Space

Conversion from RGB to CMY  Given a color in normalized RGB space as, the same color in CMY space is given as where

CMYK  CMYK augments CMY by the addition of a black channel  CMY and CMYK are mathematically ‘equally expressive’  Color printers often user 4 or 5 colors  CMYK is of practical benefit  Conservation of ink. Many images have large black areas and it is wasteful to mix three pigments to form one black dot.  Creation of black pixels. In actual practice, mixing maximal amounts of cyan, magenta and yellow pigments creates a color that is not really black (dark muddy instead). Black ink is ‘blacker’.  Creation of crisp edges. Mixing three colors to create black will also yield blurred edges since the dots may not be precisely aligned with each other. 13

Conversion from CMY to CMYK  Given a color in normalized CMY space as the same color in CMYK space is given by Equation 3.2 as where  K is a measure of the ‘blackness’ of the color and essentially serves as an offset after which the remaining amounts of cyan, magenta and yellow are ‘added’

HSB  HSB Color Model  Decomposes color according to perception rather than according to how it is physically sensed.  A point within the HSB gamut is defined by  Hue (the chromaticity or pure color)  Saturation (the vividness or dullness of the color)  Brightness (the intensity of the color).

Color and Brightness  Any color can be decomposed into  A brightness component. This corresponds to the ‘grayscale’ version of the color  A color component. All other information is ‘color’ or ‘chroma’  In RGB and CMY space, the brightness and chroma are distributed over each of the three components  Other color spaces explicitly divide a color into one brightness dimensions and two chroma dimensions  HSB  YIQ  YCbCr  Others…

HSB Color Model  The HSB color space is a cylinder and hence HSB coordinates are given with cylindrical coordinates  hue=angle, saturation=radius, brightness=height  Hue is an angular measure [0-360] that is often normalized to be [0-1] where 1 correspond to 360 degrees.  Saturation is a percentage [0-1]  Brightness is a percentage [0-1]  Fully saturated colors are the most vivid  Fully de-saturated colors are grayscale (no color)

HSB Color Space

HSB Comments  Notes on the HSB model  The center of the cylinder is the grayscale  Red is given as while gray is given as  If intensity is zero then what do H and S mean?  HSB is computationally problematic since hue is cyclic. A hue value of 0 is equal to a hue value of 1.  HSB is useful since when filtering an image we often need to process only the brightness band. Using HSB space we can process only brightness without altering the color.

Conversion from RGB to HSB  Given a color in normalized RGB space, the corresponding color in HSB space is given as where

YIQ Color Model  Like HSB, YIQ separates color into luminance and color channels  Y : is the luminance or grayscale component  I is the inphase component (amount of red-green)  Q is the quadrature (amount of blue-yellow)  Used for TV broadcasts – backward compatible with monochrome TV standards  Human visual system is more sensitive to changes in intensity than in color hence in NTSC, the bandwidth of YIQ is 4MHz in Y, 1.5 MHz in I, and 0.6 MHz in Q.  The YIQ color space is a rotation and distortion of RGB such that the Y axis lies along the RGB grayscale, the I axis is oriented roughly to red-green and the Q axis to blue-yellow.

Converting RGB to YIQ  Given a color in normalized RGB space, the corresponding YIQ color is then given as where

YIQ comments  Note that the Y value is given as the weighted sum of RGB values such that  about 60% of the brightness comes from green  about 30% of the brightness comes from red  about 10% of the brightness comes from blue  This mirrors the human visual system since there are many more green cones than red and many more red cones than blue  Also note that while Y is in [0, 1] the values of I and Q are NOT in [0,1]

YCbCr Color Model  YCbCr is similar to YIQ : essentially a rotation around the Y axis  Y is luminance  Cb is a measure of ‘blueness’  Cr is a measure of ‘redness’  Often called YUV  Used in the JPEG file format and component video systems

Conversion from RGB to YCbCr  Given a color in normalized RGB space, the corresponding 8-bit YCbCr color is given as where  Note that Y is in [16, 235] while Cb and Cr are in [16, 240]. In practice, scaling is often used to convert into the full dynamic range of [0, 255].

RGB Channels SourceRed GreenBlue

CMY Channels SourceCyan MagentaYellow

HSB Channels SourceHue SaturationBrightness

YCbCr Channels SourceY CbCr

Color Similarity  Quantifying the difference between two colors  L1 metric is the taxi-cab distance  L2 metric is the straight-line distance|  Distances are often normalized to the interval [0-1]  Compute the distance in normalized color space  Divide by maximum possible distance in that space  What is the max possible in RGB, CMY, YIQ, YCbCr, HSB?

Color Distance in RGB space 31

Color class in Java  Java has a class named “java.awt.Color”  Is able to represent a color in any color space  The default color space is RGB Color +Color(r:float,g:float,b:float) +Color(r:int,g:int,b:int) +getRed():int +getGreen():int +getBlue():int

Color class  Two constructors:  Color(float r,float g,float b): uses normalized coordinates such that r, g, and b are in [0,1]. If the values are outside of [0,1] only the fractional portion is used.  Color(int r, int g, int b): uses 8-bit coordinates such that r, g, and b are in [0, 255]. Values outside of those ranges are truncated.  Query methods  The getRed, getGreen and getBlue methods return the red, green, or blue component as an 8-bit value.

imaging.utilities.ColorUtilities  Consider writing a custom class that processes color information  The ColorUtilities class is a collection of static methods to process colors  Consider how to complete and use the following methods package imaging.utilities; public class ColorUtilities { public static float taxiCabDistance(Color c1, Color c2) { … } public static float euclidianDistance(Color c1, Color c2 { … } package imaging.utilities; public class ColorUtilities { public static float taxiCabDistance(Color c1, Color c2) { … } public static float euclidianDistance(Color c1, Color c2 { … }