Presentation is loading. Please wait.

Presentation is loading. Please wait.

Color Model.

Similar presentations


Presentation on theme: "Color Model."— Presentation transcript:

1 Color Model

2 이미지 기초 비트맵 이미지(bitmap Images) 객체(object)를 2차원이나 3차원의 공간상에 표현함
평면상에서 사각형 영역을 정의하는 함수 I(r,c) r행 c열 위치의 빛의 색상 및 강도 흑백 이미지 : gray level로 표현 8 비트 gray level : 0은 검정, 255는 흰색 컬러이미지 : 컬러 모델(RGB, YIQ, HIS, CMY)에 따라 표현 래스터(raster) 스캔 방식으로 순차적으로 저장 장점: 색상의 점차적인 변화를 표현하는 데 유리하여 사진이나 사실적인 그림을 정교하게 표현하는 데 적합하고 디스플레이 속도가 빠름 단점: 데이터 양이 많고 확대/축소가 자유롭지 않음 그래픽스 이미지(graphics image) 벡터 방식으로 표현: 이미지의 선, 곡선, 원 등의 구성요소를 수학적으로 표현함 출력될 때 프레임 버퍼에 픽셀의 배열 형태로 표현 장점: 데이터량이 적고 확대/축소가 자유로움 단: 디스플레이 속도가 느리고 정교한 묘사에 제한이 있음

3 그래픽/이미지의 벡터 형식

4 색의 인식 ~ 빛(light): 전자기파(electromagnetic wave)
빛의 속도(speed of light) = 파장(wavelength) x 주파수(frequency) c = f

5 색의 인식 ~ 감지된 빛의 특성 색조(hue, color): 우세한 주파수(dominant frequency)
채도(purity, saturation): 포화도(백색과의 혼합정도), pastel 색은 덜 포화됨 명도, 휘도(brightness, luminance): 빛의 강도(intensity of light) 복사 에너지(radiant energy) 색채(chromaticity) = 색조(hue) + 채도(saturation) 명칭 Rood: hue luminosity purity Hurst: hue brightness purity Wundt: tone lightness purity Rigway: wave-length luminosity chroma Munsell: hue value chroma

6 색의 인식 컬러의 가법 및 감법 연산 가법(additive)연산 : R(ed), G(reen), B(lue) 3색의 조합으로 구성된 방사된 빛을 눈이 인지 R + G + B = 흰색 감법(subtractive)연산 : 반사된 빛을 인간의 눈이 인식함으로써, 색을 인식 Cyan : Red의 보색(complementary color=혼합하면 1(백색광)) Magenta : Green 의 보색 Yellow : Blue의 보색

7 Visual Spectrum Blue nm Green nm Red 700 nm

8 가법 및 감법 컬러 혼합

9 감법 컬러 혼합 (Subtractive Color Mixing)

10 디더링(dithering) 디더링(dithering) : 멀리 떨어져서 보면 흑백 공간이 혼합되어 회색으로 보이는 현상
디더링 패턴 R,G,B 1비트씩 총 3 비트 컬러 시스템 디더링 사용 않으면 8색 2x2 디더링 패턴 사용하면 5x8 색상

11 컬러모델 컴퓨터가 컬러를 인식하게 하는 방법 RGB 모델
컬러가 Red, Green, Blue 의 3색의 강도(intensity)를 규정짓는 세쌍 숫자로 표현 (R + G + B) = 1(흰색) 컬러 CRT 의 R, G, B 전자총의 전압으로 쉽게 맵핑될 수 있기 때문에 비디오 디스플레이 드라이버에 편리한 모델 CMY(cyan, magenta, yellow) 모델 감법(subtractive) 모델[C, M, Y] = [1, 1, 1] – [R, G, B] 컬러프린터에 좋은 모델 CIE color space Commission Internationale de l'Eclairage에 의한 규격 휘도(liminence, Y)와 두 색상값(chrominance value; x, y) YIQ(YUV, YCrCb) 모델 휘도(luminance)-색상(chrominance; color difference) YIQ(NTSC), YUV(PAL, SECAM) 흑백 TV와의 호환(Y 신호가 gray level 제공) HSV 모델 색조(hue), 채도(saturation), 밝기 값(intensity value) 영상처리에 좋은 모델

