Digital Image Processing

Slides:



Advertisements
Similar presentations
ECE 472/572 - Digital Image Processing Lecture 10 - Color Image Processing 10/25/11.
Advertisements

Color Image Processing
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.
School of Computing Science Simon Fraser University
© 2002 by Yu Hen Hu 1 ECE533 Digital Image Processing Color Imaging.
What is color for?.
CSC 461: Lecture 2 1 CSC461 Lecture 2: Image Formation Objectives Fundamental imaging notions Fundamental imaging notions Physical basis for image formation.
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
Course Website: Digital Image Processing Colour Image Processing.
Digital Image Processing Colour Image Processing.
Computer Graphics & Image Processing Chapter # Color Image Processing
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 6 Color Image Processing Chapter 6 Color Image.
Color Image Processing A spectrum of possibilities…
Chapter 3: Colorimetry How to measure or specify color? Color dictionary?
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.
6. COLOR IMAGE PROCESSING
University of Kurdistan Digital Image Processing (DIP) Lecturer: Kaveh Mollazade, Ph.D. Department of Biosystems Engineering, Faculty of Agriculture,
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.
September 17, 2013Computer Vision Lecture 5: Image Filtering 1ColorRGB HSI.
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.
CS654: Digital Image Analysis Lecture 30: Color Model Conversion.
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.
Introduction to Computer Graphics
Presented By : Dr. J. Shanbezadeh
ECE 638: Principles of Digital Color Imaging Systems Lecture 4: Chromaticity Diagram.
Lecture 15 Figures from Gonzalez and Woods, Digital Image Processing, Second Edition, 2002.
Pseudo / Color Image Processing Fasih ur Rehman. Color Image Processing Two major areas of Color Image Processing –Pseudo Color Image Processing Assigning.
Chapter 4: Color in Image and Video
Computer Graphics: Achromatic and Coloured Light.
Digital Image Processing Lecture 12: Color Image Processing Naveed Ejaz.
COMPUTER GRAPHICS CS 482 – FALL 2016 CHAPTER 28 COLOR COLOR PERCEPTION CHROMATICITY COLOR MODELS COLOR INTERPOLATION.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Color Image.
Multimedia systems Lecture 5: Color in Image and Video.
Color Models Light property Color models.
School of Electronics & Information Engineering
ITEC2110, Digital Media Chapter 2 Fundamentals of Digital Imaging
Half Toning Dithering RGB CMYK Models
IMAGE PROCESSING COLOR IMAGE PROCESSING
Color Image Processing
Digital Image Processing
Color Image Processing
Digital Image Processing (DIP)
Color Image Processing
Chapter 6: Color Image Processing
Color Image Processing
Colour Theory Fundamentals
COMS 161 Introduction to Computing
Color Representation Although we can differentiate a hundred different grey-levels, we can easily differentiate thousands of colors.
Computer Vision Lecture 4: Color
ECE 638: Principles of Digital Color Imaging Systems
Color Image Processing
Digital Image Processing
Digital Image Processing
Slides taken from Scott Schaefer
Digital Image Processing
Color Image Processing
About Color.
Digital Image Processing Lecture 26: Color Processing
Color Model By : Mustafa Salam.
Color Models l Ultraviolet Infrared 10 Microwave 10
Presentation transcript:

Digital Image Processing Color Image Processing Based on slides by Brian Mac Namee and DIP book by Gonzalez & Woods

Introduction Today we’ll look at color image processing, covering: color fundamentals color models color transformations

Color Fundamentals In 1666 Sir Isaac Newton discovered that when a beam of sunlight passes through a glass prism, the emerging beam is split into a spectrum of colors Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Color Fundamentals (cont…) The colors that humans and most animals perceive in an object are determined by the nature of the light reflected from the object For example, green objects reflect light with wave lengths primarily in the range of 500 – 570 nm while absorbing most of the energy at other wavelengths White Light Colors Absorbed Green Light

Color Fundamentals (cont…) Chromatic light spans the electromagnetic spectrum from approximately 400 to 700 nm As we mentioned before human color vision is achieved through 6 to 7 million cones in each eye Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Color Fundamentals (cont…) Approximately 66% of these cones are sensitive to red light, 33% to green light and 6% to blue light Absorption curves for the different cones have been determined experimentally Strangely these do not match the CIE standards for red (700nm), green (546.1nm) and blue (435.8nm) light as the standards were developed before the experiments!

