10 color image processing

63
Color Image Processing : 1 Color Image Processing Color Image Processing

Upload: babak

Post on 07-Sep-2014

601 views

Category:

Education


16 download

DESCRIPTION

Digital image Processing

TRANSCRIPT

Page 1: 10 color image processing

Color Image Processing : 1

Color Image ProcessingColor Image Processing

Page 2: 10 color image processing

Color Image Processing : 2

Visible LightVisible Light

Visible light composed of relatively narrow band of frequencies in electromagnetic spectrum

Chromatic light spans EM spectrum from around 400 to 700 nm

Page 3: 10 color image processing

Color Image Processing : 3

Color PerceptionColor Perception

Perceived color of an object based on nature of light reflected from object

Examples:

If object reflects light that's balanced from all visible wavelengths, object is perceived as white

If object reflects light with wavelengths mainly in the 575 to 625nm range, object is perceived as red

Page 4: 10 color image processing

Color Image Processing : 4

Cones RevisitedCones Revisited

6 to 7 million cones in the human eye

Divided into three main types:

L cones (65%)

Maximally sensitive to long wavelengths (e.g., red)

M cones (33%)

Maximally sensitive to medium wavelengths (e.g., green)

S cones (2%)

Maximally sensitive to short wavelengths (e.g., blue)

Page 5: 10 color image processing

Color Image Processing : 5

Light Absorption of ConesLight Absorption of Cones

Visible colors can be visualized as weighted combination of primary colors red, green, and blue

Page 6: 10 color image processing

Color Image Processing : 6

Mixtures of Light vs. Mixtures of PigmentsMixtures of Light vs. Mixtures of Pigments

Mixture of light primaries additive

Mixture of pigment primaries subtractive

Page 7: 10 color image processing

Color Image Processing : 7

CIE Chromaticity DiagramCIE Chromaticity Diagram

A method for specifying colors

Specifies color composition as function of x (red) and y (green)

For any value of x and y, value of z (blue) can be found as

The (x,y,z) values of a color specifies percentage of red, green, and blue needed to form the color (Trichromatic Coefficients)

1 ( )z x y

Page 8: 10 color image processing

Color Image Processing : 8

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 9: 10 color image processing

Color Image Processing : 9

CIE Chromaticity DiagramCIE Chromaticity Diagram

Page 10: 10 color image processing

Color Image Processing : 10

CIE Chromaticity Diagram InterpretationCIE Chromaticity Diagram Interpretation

Pure spectrum colors located around boundary

All non-boundary colors are mixture of spectrum colors

Point of equal energy corresponds to equal fractions of the three primary colors

CIE standard for white light

Straight line segment joining two points define all colors that can be created by mixing these two colors additively

Page 11: 10 color image processing

Color Image Processing : 11

RGB Color ModelRGB Color Model

Primarily used for displays and cameras

Based on Cartesian coordinate system

Three axis represents intensities of red, green, and blue

Gray scale (points of equal RGB values) extends from black (0,0,0) to white (1,1,1)

Example: 24-bit color (Truecolor)

8-bits (256 levels) are used to represent each channel

Gives a total of (256)3=16,777,216 possible colors!

Page 12: 10 color image processing

Color Image Processing : 12

RGB Color Model VisualizationRGB Color Model Visualization

Page 13: 10 color image processing

Color Image Processing : 13

CMY/CMYK Color ModelsCMY/CMYK Color Models

Primarily used for printing

Based on primary colors of pigments

For CMY, the three axis represent the amount of cyan, magenta, and yellow pigments to put in to produce a certain color

1

1

1

C R

M G

Y B

Page 14: 10 color image processing

Color Image Processing : 14

Why K?Why K?

In theory, equal amounts of cyan, magenta, and yellow produces black

In practice, combining them results in muddy-looking black

To produce true black in printing, a fourth color (black) is added to produce the CYMK color model

Page 15: 10 color image processing

Color Image Processing : 15

Pros and Cons of RGBPros and Cons of RGB

Advantages of RGB model:

Straightforward (great for hardware implementation)

Matches well with human vision system's strong response to red, green, and blue

Disadvantage of RGB model:

