티스토리 뷰

DIP/Matlab

[Ch12] Color Processing

jeong_reneer 2023. 1. 9. 18:29

12.1 Color

Physical aspects of color

Visible light : part of electromagnetic spectrum (energy takes form of waves of varying wavelength)

 

Perceptual aspects of color

Color = being made up of varying amonts of primary colors (red, green, blue)

 

Color matching functions (CIE)

Y component : luminance or perceived brightness of color → Sum = 1, symmetric about middle of visible spectrum

 

12.2 Color models

Color model : a method for specifying colors in some standard way → using 3D coordinate system

1) RGB

RGB : standard for display of colors : on computer monitors, but not very good way of describing colors (cube space)

 

 

2) HSV

HSV : more intuitive method of describing colors (cone color space)

 

Hue (H) : true color attribute (red, green, blue, orange, yellow, ...)

Saturarion (S) : amount by which color as been diluted with white

         The more white, the lower saturation (light color = low saturation deep color = high saturation)

Value (V) : degree of brightness (dark color = low intensity ↔ lit color = high intensity)

          intensity : independent of color information (very useful model for img processing)

 

 

Conversion bw RGB and HSV

[MATLAB] rgb2hsv OR hsv2rgb function

>> rgb2hsv([0.2 0.4 0.6])

ans =
	0.5833 0.6667 0.6000

 

3) YIQ

YIQ :  linear transformation of RGB

 

Y : luminance (with intensity)

I and Q : color information

 

    ⇒ Human visual system assigns more intensity (Y) to green (G) component of img than R and B

 

Conversion bw RGB and YIQ

[MATLAB] rgb2ntsc OR ntsc2rgb function

 

12.3 Color images in MATLAB

>> x=imread('lily.tif');
>> size(x)
ans =
	186 230 3
    
>> imshow(x)
>> figure,imshow(x(:,:,1))
>> figure,imshow(x(:,:,2))
>> figure,imshow(x(:,:,3))

>> xh=rgb2hsv(x);
>> imshow(xh(:,:,1))
>> figure,imshow(xh(:,:,2))
>> figure,imshow(xh(:,:,3))

>> xn=rgb2ntsc(x);
>> imshow(xn(:,:,1))
>> figure,imshow(xn(:,:,2))
>> figure,imshow(xn(:,:,3))

 

12.4 Pseudocoloring

1) Intensity Slicing

 

2) Grey-Color Transformations

 

 

12.5 Processing of color images

1) Contrast Enhancement

2) Spatial Filtering

3) Noise Reduction

4) Edge Detection

 

 

'DIP > Matlab' 카테고리의 다른 글

[Ch11] Morphology  (0) 2023.01.09
[Ch10] The Hough and Distance Transform  (0) 2023.01.09
[Ch9] The Fourier Transform  (0) 2022.03.06
[Ch8] Edges  (0) 2022.02.20
[Ch7] Noise  (0) 2022.02.12
댓글
공지사항