Computer Graphics & Image Processing Chapter # Color Image Processing

Slides:



Advertisements
Similar presentations
Image Processing Lecture 4
Advertisements

ECE 472/572 - Digital Image Processing Lecture 10 - Color Image Processing 10/25/11.
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.
Aalborg University Copenhagen
School of Computing Science Simon Fraser University
SWE 423: Multimedia Systems Chapter 4: Graphics and Images (2)
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
What is color for?.
Images and colour Colour - colours - colour spaces - colour models Raster data - image representations - single and multi-band (multi-channel) images -
1 Perception. 2 “The consciousness or awareness of objects or other data through the medium of the senses.”
Color Models AM Radio FM Radio + TV Microwave Infrared Ultraviolet Visible.
Color Image Processing Jen-Chang Liu, Spring 2006.
COLOR MODELS Ramya Sarma Anusha Holla
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.
Course Website: Digital Image Processing Colour Image Processing.
Digital Image Processing Colour Image Processing.
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.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 6 Color Image Processing Chapter 6 Color Image.
Chapter 6: Color Image Processing Digital Image Processing.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Light and Color Graphics Systems / Computer.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Digital Image Processing
Topic 5 - Imaging Mapping - II DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Color. Contents Light and color The visible light spectrum Primary and secondary colors Color spaces –RGB, CMY, YIQ, HLS, CIE –CIE XYZ, CIE xyY and CIE.
Week 6 Colour. 2 Overview By the end of this lecture you will be familiar with: –Human visual system –Foundations of light and colour –HSV and user-oriented.
6. COLOR IMAGE PROCESSING
University of Kurdistan Digital Image Processing (DIP) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
Color Theory ‣ What is color? ‣ How do we perceive it? ‣ How do we describe and match colors? ‣ Color spaces.
Chap 4 Color image processing. Chapter 6 Color Image Processing Chapter 6 Color Image Processing Two major areas: full color and pseudo color 6.1 Color.
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:
Digital Image Processing Week VIII Thurdsak LEAUHATONG Color Image Processing.
Graphics Lecture 4: Slide 1 Interactive Computer Graphics Lecture 4: Colour.
Ch 6 Color Image processing CS446 Instructor: Nada ALZaben.
DIGITAL IMAGE. Basic Image Concepts An image is a spatial representation of an object An image can be thought of as a function with resulting values of.
Digital Image Processing In The Name Of God Digital Image Processing Lecture6: Color Image Processing M. Ghelich Oghli By: M. Ghelich Oghli
CS654: Digital Image Analysis Lecture 29: Color Image Processing.
Three-Receptor Model Designing a system that can individually display thousands of colors is very difficult Instead, colors can be reproduced by mixing.
Introduction to Computer Graphics
EEL Introduction to Computer Graphics PPT12: Color models Yamini Bura – U
Color Models. Color models,cont’d Different meanings of color: painting wavelength of visible light human eye perception.
Presented By : Dr. J. Shanbezadeh
Lecture 15 Figures from Gonzalez and Woods, Digital Image Processing, Second Edition, 2002.
Chapter 4: Color in Image and Video
Computer Graphics: Achromatic and Coloured Light.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Digital Image Processing Lecture 12: Color Image Processing Naveed Ejaz.
Digital Image Processing
Color Models Light property Color models.
Half Toning Dithering RGB CMYK Models
IMAGE PROCESSING COLOR IMAGE PROCESSING
Color Image Processing
Color Image Processing
Digital Image Processing (DIP)
Color Image Processing
Chapter 6: Color Image Processing
Color Image Processing
Color Image Processing
Digital Image Processing
Digital Image Processing
Slides taken from Scott Schaefer
Digital Image Processing
Color Image Processing
Color Model By : Mustafa Salam.
Color Models l Ultraviolet Infrared 10 Microwave 10
Presentation transcript:

Computer Graphics & Image Processing Chapter # 6 Color Image Processing

ALI JAVED Lecturer SOFTWARE ENGINEERING DEPARTMENT U.E.T TAXILA Email:: ali.javed@uettaxila.edu.pk Office Room #:: 7