12 그림 2.5 RGB 컬러 모델 RGB모델 RGB cube Amount of RGB primaries needed to display spectral colors (1, 0, 0)

13 CMY 모델 감법(subtractive) 공간 Cyan(청록색) : Red의 보색(complementary color)
Magenta(심홍색) Green의 보색 Yellow(노랑색) : Blue의 보색 컬러 프린터에서 흰색 바탕에 색을 뿌릴 때 CMY와 RGB 변환 공식: [C, M, Y] = [1, 1, 1] – [R, G, B] CMY로 만들어 내는 8색 최소 팔레트(minimum palette of 8 colors) Red : Yellow + Magenta Green : Cyan + Yellow Blue : Magenta + Cyan Yellow : Yellow Cyan : Cyan Magenta : Magenta White : - Black : Yellow + Cyan + Magenta CMYK: C+M+Y가 best black을 만들지 못하므로 K(pure black) 추가

14 CMYK Color Space Subtractive color space Most common use is for printers K (black) is added for efficiency and consistency White cannot be generated w/o white paper Example: Cyan represents green and blue, by adding cyan we subtract the color red from sum.

15 RGB primary colors CMY secondary colors

16 Lower right: saturated colors, farthest from the line connecting black and white
Upper right: pure red of different intensity/luminance The upper left is similar to CIE XYZ

17 정신 물리학 (Psychophysics)
Spectral-response functions of each of the three types of cones on the human retina Luminous-efficiency function for the human eye R +G + B 

