Color Image Analysis ChaurChin Chen Institute of Information
- Slides: 14
Color Image Analysis Chaur-Chin Chen Institute of Information Systems and Applications Department of Computer Science National Tsing Hua University E-mail: cchen@cs. nthu. edu. tw Tel: +886 3 573 1078
Color Image Processing • Three Primary Signals: Red, Green, Blue • Representation of (R, G, B) Color Images • A Palette of 256 colors from HP Hex Triplet Color Chart • RGB and HSI Conversion • RGB and YIQ Conversion
Color Images and Their Histograms
Color Images and Their Histograms
Koala and Its RGB Components
(R, G, B) Histograms of Koala
(R, G, B) Histograms of Starfruits
(R, G, B) Histograms of Greentrees
From JPEG to RGB • • • • • • • • m=512; npixel=m*n; I=imread('koala 512. jpg'); % m * n * 3 = (R, G, B) R=I(: , 1); G=I(: , 2); B=I(: , 3); h. R=zeros(256); h. G=zeros(256); h. B=zeros(256); for i=1: 256 for j=1: 256 r=1+R(i, j); g=1+G(i, j); b=1+B(i, j); h. R(r)=h. R(r)+1; h. G(g)=h. G(g)+1; h. B(b)=h. B(b)+1; end for k=1: 256 h. R(k)=100. 0*(h. R(k)/npixel); h. G(k)=100. 0*(h. G(k)/npixel); h. B(k)=100. 0*(h. B(k)/npixel); end subplot(2, 2, 1) imshow(R) subplot(2, 2, 2) imshow(G) subplot(2, 2, 3) imshow(B) L=0: 255; subplot(2, 2, 4) plot(L, h. R, 'r-', L, h. G, 'g-', L, h. B, 'b-') title('RGB Histograms of 512 times 512 Koala 512') xlabel('Intensity Levels') ylabel('Percentage %')
RGB Hex Triplet Color Chart • • • Red = FF 0000 Green = 00 FF 00 Blue = 0000 FF Cyan = 00 FFFF Magenta= FF 00 FF Yellow = FFFF 00
Hue, Saturation, Intensity (HSI) • Hue is a color attribute that describes a pure color, e. g. , pure orange, pure green, pure cyan, whereas Saturation is a measure of the degree to which a pure color is diluted by a white light. Brightness (Intensity) is a subjective description that is practically impossible to measure. • HSI is an ideal tool for developing image processing algorithms based on color description that are natural intuitive to humans.
RGB ←→ HSI • I = (R+G+B)/3 • S=1 -3*min{R, G, B}/(R+G+B) =1 -min{R, G, B}/I • H=θ if B ≤ G, = 2π- θ if B >G, where Θ=cos-1 {0. 5[(R-G)+(R-B)]/[(R-G)2+(R-B)(G-B)]1/2} • B=I*(1 -S) • R=I*{1+S*cos(H)/cos[(π/3)-H]} • G=1 -(R+B)
RGB ←→ YIQ • Convert (R, G, B) signals into uncorrelated (Y, I, Q) components for further processing and analysis, for example, compression • Y=0. 299 R + 0. 587 G + 0. 114 B • I =0. 596 R - 0. 275 G - 0. 321 B • Q=0. 212 R – 0. 523 G + 0. 312 B
- Chen chen berlin
- Sri lanka institute of information technology colors
- Institute for information industry
- Sri lanka institute of information technology affiliations
- Real image vs virtual image
- Real vs virtual images
- Image transform in digital image processing
- Optimum notch filter in digital image processing
- Spatial and temporal redundancy in digital image processing
- Image segmentation in digital image processing
- Analog image and digital image
- Huffman coding example
- Image sharpening in digital image processing
- Static image vs dynamic image
- Image geometry in digital image processing