Difficult for human description of color (e.g., humans don't describe color as RGB percentages)

Highly redundant and correlated (e.g., all channels hold luminance information, reduces coding efficiency)

Page 16: 10 color image processing

Color Image Processing : 16

HSI Color ModelHSI Color Model

Useful for human color interpretation

Three axis represent:

Hue

Describes pure/dominate color perceived by observer (e.g., pure yellow, orange, red)

Saturation (Purity of color)

Amount of white light mixed with hue

High saturation = high purity = little white light mixed with hue

Intensity

Brightness

Page 17: 10 color image processing

Color Image Processing : 17

Relationship between RGB and HSIRelationship between RGB and HSI

Hue: all colors on plane defined by white, black, and a pure color corner point have same hue

Saturation: distance from associated pure color

Intensity: projection to gray scale line

Page 18: 10 color image processing

Color Image Processing : 18

Relationship between RGB and HSIRelationship between RGB and HSI

Page 19: 10 color image processing

Color Image Processing : 19

HSI Color Model VisualizationHSI Color Model Visualization

Page 20: 10 color image processing

Color Image Processing : 20

Converting colors from RGB to HSIConverting colors from RGB to HSI

if

360 if

B GH

B G

1

12 2

12cos

R G R B

R G R B G B

31 [min( , , )]S R G BR G B

1

3I R G B

Page 21: 10 color image processing

Color Image Processing : 21

Converting colors from HSI to RGBConverting colors from HSI to RGB

When H is in RG Sector

(1 )B I S

0

cos1

cos(60 )

S HR I

H

3 ( )G I R B

0 0(0 120 )H

Page 22: 10 color image processing

Color Image Processing : 22

Converting colors from HSI to RGBConverting colors from HSI to RGB

When H is in GB Sector

(1 )R I S

0

cos1

cos(60 )

S HG I

H

3 ( )B I R G

0 0(120 240 )H

0120H H

Page 23: 10 color image processing

Color Image Processing : 23

Converting colors from HSI to RGBConverting colors from HSI to RGB

When H is in RG Sector

(1 )G I S

0

cos1

cos(60 )

S HB I

H

3 ( )R I G B

0 0(240 360 )H

0240H H

Page 24: 10 color image processing

Color Image Processing : 24

Pseudocolor Image ProcessingPseudocolor Image Processing

Goal

Assign color to gray levels to convert grayscale image into color image

Why?

Improve visualization of image information

Motivation

Humans can discern thousands of color shades but only two dozen or so gray shades

Page 25: 10 color image processing

Color Image Processing : 25

Intensity SlicingIntensity Slicing

One of the simplest methods for pseudocolor image processing

Grayscale image can be viewed as 3D function (x,y, and intensity)

Suppose we define P planes perpendicular to intensity axis

Each plane i is associated with a color Ci

Pixels with intensities lying along a particular plane i is assigned the color Ci corresponding to the plane

Page 26: 10 color image processing

Color Image Processing : 26

Visualization of Intensity SlicingVisualization of Intensity Slicing

Page 27: 10 color image processing

Color Image Processing : 27

Intensity SlicingIntensity Slicing

Page 28: 10 color image processing

Color Image Processing : 28

Intensity Slicing ExampleIntensity Slicing Example

Page 29: 10 color image processing

Color Image Processing : 29

Intensity Slicing ExampleIntensity Slicing Example

Page 30: 10 color image processing

Color Image Processing : 30

Example: Rainfall MonitoringExample: Rainfall Monitoring

Page 31: 10 color image processing

Color Image Processing : 31

Gray Level to Color TransformationsGray Level to Color Transformations

Intensity slicing limits range of pseudocolor enhancement results

Fixed one-to-one relationship between intensity and specified colors

Alternative solution:

Process grayscale image using independent transformations

The results of the transformations are combined to create one composite color image

Page 32: 10 color image processing

Color Image Processing : 32

Example using Three TransformationsExample using Three Transformations

Page 33: 10 color image processing

Color Image Processing : 33

Example: Security ScreeningExample: Security Screening

Page 34: 10 color image processing

Color Image Processing : 34

Transformation 1Transformation 1

Garment bag mapped differently than explosive

Easy to spot explosive

Page 35: 10 color image processing

Color Image Processing : 35

Transformation 2Transformation 2

Garment bag mapped similar than explosive

Hard to spot explosive

Page 36: 10 color image processing

Color Image Processing : 36

Multi-Image PseudocoloringMulti-Image Pseudocoloring

Page 37: 10 color image processing

Color Image Processing : 37

Example: Multispectral Image VisualizationExample: Multispectral Image Visualization

Page 38: 10 color image processing

Color Image Processing : 38

Point Operations in Color Image ProcessingPoint Operations in Color Image Processing

Similar to point processing for grayscale images

Example: RGB color model

n = 3

r1,r2,r3 denotes red, green, blue components of the input image

1 2( , ,..., ), 1, 2,...,i i ns T r r r i n

Page 39: 10 color image processing

Color Image Processing : 39

What are Color Complements?What are Color Complements?

Hues opposite one another on the color circle

Analogous to grayscale inverses

Useful for enhancing details in dark regions of image

Page 40: 10 color image processing

Color Image Processing : 40

ExampleExample

Page 41: 10 color image processing

Color Image Processing : 41

Point Operations for Tone CorrectionPoint Operations for Tone Correction

Tonal range: general distribution of color intensities

Similar to intensity contrast in grayscale images

High-key images

Colors concentrated at high intensities

Low-key images

Colors concentrated at low intensities

As with grayscale images, it is desirable to distribute color intensities evenly

Page 42: 10 color image processing

Color Image Processing : 42

Point Operations for Tone CorrectionPoint Operations for Tone Correction

Before correcting color imbalances, tonal imbalances are first corrected

All color channels are transformed using the same transformation for color models where intensity information is spread across multiple channels (e.g., RGB, CMY)

For HSI color model, only I channel is modified

Operations are similar to intensity contrast adjustment for grayscale images

Page 43: 10 color image processing

Color Image Processing : 43

Tone Correction for Common Tonal ImbalancesTone Correction for Common Tonal Imbalances

Flat images

Use an s-curve transformation to boost contrast

lighten highlight areas

darken shadow areas

Light and dark images

Similar to power-law transformations

Stretch light regions and compress dark regions for light images (high gamma)

Stretch dark regions and compress light regions for dark images (low gamma)

Page 44: 10 color image processing

Color Image Processing : 44

Example Tonal CorrectionsExample Tonal Corrections

Page 45: 10 color image processing

Color Image Processing : 45

Point Operations for Color CorrectionPoint Operations for Color Correction

Various ways to correct color imbalances

Perception of a color affected by surrounding colors

Proportion of any color (e.g., magenta) can be reduced by

Increasing its complementary color (e.g., green)

Decreasing portion of the two immediately adjacent colors (e.g., red and blue)

Page 46: 10 color image processing

Color Image Processing : 46

Color CorrectionsColor Corrections

Page 47: 10 color image processing

Color Image Processing : 47

Histogram EqualizationHistogram Equalization

Histogram equalization on individual color channels leads to erroneous colors

Better approach is to just equalize intensity component and leave colors (i.e., hues) unchanged

Page 48: 10 color image processing

Color Image Processing : 48

Color vision deficienciesColor vision deficiencies

Statistics show that color vision deficiencies affect 8.7% of the male

population and 0.4% of the female population.

Dichromacy is a form of color vision deficiency that severely affects an individual’s ability to differentiate hues.

Dichromacy has no known cure.

Page 49: 10 color image processing

Color Image Processing : 49

Types of dichromatic color vision deficienciesTypes of dichromatic color vision deficiencies

Protanopia: L cones are absent or defective

Deuteranopia: M cones are absent or defective

Tritanopia: S cones are absent or defective (rare)

Page 50: 10 color image processing

Color Image Processing : 50

Types of dichromatic color vision deficienciesTypes of dichromatic color vision deficiencies

Protanopia and deuteranopia are often referred to as red-green color blindness.

Tritanopia is often referred to as blue-yellow color blindness.

Page 51: 10 color image processing

Color Image Processing : 51

So what may dichromats see?So what may dichromats see?

Page 52: 10 color image processing

Color Image Processing : 52

Color Correction ApproachesColor Correction Approaches

There are two main approaches to color correction for helping individuals cope with the medical condition:

Fixed color correction

Adaptive color correction

Page 53: 10 color image processing

Color Image Processing : 53

Fixed Color Correction ApproachFixed Color Correction Approach

Perform a fixed color transformation on the image

Improves color differentiation to make details more visible

Problem: The aesthetics of the original scene is poorly captured

Page 54: 10 color image processing

Color Image Processing : 54

Adaptive Color Correction ApproachAdaptive Color Correction Approach

Solution: Adapt color transformation based on the underlying hue characteristics of the image

Advantages:

Improves color differentiation

Preserves aesthetic appeal of the original scene

Page 55: 10 color image processing

Color Image Processing : 55

Color space transformationColor space transformation

The main difficulty encountered by those suffering from dichromacy is the inability to differentiate between certain hues.

An effective approach to color enhancement is to alter the hue distribution of an image in such a way that hue discrimination is improved and details within an image become more perceivable by those suffering from dichromacy.

To preserve the aesthetic properties of the original image, it is also desired that other characteristics of the image such as illumination and saturation are left unchanged.

To accomplish this goal, the image is converted from the RGB color-space to the HSI color-space.

Page 56: 10 color image processing

Color Image Processing : 56

Hue RemappingHue Remapping

A simple method of improving hue discrimination within the indistinguishable hue range is to perform a circular hue shift such that hues that can be easily discriminated are used to represent this hue range.

One of the major disadvantages of this technique is that such a uniform hue shift results in highly unnatural images.

The reason for this is that most of the hues that are actually correctly recognized by those suffering from dichromacy are now misrepresented by the hue shift.

What if we do a hue compression instead?

Allows some of the hues that can be correctly recognized to be assigned much of the same hue as before

Page 57: 10 color image processing

Color Image Processing : 57

Hue RemappingHue Remapping

Improves hue discrimination and maintains some of the distinguishable hues

Problem: the uniform nature of such transforms result in significant loss of dynamic range in the distinguishable portions as well as unnatural color re-mappings in many areas given the fixed redistribution.

Page 58: 10 color image processing

Color Image Processing : 58

Non-linear Hue RemappingNon-linear Hue Remapping

First, rotate hue space such that the two hues that were indistinguishable are at the front of the spectrum while the third hue is at the end.

For example, in the case of protanopia and deuteranopia, the hue range containing the red and green hue components are rotated to the front of the spectrum while the blue hue range is at the end.

Page 59: 10 color image processing

Color Image Processing : 59

Non-linear Hue RemappingNon-linear Hue Remapping

A hue remapping can then be performed on the rotated hue space in the form of a power transformation function:

This hue remapping does two things:

The range of hues that are indistinguishable

(e.g., red-yellow-green range) are stretched over a wider dynamic range, thereby increasing the hue discrimination for that range of hues.

The range of the hue that is distinguishable from the rest of the spectrum (e.g. blue) is compressed, thereby having part of its dynamic range being redistributed to the indistinguishable range.

( )f h h

Page 60: 10 color image processing

Color Image Processing : 60

Non-linear Hue RemappingNon-linear Hue Remapping

By using a nonlinear remapping function, the range re-distribution is varied over the spectrum and therefore allows for greater flexibility in maintaining the aesthetic feel of the original image.

After the hue remapping, the hue space is rotated back to its original position.

Page 61: 10 color image processing

Color Image Processing : 61

Adaptive Hue RemappingAdaptive Hue Remapping

The parameter Φ controls the curvature of the power function.

A simple approach is to set the control parameter at a fixed value.

The main problem to this approach is that hue distribution varies greatly from one image to another.

For example, an image may consists of only blue hues. Therefore, a fixed value of Φ will compress the blue hue range and stretch the other hue ranges without any perceptual benefit.

As such, it is necessary to adaptively adjust the value of Φ based on the underlying image content to achieve enhanced perceptual quality.

Page 62: 10 color image processing

Color Image Processing : 62

Adaptive Hue RemappingAdaptive Hue Remapping

If the hue distribution resides mostly in the indistinguishable range, then the control parameter should be increased to stretch this range to improve hue discrimination and attenuate image details.

However, if the hue distribution resides mostly outside this range, then the control parameter should be decreased to preserve the original hue distribution.

This can be determined based on histogram

Page 63: 10 color image processing

Color Image Processing : 63

Examples of Color CorrectionExamples of Color Correction