Вы находитесь на странице: 1из 19

Komputer Grafik 2 (AK045206)

Pengenalan Warna

Teori Warna

1/19

Komputer Grafik 2 (AK045206)

Outline
Warna dan panjang gelombang Warna yang dapat ditangkap mata manusia Pencocokkan warna CIE (diagram kromatis CIE, color gamut) Ruang warna

Teori Warna

2/19

Komputer Grafik 2 (AK045206)

Elements of Color

Teori Warna

3/19

Komputer Grafik 2 (AK045206)

Visible Spectrum
We percieve electromagnetic energy having wavelengths in the range 400-700 nm as visible light.

Teori Warna

4/19

Komputer Grafik 2 (AK045206)

Human Color Vision


The photosensitive part of the eye is called the retina. The retina is largely composed of two types of cells, called rods and cones. The cones are responsible for color perception. Cones are most densely packed within a region of the eye called the fovea.

There are three types of cones, referred to as S, M, and L. They are roughly equivalent to blue, green, and red sensors, respectively. Their peak sensitivities are located at approximately 430nm, 560nm, and 610nm for the "average" observer.

Teori Warna

5/19

Komputer Grafik 2 (AK045206)

Color Perception
Different spectra can result in a perceptually identical sensations called metamers Color perception results from the simultaneous stimulation of 3 cone types (trichromat) Our perception of color is also affected by surround effects and adaptation Experiment:
Subject views a colored surface through a hole in a sheet, so that the color looks like a film in space

Investigator controls for nearby colors, and state of mind

Teori Warna

6/19

Komputer Grafik 2 (AK045206)

Trichromacy
The receptor performance implies that colours do not have a unique energy distribution. Colors which are a distribution over all wavelengths can be matched by mixing three (R G B)
Spectrum

Color Matching: People think these two spectra look the same (monomers)

400 500

600

700

3 Primaries

Representing color: If you want people to see the continuous spectrum, you can just show the three primaries

400 500 600 700

Teori Warna

7/19

Komputer Grafik 2 (AK045206)

Trichromacy
Color Matching :
Given any colour light source, regardless of the distribution of wavelengths that it contains, we can try to match it with a mixture of three light sources X=rR+gG+bB where R, G and B are pure light sources and r, g and b their intensities

Subtractive matching
Not all colours can be matched with a given set of light sources We can add light to the colour we are trying to match: X+rR=gG+bB with this technique all colours can be matched.

Teori Warna

8/19

Komputer Grafik 2 (AK045206)

The CIE Diagram


The CIE (Commission Internationale dEclairage) diagram was devised as a standard normalised representation of color. Given three light sources we can mix them to match any given color, providing we allow ourselves subtractive matching. Suppose we normalise the ranges found to [0..1] to avoid the negative signs. Having normalised the range over which the matching is done we can now normalise the colours such that : r+g+b=1 thus, x = r/(r+g+b) y = g/(r+g+b) z = b/(r+g+b) = 1 - x - y

Normalised colors

Teori Warna

9/19

Komputer Grafik 2 (AK045206)

The CIE Diagram


Normalised Color Space

CIE Chromaticity Diagram

Teori Warna

10/19

Komputer Grafik 2 (AK045206)

The CIE Diagram


Convex Shape
Notice that the pure colours (coherent ) are round the edge of the CIE diagram. The shape must be convex, since any blend (interpolation) of pure colours should create a color in the visible region. The line joining purple and red has no pure equivalent. The colours can only be created by blending.

Intensities
Since the colours are all normalised there is no representation of intensity. By changing the intensity perceptually different colours can be seen.

White Point
When the three colour components are equal, the colour is white: x = 0.33 , y = 0.33

Saturation
Pure colours are called fully saturated. These correspond to the colours around the edge of the horseshoe. Saturation of a arbitrary point is the ratio of its distance to the white point over the distance of the white point to the edge.
Teori Warna 11/19

Komputer Grafik 2 (AK045206)

Color Gamuts
The chromaticity diagram can be used to compare the "gamuts" of various possible output devices (i.e., monitors and printers).

Teori Warna

12/19

Komputer Grafik 2 (AK045206)

Color Monitor
Color monitors are based on adding three the output of three different light emitting phosphors. The nominal position of these on the CIE diagram is given by:

Teori Warna

13/19

Komputer Grafik 2 (AK045206)

Color Printer
When printing color we use a subtractive representation. Inks absorb wavelengths from the incident light, hence they subtract components to create the color. The subtractive primaries are
Magenta (purple) Cyan (light Blue) Yellow

Additive vs Subtractive Colour representation


The subtractive representation is capable of representing far more of the colour space than the additive.

Teori Warna

14/19

Komputer Grafik 2 (AK045206)

Color Space - RGB


The additive color model used for computer graphics is represented by the RGB color cube, where R, G, and B represent the colors produced by red, green and blue phosphours, respectively.

Conversion from one RGB gamut to another

X Xr Y = Y r Z Zr

Xg Yg Zg

X b R Yb G Zb B

The RGB and CIE systems are practical representations, but do not relate to the way we perceive colours.

Teori Warna

15/19

Komputer Grafik 2 (AK045206)

Color Space HSI/HSV


For interactive image manipulation it is preferable to use the HSI representation HSI has three values per color:
Hue - corresponds notionally to pure color. Saturation - The proportion of pure colour Intensity - the brightness

Hexcone subset of cylindrical (polar) coordinate system

Teori Warna

16/19

Komputer Grafik 2 (AK045206)

Color Space HSI/HSV


Conversion between RGB and HSI I = ( r + g + b )/3 ( Sometimes, I = max(r,g,b)) S = ( max(r,g,b) - min(r,g,b) ) / max(r,g,b) Hue (which is an angle between 0 and 360o) is best described procedurally Calculating Hue : if (r=g=b)
Hue is undefined, the colour is black, white or grey.

if (r>b) and (g>b)


Hue = 120*(g-b)/((r-b)+(g-b))

if (g>r) and (b>r)


Hue = 120 + 120*(b-r)/((g-r)+(b-r))

if (r>g) and (b>g)


Hue = 240 +120*(r-g)/((r-g)+(b-g)) Teori Warna

17/19

Komputer Grafik 2 (AK045206)

Alpha Channels
Colour representations in computer systems sometimes use four components - r g b . The fourth is simply an attenuation of the intensity which:
allows greater flexibility in representing colours. avoids truncation errors at low intensity allows convenient masking certain parts of an image.

Teori Warna

18/19

Komputer Grafik 2 (AK045206)

Referensi
F.S.Hill, Jr., COMPUTER GRAPHICS Using Open GL, Second Edition, Prentice Hall, 2001 Andries van Dam, Introduction to Computer Graphics, Brown University, 2003 (folder : brownUni/color.ppt) Interactive Computer Graphic, Slide-Presentation, (folder : Lect_IC_AC_UK/GraphicsSlides10.pdf) http://graphics.lcs.mit.edu/classses/6.837/F98/Lect ure4/Slide23.html , Slide-Presentation, MIT, (folder : MIT_CourseNote/lecture4.pdf)

Teori Warna

19/19

Вам также может понравиться