18 CIE(Commission Internationale de l'Eclairage) 모델
RGB -> XYZ 컬러 모델(1931) XYZ: CIE 표준 원색(CIE standard primaries) X: fx Y: fy (luminous-efficiency function) Z: fz C = XX + YY + ZZ (X, Y, Z: CIE primaries에 적용된 weights) (X + Y + Z)에 대하여 정규화된 값(normalized amount)을 구하면 x = X/(X + Y + Z) …  y = Y/(X + Y + Z) …  z = Z/(X + Y + Z) …  x + y + z = 1, z = 1 - x - y 모든 색상은 x, y, Y(luminance) 값만 알면 표현 가능, 나머지는 아래와 같이 계산 (x/y, z/y) X = (x/y)*Y … / Y = Y Z = (z/x)*x=(z/x)*(x/y)*Y = ((1-x- y)/y)*Y = (z/y)*Y … /

19 CIE(Commission Internationale de l'Eclairage) 모델
CIE chromaticity diagram (illuminant C: x=0.31, y=0.316, Y=100.0) Amount of CIE primaries needed to display spectral colors

20 CIE Color Chart CIE XYZ Not uniform chromaticity scale (UCS)
CIE: Intl Committee on Color Standards CIE XYZ

21 YIQ 모델(YUV, YCrCb) RGB와 YIQ (NTSC)와의 변환 관계
Y(luminance: CIE의 Y) = 0.30R G B I(chrominance: orange-cyan hue) = 0.60R G B Q(chrominance: green-magenta hue) = 0.21R G B R = 1.0Y I Q G = 1.0Y – 0.272I – 0.647Q B = 1.0Y – 1.108I – 1.705Q RGB와 YUV (PAL, SECAM)의 변환 관계 Y = 0.30R G B U = (B-Y) × 0.493 V = (R-Y) × 0.877 R = 1.0Y U V G = 1.0Y – 0.272U – 0.647V B = 1.0Y – U – 1.703V RGB와 YCrCb (MPEG)와 변환 관계 Cr = R-Y Cb = B-Y RGB의 CIE coordinates (illuminant C: x=0.31, y=0.316, Y=100.0) Red Green Blue x y

22 HSV (HSB) 모델

23 Perceptual Representation (HSV)

24 YUV Color Space Y is luminance of a color
Y = 0.299*R’ *G’ *B’ U and V are color differences U = 0.492*(B’-Y) V = 0.877*(R’-Y) This simplifies recovery of R’,G’,B’ R’ = Y V G’ = Y U V B’ = Y U R’,G’,B’ here are same as R_N,G_N,B_N in Jain’s

25 YIQ Color Space Rotate UV vectors by 30o U V I Q

26 YIQ Color Space I = 0.736*(R’-Y) - 0.268(B’-Y)
Q = 0.478*(R’-Y) *(B’-Y) Recovery of R,G,B R’ = Y *I *Q G’ = Y *I *Q B’ = Y *I *Q

27 YCbCr Scaled and offset version of YUV Range of signals Y: 16~235
Suitable for digital images/video

28 YCbCr Color Space Begin by calculating R-Y and B-Y vectors
B’-Y = *R’ *G’ *B’ R’-Y = 0.701*R’ *G *B’ The difference signals have ranges B’-Y (-.866 to .866) R’-Y (-.701 to .701) Scale to range (-.5 to .5) to give same range as Y (0 to 1) Cb = -.169*R’ *G’ *B’ = .564(B’-Y) Cr = .500*R’ *G’ *B’ = .713(R’-Y)

29 YCbCr Color Space For computer representation, Scale and offset these values to keep in range 16 to 240 (Cb and Cr) or 16 to 235 (Y) Cb = 224*Cb = (B’-Y) + 128 Cr = 224*Cr = (B’-Y) + 128 Y = 219*Y + 16 Finally,

30 컬러 모델의 비교 컬러모델 내용 CIE color space
컬러모델 내용 CIE color space ·Commission Internationale de l'Ecairage 에 의한 규격 ·다른 컬러 모델 조정(calibration)의 참조 모델 RGB ·컬러가 Red, Green, Blue의 3색의 강도(intensity)를 규정짓는 세쌍 숫자로 표현 ·컬러 CRT 의 R, G, B 전자총의 전압으로 쉽게 맵핑될 수 있기 때문에 비디오 디스플레이 드라이버에 편리한 모델이다. HSV/HSB ·컬러를 색상(Hue), 채도(Saturation), 명도(Value/Brightness)로 표현 YIQ YUV YCrCb ·텔레비전 산업에서 사용되는 컬러모델로 YIQ는 NTSC, YUV는 PAL, SECAM에서 사용되며, YCbCr 은 MPEG에서 사용하는 컬러 모델이다. ·Y 는 휘도(luminance), IQ, UV, CrCb 는 비디오 신호의 색상 부분을 형성하며, chrominance 라 한다. CMYK ·프린팅에서의 컬러 모델 ·Cyan(청록색), Magenta(심홍색), Yellow는 red, green, blue의 보색이며, 종이 위의 임의의 색은 이 색들의 잉크의 배합으로 표현된다. ·실제적으로 잉크들은 순수하지 않고, 특정잉크(‘CMYK'의 K)가 더 나은 블랙과 그레이를 표현하기 위해 사용된다.

31 이미지의 표현 컬러모델 : 컬러의 부호화를 규정하는 절차
알파채널(Alpha channels) : 투명도(transparency) 지정 채널 수(Number of Channels) : 각 픽셀당 정보의 수(예, RGB는 3채널, CMYK는 4채널) 채널 깊이(Channel Depth) : 채널당 할당하는 비트 수(예, 1, 2, 4, 8) 인터레이싱(Interlacing) : 한 픽셀의 R,G,B 값 저장하고 다음 픽셀의 R, G, B값 저장 (cf.) 모든 R 값, 모든 G 값, 모든 B 값 저장 인덱싱(Indexing) : 색상컬러를 색상 참조표의 인덱스로 표현 화소종횡비(pixel aspect ratio) : 픽셀들의 너비 대 높이의 비 압축 : 무손실(lossless) 압축과 손실(lossy) 압축


Download ppt "Color Model."

Similar presentations


Ads by Google