Download presentation
Presentation is loading. Please wait.
1
Chapter 6. Color Image Processing
2012 Spring Image Processing Hanyang University ECE Division
2
Contents 6. Color Image Processing 6.1 Color Fundamentals
6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing 6.5 Color Transformations 6.6 Smoothing and Sharpening 6.7 Color Segmentation 6.8 Noise in Color Images 6.9 Color Image Compression
3
6. Color Image Processing
Preview Two motivations in color image processing In automated image analysis, color is a powerful descriptor (simplify object identification and extraction) The human eye can discern thousands of color shades and intensities, compared to about two-dozen shades of gray Two major areas Full color (TV camera or color scanner) Pseudo-color (particle monochrome intensity or range of intensities)
4
6.1 Color Fundamentals Color spectrum In 1666, Sir Isaac Newton
When a beam of sunlight is passed through a glass prism The emerging beam of light consists of a continuous spectrum of colors ranging from violet to red (not white) Divided into six broad regions Violet, blue, green, yellow, orange, and red Each color blends smoothly into the next
5
6.1 Color Fundamentals
6
6.1 Color Fundamentals Visible light Color perception
Relatively, narrow band of frequencies in the electromagnetic energy spectrum Color perception The colors that human beings perceive in an object are determined by the nature of the light reflected from the object Some shades of color A body that favors reflectance in a limited range of the visible spectrum White A body that reflects light that is balanced in all visible wavelengths 사람이 인지하는 컬러는 사물로부터 반산 된 빛의 속성의 의해 결정됩니다. shade : 어두운 부분
7
6.1 Color Fundamentals Color can only exist when three components are present: a viewer, an object, and light When white light hits an object, it selectively blocks some colors and reflects others Only the reflected colors contribute to the viewer's perception of color
9
6.1 Color Fundamentals Achromatic light
Its only attribute is its intensity, or amount Viewers see on a black and white television set The term gray level refers to a scalar measure of intensity that rages from black, to grays, and finally to white
10
6.1 Color Fundamentals Chromatic light
The electromagnetic energy spectrum from approximately 400 to 700 nm Radiance [Watt (W)] The total amount of energy that flows from the light source Luminance [Lumens (lm)] A measure of the amount of energy an observer perceives from a light source Brightness A subjective descriptor that is impossible to measure The achromatic notion of intensity One of the key factors in describing color sensation
11
6.1 Color Fundamentals Primary colors of light : red, green, blue
The CIE specific wavelength values to the three primary colors Blue= nm, green= nm, red= 700 nm No mean that these three fixed RGB components acting alone can generate all spectrum colors Secondary colors of light : cyan, magenta, yellow Magenta: R+B, cyan: G+B, yellow: R+G Mixing the three primaries, or a secondary with its opposite primary color, in the right intensities produces white light
12
6.1 Color Fundamentals Primary colors of pigments or colorants
cyan, magenta, yellow A primary color of pigments is defined as one that subtracts or absorbs a primary color of light and reflects or transmits the other two Secondary colors of pigments or colorants red, green, blue Combination of the three pigment primaries, or a secondary with its opposite primary, produces black
13
6.1 Color Fundamentals R B G f Magenta f(x)= i(x) r(x) Light Eyes R B
Yellow R B G f Paper Red
14
6.1 Color Fundamentals Characteristics of colors Brightness Hue
The chromatic notion of intensity Hue An attribute associated with the dominant wavelength in a mixture of light waves Representing dominant color as perceived by an observer Saturation Referring to relative purity or the amount of white mixed with a hue Saturation is inversely proportional to the amount of white light
15
6.1 Color Fundamentals Hue and saturation taken together are called chromaticity A color may be characterized by its brightness and chromaticity The amounts of red, green, and blue needed to form any particular color are called the tristimulus values Denoted X(red), Y(green), and Z(blue)
16
6.1 Color Fundamentals
17
6.1 Color Fundamentals Munsell color system(1898)
Specifies colors based on three color dimensions, hue, lightness and chroma. – perceptually uniform and independent dimensions.
18
6.1 Color Fundamentals CIE 1931 RGB Color matching function
the entire range of human color perception could be covered 435.8nm(B), 546.1nm(G), 700nm(R) 2°observer : the color-sensitive cones resided within a 2° arc of the fovea There is the minus sign : Need 6-ch
19
6.1 Color Fundamentals CIE 1931 XYZ Color matching function
Overcomes minus sign problem. 2°observer Perceptual non-uniformity
20
6.1 Color Fundamentals Chromaticity diagram
Showing color composition as a function of x(R) and y(G) For any value of x and y, z(B) = 1 – (x + y) The positions of the various spectrum colors are indicated around the boundary of the tongue-shaped The point of equal energy = equal fractions of the three primary colors = CIE standard for white light Boundary : completely saturated Useful for color mixing A triangle(RGB) does not enclose the entire color region
21
6.1 Color Fundamentals
22
6.1 Color Fundamentals CIE standard illuminant
A : tungsten lamp, 2856K C : daylight simulator, 6744K D65, D50 : average daylight, 6504K F : Fluorescent lamp E : equal energy at all wavelength
23
6.1 Color Fundamentals
24
6.1 Color Fundamentals Perceptual uniformity CIE 1976 L*a*b*
CIE 1976 L*u*v*
25
6.5.4 Tone and Color Corrections
CIE 1976 L*a*b* Lab color is designed to approximate human vision Uniform color space Correspond to the three characteristics of color It is an excellent decoupler of intensity and color. It is useful for making in both image manipulation and image compression Its gamut encompasses the entire visible spectrum It can represent accurately the colors of any device Display, print or scanner etc. Device independent color model=>Color management systems
26
6.5.4 Tone and Color Corrections
CIE 1976 L*a*b* D65 standard illumination x 0.3127 y 0.329 Xw Yw 100 Zw
27
6.1 Color Fundamentals Color Gamut The range of color representation of a display device
28
6.2 Color Models Color space conversion translating color from one device's space to another Gamut mismatch
29
6.2 Color Models The purpose of a color model
To facilitate the specification of colors in some standard Color models are oriented either toward hardware or applications Hardware-oriented Color monitor or Video camera : RGB Color printer : CMY Color TV broadcast : YIQ ( I : inphase, q : quadrature) Color image manipulation : HSI, HSV Image processing : RGB, YIQ, HSI
30
6.2 Color Models Additive processes create color by adding light to a dark background (Monitors) Subtractive processes use pigments or dyes to selectively block white light (Printers)
31
6.2.1 The RGB Color Model RGB model is based on a Cartesian coordinate system The color subspace of interest is the cube RGB values are at three corners Colors are defined by vectors extending from the origin For convenience, all color values have been normalized All values of R, G, and B are in the range [0, 1] 직교 좌표계(直交 座標系, Rectangular coordinate system)는 임의의 차원의 에우클레이데스 공간 (혹은 좀더 일반적으로 내적공간)을 나타내는 좌표계의 하나이다. 이를 발명한 프랑스의 수학자 데카르트의 이름을 따 데카르트 좌표계(Cartesian coordinate system)라고도 부른다. 직교 좌표계는 극좌표계 등 다른 좌표계와 달리, 임의의 차원으로 쉽게 일반화할 수 있다. 직교 좌표계는 나타내는 대상이 평행이동(translation)에 대한 대칭을 가질 때 유용하나, 회전 대칭 등 다른 꼴의 대칭은 쉽게 나타내지 못한다. 일반적으로, 주어진 에우클레이데스 공간에 기저와 원점이 주어지면, 이를 이용하여 직교 좌표계를 정의할 수 있다. 가장 흔한 2차원 혹은 3차원의 경우, 직교 좌표를 통상적으로 라틴 문자 x, y, z로 적는다. 4차원인 경우, w나 (물리학에서 시공을 다루는 경우) t를 쓴다. 임의의 차원의 경우에는 첨자로 xn의 꼴로 쓴다. 3차원 좌표계 [편집] 오늘날 사용하는 3차원 좌표계는 xy, xz 그리고 yz 평면으로 이루어지는데 이 세 평면은 서로 직교하며, 평면을 이루는 x축(수평방향)과 y축(수직방향) 그리고 z축 또한 서로 직교한다. x, y, z축이 만나는 점을 원점이라고 부른다. (points of equal RGB values)
32
6.2.1 The RGB Color Model Images represented in the RGB color model
Images represented in the RGB color model consist of three independent image planes, one for each primary color Pixel depth The number of bits used to represent each pixel in RGB space is called the pixel depth The term full-color image is used often to denote 24-bit RGB color image
33
6.2.1 The RGB Color Model
34
6.2.1 The RGB Color Model
35
6.2.1 The RGB Color Model Example 6.1
Generating the hidden face planes and a cross section of the RGB color cube
36
6.2.1 The RGB Color Model The set of safe RGB colors
A subset of colors that are likely to be reproduced faithfully, reasonably independently of viewer hardware capabilities They are also called the set of all-system-safe colors, safe Web colors, safe browser colors 216 safe colors in RGB color model On the assumption that 256 colors is the minimum number of colors that can be reproduced faithfully by any system, forty of these 256 colors are known to be processed differently by various operating systems, leaving only 216 colors that are common to most systems
37
6.2.1 The RGB Color Model Safe RGB colors, or all-systems-safe colors
safe Web colors or safe browser colors in internet applications 216 colors (= 63) are common to most systems The de facto standard – the colors viewed by most people appear the same
38
6.2.1 The RGB Color Model FFFFFF FFFFCC FFFF99 ?? FF0000 00FFFF
Decimal 51 102 204 HEX 33 66 CC 3366CC FFFFCC FFFF99 ?? FF0000 00FFFF It is important to note that not all possible 8-bit gray colors are included in the 216 safe colors
39
6.2.1 The RGB Color Model
40
6.2.2 The CMY and CMYK Color Models
General purpose of CMY color model To generate hardcopy output The primary colors of pigments Cyan, magenta, and yellow C = W - R, M = W - G, and Y = W - B Most devices that deposit colored pigments on paper require CMY data input Converting RGB to CMY The inverse operation from CMY to RGB is generally of no practical interest
41
6.2.3 The HSI Color Model Usefulness
The intensity is decoupled from the color information The hue and saturation are intimately related to the way in which human beings perceive color An ideal tool for developing image procession algorithms based on some of the color sensing properties of the human visual system
42
6.2.3 The HSI Color Model HSI color model H : hue S : saturation
I : intensity
43
6.2.3 The HSI Color Model Hue and saturation in the HSI color model
Hue - Angle from the red axis Saturation - Length of the vector
44
6.2.3 The HSI Color Model The HSI color model based on triangular and circular color planes
45
6.2.3 The HSI Color Model Converting colors from RGB to HIS
Hue component Saturation component Intensity component with RGB values have been normalized to the range [0,1] Angle is measured with respect to the red axis Hue can be normalized to the range [0, 1] by dividing by 360c
46
6.2.3 The HSI Color Model Converting colors from HSI to RGB
Three sectors of interest, corresponding to the 1200 intervals in the separation of primaries RG sector
47
6.2.3 The HSI Color Model Converting colors from HSI to RGB(continued)
GB sector BR sector
48
Converting colors from HSI to RGB
Example 6.2 The HSI values corresponding to the image of the RGB color cube
49
Converting colors from HSI to RGB
Manipulating HSI component images
50
Converting colors from HSI to RGB
51
6.3 Pseudocolor Image Processing
Pseudocolor image processing (or false color) Pseudocolor image processing consists of assigning colors to gray values based on a specified criterion The principal use of pseudocolor Human visualization Interpretation of gray-scale events Pricipal motivation for using color Humans can discern thousands of color shades and intensities, compared to only two dozen or so shades of gray
52
6.3.1 Intensity Slicing Intensity Slicing
Intensity slicing can be expressed by the following equation
53
6.3.1 Intensity Slicing
54
6.3.1 Intensity Slicing Example of intensity slicing
55
6.3.1 Intensity Slicing Example 6.4
Use of color to highlight rainfall levels
56
6.3.2 Gray Level to Color Transformations
Basic concept of the grey level to color transformation Performing three independent transformations on the gray level of any input pixel
57
6.3.2 Gray Level to Color Transformations
58
6.3.2 Filtering Approach (not in textbook)
IFT Additional Processing Color display monitor Fourier Transform F(x,y) Filter IFT Additional Processing Filter IFT Additional Processing A filtering model for pseudo-color image processing
59
6.3.2 Filtering Approach (not in textbook)
60
6.3.2 Gray Level to Color Transformations
61
6.3.2 Gray Level to Color Transformations
Example 6.6 Color coding of multispectral images
62
6.3.2 Gray Level to Color Transformations
Example 6.6 (continued) Color coding of multispectral images
63
6.4 Basics of Full-Color Image Processing
A pixel at (x,y) is a vector in the color space RGB color space c.f. gray-scale image f(x,y) = I(x,y)
64
6.4 Basics of Full-Color Image Processing
65
6.5 Color Transformations
Similar to gray scale transformation g(x,y)=T[f(x,y)] Color transformation g(x,y) f(x,y) s1 s2 … sn f1 f2 fn T1 T2 Tn
66
6.5.1 Formulation Formulation is a color input image
is the transformed or processed is an operator Transformation or color mapping functions n is the number of color components The color components of and at any point is a set of transformation
67
6.5.1 Formulation Some operations are better suited to specific models. In the HIS color space, this can be done with the simple transformation In the RGB color space, three components must be transformed: The CMY space requires a similar set of tranfomations:
68
6.5.1 Formulation
69
6.5.1 Formulation It is important that to note that each transformation defined in Eqs.(6.5-4) through (6.5-6) depends only on one component within its color space
70
6.5.2 Color Complements Complements : the hues directly opposite one another on the color circle Color complements are useful for enhancing detail that is embedded in dark regions of a color image.
71
6.5.2 Color Complements
72
6.5.3 Color Slicing Highlighting a specific range of colors in an image is useful for separating objects from their surrondings. The basic idea Display the colors of interest so that they stand out from the background Use the region defined by the colors as a mask for further processing Gray-level slicing techniques
73
6.5.3 Color Slicing The simplest ways to “slice”
To map the colors outside some range of interest to a nonprominent neutral color (see fig.6.43) If the colors of interest are enclosed by a cube, If a sphere is used to specify the colors of interest,
74
6.5.3 Color Slicing How to take a region of colors of interest?
prototype color prototype color Sphere region Cube region
75
6.5.3 Color Slicing
76
6.5.4 Tone and Color Corrections
Color transformation can be performed on most computers Digital cameras, flatbed scanners and inkjet printers turn a personal computer into a digital darkroom allowing tonal adjustments and color corrections without the need for traditionally outfitted wet processing The focus of current discussion is photo enhancement and color reproduction
77
6.5.4 Tone and Color Corrections
Tonal transformation Adjusts the image’s brightness and contrast to provide maximum detail over a suitable range of intensities. The tonal range of an image, also called key type, refers to its general distribution of color intensities. High-key: images are concentrated at high (or light) intensities. Low-key: images are located predominantly at low intensities Middle-key: images lie in between.
78
6.5.4 Tone and Color Corrections
79
6.5.4 Tone and Color Corrections
Note that the transformations depicted are the functions required for correcting the images(color balancing).
80
6.5.5 Histogram Processing Histogram equalization Color images
A transformation that seeks to produce an image with a uniform histogram of intensity values Color images Composed of multiple components The gray-scale technique to more than one component and/or histogram A more logical approach To spread the color intensities uniformly, leaving the colors themselves(e.g., hues) unchanged. HSI color space is ideally suited to this type approach.
81
6.5.5 Histogram Processing
82
6.6 Smoothing and Sharpening
The next step beyond transforming each pixel of a color image without regard to its neighbors (as in the previous section) is to modify its value based on the characteristics of the surrounding pixels. The basics of neighborhood processing are illustrated within the context of color image smoothing and sharpening.
83
6.6.1 Color Image Smoothing The basics of neighborhood processing
As a spatial filtering operation in which the coefficients of the filtering mask are all 1’s The mask is slid across the image to be smoothed Each pixel is replaced by the average of the pixels in the neighborhood defined by the mask
84
6.6.1 Color Image Smoothing
85
6.6.1 Color Image Smoothing
86
6.6.1 Color Image Smoothing
87
6.6.2 Color Image Sharpening
Use the Laplacian (same as smoothing)
88
6.7 Color Segmentation Segmentation is a process that partitions an image into regions. Although segmentation is the topic of Chapter 10, we consider color segmentation briefly here for the sake of continuity.
89
6.7.1 Segmentation in HSI Color Space
Color is conveniently represented in the hue image Saturation is used as a masking image in order to isolate further regions of interest in the hue image The intensity image Not used segmentation No color information
90
6.7.1 Segmentation in HSI Color Space
Hue Binary Saturation mask Product of hue and mask Saturation Intensity Thresholding
91
6.7.2 Segmentation in RGB Vector Space
Segmentation is one area in which better results generally are obtained by using RGB color vectors than HSI space. A measure similarity used the Euclidean distance “average” color : the RGB vector a z : an arbitrary point in RGB space
92
6.7.2 Segmentation in RGB Vector Space
Generalized form Implementing both equations is computationally expensive for images of practical size. A compromise is to use a bounding box.
93
6.7.2 Segmentation in RGB Vector Space
94
6.7.3 Color Edge Detection By gradient operators
The gradient discussed in section is not defined for vector for quantities Computing the gradient on individual images and then using the results to form a color image will lead to erroneous results
95
6.7.3 Color Edge Detection Definition of the gradient applicable to vector quantities : method by Di Zenzo The gradient(magnitude and direction)of the vector c
96
6.7.3 Color Edge Detection The direction of maximum rate of change of
The value of the rate of change at (x, y)
97
6.7.3 Color Edge Detection
98
6.7.3 Color Edge Detection
99
6.8 Noise in Color Image The noise content of a color image
The same characteristics in each color channel Possible for color channels to be affected differently by noise Different noise level Caused by differences in the relative strength of illumination available to each of the color channels For example(use of a red filter : CCD camera) CCD sensors are noisier at lower levels of illumination Red component tend to be noisier than two components In following slides, we take a look at noise in color image and how noise carries over when converting color model.
100
6.8 Noise in Color Image
101
6.8 Noise in Color Image The hue and saturation components are degraded due to the nonlinearity of the cos and min operation. The intensity image is the average of the RGB images.
102
6.8 Noise in Color Image
103
6.9 Color Image Compression
Data compression A central role in the storage and transmission of color images Data : the red, green, and blue components of the pixels in an RGB image The means by the color information is conveyed Compression is the process of reducing or elimination redundant and/or irrelevant data
104
6.9 Color Image Compression
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.