Color Image Processing The use of color Image Processing is motivated by two principal factors: Color is a powerful descriptor Humans can distinguish between thousands of color shades and intensities compared to about only two dozen shades of gray

Full Color Processing vs Pseudo-Color Processing In Full Color Processing the image in question typically are acquired with a Full-Color sensor e.g. Color TV camera or Color Scanner In Pseudo-color Processing the problem is of assigning a color to a particular monochrome intensity or a range of intensities

Color Spectrum

Electromagnetic Spectrum

Physical Background Visible light: a narrow band of electromagnetic radiation → 380nm (blue) - 780nm (red) Wavelength: Each physically distinct colour corresponds to at least one wavelength in this band.

Color Fundamentals The colors that humans and some animals perceive in an object are determined by the nature of light reflected from the object

Achromatic vs Chromatic Light Achromatic (void of color) Light: Its only contribute is its ‘Intensity’ or amount Chromatic Light: spans the electromagnetic spectrum from approximately 400 to 700nm

Quantities for description of quantity of Chromatic Source of Light Three basic quantities are used to describe the quantity of a chromatic source of light: Radiance Luminance Brightness

Radiance The total amount of Energy that flows from a Light Source It is measured in Watts

Luminance Luminance gives a measure of amount of energy an observer perceives from a light source (measured in Lumens(lm) ) For example light emitted from a source operating in Infrared region of Spectrum could have significant energy (Radiance) but a human observer will hardly perceive it so luminance is zero.

Brightness It is a subjective measure It embodies the achromatic notion of intensity and is one of the key factors in describing color sensation

Human Perception Detailed experimental evidences has established that the 6 to 7 million cones in the human eye can be divided into three principal sensing categories, corresponding roughly to red, green and blue Approximately 65% of all cones are sensitive to Red Light, 33% are sensitive to Green Light and about 2% are sensitive to Blue Light (most sensitive)

Human Perception Due to these absorption characteristic of Human Eye colors are seen as variable combinations of the so-called ‘Primary Colors’ Red, Green and Blue The primary colors can be added to produce secondary colors of Light Magenta (Red+Blue) Cyan (Green+Blue) Yellow (Red+Green)

Absorption of Light by red, green and blue cones in Human Eye Mixing the three primaries or a secondary with its opposite primary colors in the right intensities produces white light

Primary Color of Light vs Primary Color of Pigments Red, Green and Blue Colors are Primary Colors of Light In Primary Color of Pigments a primary color is defined as the one that subtracts or absorbs a primary color of Light and reflects or transmits the other two Therefore the Primary Colors of Pigments are Magenta, Cyan and Yellow and secondary colors are Red, Green and Blue A proper combination of three pigment primaries or a secondary with its opposite primary produces Black Color Television Reception is an example of the additive nature of Light Colors

Tri-Stimulus Values The amount of Red, Green and Blue needed to form a particular color (denoted by X, Y and Z) A color is then specified by its “Tri-chromatic Coefficients” Thus x+y+z=1

Chromaticity Diagram z=1-x-y Another approach for specifying colors is to use chromaticity diagram Shows color compositions as a function of x(red) and y(green) For any x and y the corresponding value of z(blue) can be obtained as z=1-x-y

Chromaticity Diagram

Chromaticity Diagram To determine the range of colors that can be obtained from the 3 given colors in the CD, we simply draw connecting lines to each of the three color points. The result is a triangle and any color inside a triangle is produced by various combinations of the three initial colors. The triangle shows a typical range of colors (called the color gamut) produced by RGB monitor CD= Chromaticity Diagram