Color Fundamentals (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Color Fundamentals (cont…) 3 basic qualities are used to describe the quality of a chromatic light source: Radiance: the total amount of energy that flows from the light source (measured in watts) Luminance: the amount of energy an observer perceives from the light source (measured in lumens) Note we can have high radiance, but low luminance Brightness: a subjective (practically unmeasurable) notion that embodies the intensity of light We’ll return to these later on

CIE Chromacity Diagram Specifying colors systematically can be achieved using the CIE chromacity diagram On this diagram the x-axis represents the proportion of red and the y-axis represents the proportion of green used The proportion of blue used in a color is calculated as: z = 1 – (x + y)

CIE Chromacity Diagram (cont…) Green: 62% green, 25% red and 13% blue Red: 32% green, 67% red and 1% blue Images taken from Gonzalez & Woods, Digital Image Processing (2002)

CIE Chromacity Diagram (cont…) Any color located on the boundary of the chromacity chart is fully saturated The point of equal energy has equal amounts of each color and is the CIE standard for pure white Any straight line joining two points in the diagram defines all of the different colors that can be obtained by combining these two colors additively This can be easily extended to three points

CIE Chromacity Diagram (cont…) This means the entire color range cannot be displayed based on any three colors The triangle shows the typical color gamut produced by RGB monitors The strange shape is the gamut achieved by high quality color printers Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Color Models From the previous discussion it should be obvious that there are different ways to model color We will consider two very popular models used in color image processing: RGB (Red Green Blue) HIS (Hue Saturation Intensity)

RGB In the RGB model each color appears in its primary spectral components of red, green and blue The model is based on a Cartesian coordinate system RGB values are at 3 corners Cyan magenta and yellow are at three other corners Black is at the origin White is the corner furthest from the origin Different colors are points on or inside the cube represented by RGB vectors

RGB (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

RGB (cont…) Images represented in the RGB color model consist of three component images – one for each primary color When fed into a monitor these images are combined to create a composite color image The number of bits used to represent each pixel is referred to as the color depth (or pixel depth) A 24-bit image is often referred to as a full-color image as it allows = 16,777,216 colors

RGB (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

The HSI Color Model RGB is useful for hardware implementations and matches the way in which the human visual system works However, RGB is not a particularly intuitive way in which to describe colors Rather when people describe colors they tend to use hue, saturation and brightness RGB is great for color generation, but HSI is great for color description

The HSI Color Model (cont…) The HSI model uses three measures to describe colors: Hue: A color attribute that describes a pure color (pure yellow, orange or red) Saturation: Gives a measure of how much a pure color is diluted with white light Intensity: Brightness is nearly impossible to measure because it is so subjective. Instead we use intensity. Intensity is the same achromatic notion that we have seen in gray level images

HSI, Intensity & RGB Intensity can be extracted from RGB images – which is not surprising if we stop to think about it Remember the diagonal on the RGB color cube that we saw previously ran from black to white Now consider if we stand this cube on the black vertex and position the white vertex directly above it

HSI, Intensity & RGB (cont…) Now the intensity component of any color can be determined by passing a plane perpendicular to the intenisty axis and containing the color point The intersection of the plane with the intensity axis gives us the intensity component of the color Images taken from Gonzalez & Woods, Digital Image Processing (2002)

HSI, Hue & RGB In a similar way we can extract the hue from the RGB color cube Consider a plane defined by the three points cyan, black and white All points contained in this plane must have the same hue (cyan) as black and white cannot contribute hue information to a color Images taken from Gonzalez & Woods, Digital Image Processing (2002)

The HSI Color Model Consider if we look straight down at the RGB cube as it was arranged previously We would see a hexagonal shape with each primary color separated by 120° and secondary colors at 60° from the primaries So the HSI model is composed of a vertical intensity axis and the locus of color points that lie on planes perpendicular to that axis Images taken from Gonzalez & Woods, Digital Image Processing (2002)

The HSI Color Model (cont…) To the right we see a hexagonal shape and an arbitrary color point The hue is determined by an angle from a reference point, usually red The saturation is the distance from the origin to the point The intensity is determined by how far up the vertical intenisty axis this hexagonal plane sits (not apparent from this diagram Images taken from Gonzalez & Woods, Digital Image Processing (2002)

The HSI Color Model (cont…) Because the only important things are the angle and the length of the saturation vector this plane is also often represented as a circle or a triangle Images taken from Gonzalez & Woods, Digital Image Processing (2002)

HSI Model Examples Images taken from Gonzalez & Woods, Digital Image Processing (2002)

HSI Model Examples Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Converting From RGB To HSI Given a color as R, G, and B its H, S, and I values are calculated as follows:

Converting From HSI To RGB Given a color as H, S, and I it’s R, G, and B values are calculated as follows: RG sector (0 <= H < 120°) GB sector (120° <= H < 240°)

Converting From HSI To RGB (cont…) BR sector (240° <= H <= 360°)

H, S, and I Components of RGB Color Cube HSI & RGB Images taken from Gonzalez & Woods, Digital Image Processing (2002) RGB Color Cube H, S, and I Components of RGB Color Cube

Manipulating Images In The HSI Model In order to manipulate an image under the HIS model we: First convert it from RGB to HIS Perform our manipulations under HSI Finally convert the image back from HSI to RGB RGB Image HSI Image RGB Image Manipulations

RGB -> HSI -> RGB RGB Image Hue Saturation Intensity Images taken from Gonzalez & Woods, Digital Image Processing (2002) RGB Image Hue Saturation Intensity

RGB -> HSI -> RGB (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002) Hue Saturation Intensity RGB Image

Pseudocolor Image Processing Pseudocolor (also called false color) image processing consists of assigning colors to gray values based on a specific criterion The principle use of pseudocolor image processing is for human visualisation Humans can discern between thousands of color shades and intensities, compared to only about two dozen or so shades of gray

Pseudo Color Image Processing – Intensity Slicing Intensity slicing and color coding is one of the simplest kinds of pseudocolor image processing First we consider an image as a 3D function mapping spatial coordinates to intensities (that we can consider heights) Now consider placing planes at certain levels parallel to the coordinate plane If a value is one side of such a plane it is rendered in one color, and a different color if on the other side

Pseudocolor Image Processing – Intensity Slicing (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Pseudocolor Image Processing – Intensity Slicing (cont…) In general intensity slicing can be summarised as: Let [0, L-1] represent the gray scale Let l0 represent black [f(x, y) = 0] and let lL-1 represent white [f(x, y) = L-1] Suppose P planes perpendicular to the intensity axis are defined at levels l1, l2, …, lp Assuming that 0 < P < L-1 then the P planes partition the gray scale into P + 1 intervals V1, V2,…,VP+1

Pseudocolor Image Processing – Intensity Slicing (cont…) Gray level color assignments can then be made according to the relation: where ck is the color associated with the kth intensity level Vk defined by the partitioning planes at l = k – 1 and l = k

Pseudocolor Image Processing – Intensity Slicing (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Pseudocolor Image Processing – Intensity Slicing (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Pseudocolor Image Processing – Intensity Slicing (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Pseudocolor Image Processing – Intensity Slicing (cont…) Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Gray Level to Color Transformations

Gray Level to Color Transformations

Gray Level to Color Transformations

Gray Level to Color Transformations

Gray Level to Color Transformations

Gray Level to Color Transformations

Full-Color Image Processing We now have vectors instead of single intensity values

Color Transformations 𝑠 𝑖 = 𝑇 𝑖 𝑟 1 , 𝑟 2 ,…, 𝑟 𝑛 for i=1,2,…,n 𝑠 𝑖 and 𝑟 𝑖 are color components in RGB, n=3 in CYMK, n=4 𝑇 𝑖 are the set of transformations (color mapping functions)

Color Transformations We want to modify the intensity 𝑔 𝑥,𝑦 =𝑘 𝑓 𝑥,𝑦 with 0<k<1 In HIS, we only need to modify I 𝑠 3 =𝑘 𝑟 3 In RGB, all 3 components are modified 𝑠 𝑖 =𝑘 𝑟 𝑖 for i=1,2,3 CMY requires similar linear transformations 𝑠 𝑖 =𝑘 𝑟 𝑖 + 1−𝑘 for i=1,2,3

Color Complements Color Complements The hues directly opposite of each other on the color circle (below) are called complements They are analogous to the gray-scale negatives

Color Slicing Color Slicing Slicing with a cube Slicing with a sphere ?? Multiple color prototypes can be used Something different can be done with colors outside the region of interest e.g. reduce intensities

Tone and Color Corrections Most common use is enhancement In tonal transformation, intensity and contrast are adjusted, colors are not actually changed In RGB and CMY(K) all components need changing but in HIS, only I is modified

Tone and Color Corrections Chapter 6 Color Image Processing White areas or skin tones can be used for visual color assessments (to detect color imbalances) Every action affects overall color balance because perception of one color depends on surrounding colors Color wheel can be used E.g. decreasing complement increases proportion of a color in the image If there is too much magenta, we can Decrease red and blue, or Increase green

Color Image Processing Histogram Processing Chapter 6 Color Image Processing Histogram processing transformations for gray-level images can be applied to color images Gray-scale techniques should be adapted to multiple components (histograms) It isn’t wise to apply histogram equalization to each color independently because colors will change It is more logical to spread the color intensities leaving colors (hues) unchanged HSI model is ideal for this

Color Image Processing Smoothing Chapter 6 Color Image Processing It is also possible to modify a pixel’s value based on its neighborhood Smoothing and sharpening are two basic operations of this type Smoothing:

Color Image Processing Smoothing Chapter 6 Color Image Processing

Color Image Processing Smoothing Chapter 6 Color Image Processing We can also smooth using only the intensity component in the HSI model

Color Image Processing Smoothing Chapter 6 Color Image Processing

Color Image Processing Sharpening Chapter 6 Color Image Processing

Color Image Processing Noise in Color Images Chapter 6 Color Image Processing The noise models discussed before are applicable to color images Usually color components are affected by similar noises but it is technically possible for channels to be affected by different types of noise

Color Image Processing Noise in Color Images Chapter 6 Color Image Processing HSI components of the same noisy image

Color Image Processing Noise in Color Images Chapter 6 Color Image Processing