Color Models The purpose of a color model (also called Color Space or Color System) is to facilitate the specification of colors in some standard way A color model is a specification of a coordinate system and a subspace within that system where each color is represented by a single point Color Models RGB (Red, Green, Blue) CMY (Cyan, Magenta, Yellow) HSI (Hue, Saturation, Intensity) YIQ (Luminance,In phase, Quadrature) YUV (Y' stands for the luma component (the brightness) and U and V are the chrominance (color) components ) YIQ is the color space used by the NTSC color TV system, employed mainly in North and Central America, and Japan

RGB Model Each color is represented in its primary color components Red, Green and Blue This model is based on Cartesian Coordinate System

RGB Model In this model, the primary colors are red, green, and blue. It is an additive model, in which colors are produced by adding components, with white having all colors present and black being the absence of any color. This is the model used for active displays such as television and computer screens. The RGB model is usually represented by a unit cube with one corner located at the origin of a three-dimensional color coordinate system, the axes being labeled R, G, B, and having a range of values [0, 1]. The origin (0, 0, 0) is considered black and the diagonally opposite corner (1, 1, 1) is called white. The line joining black to white represents a gray scale and has equal components of R, G, B.

RGB Color Cube The total number of colors in a 24 Bit image is (28)3 =16,777,216 (> 16 million)

Generating RGB image

CMY and CMYK Color Model Cyan, magenta, and yellow are the secondary colors with respect to the primary colors of red, green, and blue. However, in this subtractive model, they are the primary colors and red, green, and blue, are the secondaries. In this model, colors are formed by subtraction, where adding different pigments causes various colors not to be reflected and thus not to be seen. Here, white is the absence of colors, and black is the sum of all of them. This is generally the model used for printing. Most devices that deposit color pigments on paper (such as Color Printers and Copiers) requires CMY data input or perform RGB to CMY conversion internally R G B C M Y 1.00 - =

CMY and CMYK Color Model CMY is a Subtractive Color Model Equal amounts of Pigment primaries (Cyan, Magenta and Yellow) should produce Black In practice combining these colors for printing produces a “Muddy-Black” color So in order to produce “True-Black” a fourth color “Black” is added giving rise to CMYK model

CMY Color Model

CMY Color Model

HSI Color Model Hue (dominant colour seen) Wavelength of the pure colour observed in the signal. Distinguishes red, yellow, green, etc. More the 400 hues can be seen by the human eye. Saturation (degree of dilution) Inverse of the quantity of “white” present in the signal. A pure colour has 100% saturation, the white and grey have 0% saturation. Distinguishes red from pink, marine blue from royal blue, etc. About 20 saturation levels are visible per hue. Intensity Distinguishes the gray levels.

HSI Color Model Separates out intensity I from the coding Two values (Hue & Saturation) encode chromaticity Intensity encode monochrome part. Hue and saturation of colors respond closely to the way humans perceive color, and thus this model is suited for interactive manipulation of color images .

Properties of HSI (HSV) Hue H is defined by an angle Saturation S models the purity of the color I=(R+G+B)/3

Conversion from RGB to HSI Given an image in RGB color format, the H component of each RGB pixel is obtained using the equation:

Conversion from HSI to RGB

Conversion from HSI to RGB

Pseudo-Color (False Color) Image Processing Pseudo-color Image Processing consists of assigning colors to gray levels based on specific criterion Generally, the eye cannot distinguish more than about 50 gray levels in an image. Thus subtle detail can easily be lost in looking at gray scale images. To enhance variations in gray level and make them more obvious, gray scale images are frequently pseudo-colored, where each gray scale (generally at least 256 levels for most displays) are mapped to a color level through a LUT. The eye is extremely sensitive to color and can distinguish thousands of color values in a picture. LUT=lookup table

Pseudo-Coloring using LUT CLUT(Color lookup table):: A mapping of a pixel value to a color value shown on a display device. For example, in a grayscale image with levels 0, 1, 2, 3, and 4, pseudocoloring is a color lookup table that maps 0 to black, 1 to red, 2 to green, 3 to blue, and 4 to white. LUT=lookup table

Intensity Slicing The technique of intensity slicing or density slicing or color coding is one of the simplest example of Pseudo-color image processing

Intensity Slicing The Gray Scale [0,L-1] is divided into L levels; where l0 represents Black (f(x,y)=0) and lL-1 represents white (f(x,y)=L-1) Suppose that P planes perpendicular to the intensity axis are defined at levels l1,l2…..,lp Then assuming that 0<P<L-1 the P planes partition the gray scale into P+1 intervals, V1,V2…….Vp+1

Intensity Slicing Gray level to color assignments are made according to the relation: f(x,y)= ck if f(x,y)€vk Where ck is the color associated with the kth intensity interval vk defined by the partition planes at l=k-1 and l=k

An Alternative View of Intensity Slicing

Basics of Full Color Image Processing Full color image processing fall into 2 categories. In 1st category we process each component image individually and then form a composite processed color image from the individually processed component. In 2nd category we work with color pixels directly. Because full color images have at least three components, color pixels are really vectors. Let c represent an arbitrary vector in RGB color space:

Basics of Full Color Image Processing Color components are the function of co-ordinates(x,y) so we can write it as: For an image of size MxN there are MN such vectors, c(x,y), for x=0,1,2,…,M-1; y=0,1,2,…,N-1

Basics of Full Color Image Processing

Color Transformations Color transformation can be represented by the expression :: g(x,y)=T[f(x,y)] f(x,y): input image g(x,y): processed (output) image T[*]: an operator on f defined over neighborhood of (x,y). The pixel values here are triplets or quartets (i.e group of 3 or 4 values)

Color Transformations Si=Ti(r1,r2,…,rn) i=1,2,3,….n ri and Si are variables denoting the color components of f(x,y) and g(x,y) at any point (x,y). n is the no of color components {T1,T2,…..,Tn} is a set of transformation or color mapping functions. Note that n transformations combine to produce a single transformation T

Color Transformations The color space chosen determine the value of n. If RGB color space is selected then n=3 & r1,r2,r3 denotes the red, blue and green components of the image. If CMYK color space is selected then n=4 & r1,r2,r3,r4 denotes the cyan, hue, magenta and black components of the image. Suppose we want to modify the intensity of the given image using g(x,y)=k*f(x,y) where 0<k<1

Color Transformations In HSI color space this can be done with the simple transformation s3=k*r3 where s1=r1 and s2=r2 Only intensity component r3 is modified. In RGB color space 3 components must be transformed: si=k*ri i=1,2,3. Using k=0.7 the intensity of an image is decreased by 30%

Color Transformations

Color Complements The hues opposite to one another on the Color Circle are called Complements. Color Complement transformation is equivalent to image negative in Grayscale images

Color Complements

Color Slicing Highlighting a specific range of colors in an image is useful for separating objects from their surroundings. Display the colors of interest so that they are distinguished from background. One way to slice a color image is to map the color outside some range of interest to a non prominent neutral color.

Histogram Processing Color images are composed of multiple components, however it is not suitable to process each plane independently in case of histogram equalization. This results in erroneous color. A more logical approach is to spread the color intensities uniformly, leaving the colors themselves( hue, saturation) unchanged. HSI approach is ideally suited to this type of approach.

Color Image Smoothing Color images can be smoothed in the same way as gray scale images, the difference is that instead of scalar gray level values we must deal with component vectors of the following form: The average of the RGB component vector in this neighborhood is:

Color Image Smoothing We recognize the components of this vector as the scalar images that would be obtained by independently smoothing each plane of the starting RGB image using conventional gray scale neighborhood processing. Thus we conclude that smoothing by neighborhood averaging can be carried out on a per color plane basis.

Color Image Smoothing

Color Image Smoothing

Color Image Sharpening

Noise in Color Images Noise in color images can be removed through various noise models which we use in Image Restoration in case the noise content of a color image has the same characteristics in each color channel. But it is possible for color channels to be affected differently by noise so in this case noise are removed from the image by independently processing each plane Remove noise by applying smoothing filters (e.g gaussian, average, median) to each plane individually and then combine the result.

Noise in Color Images

Color Image Compression Compression is the process of reducing or eliminating redundant and/or irrelevant information A compressed image is not directly displayable it must be decompressed before input to a color monitor. In case if in a compressed image 1 bit of data represents 230 bits of data in the original image, then compressed image could be transmitted over internet in 1 minute as compared to original image which will take 4 hours to transmit.

Any question