Komputer Grafik 2 AK 045206 Pengenalan Warna Teori

  • Slides: 19
Download presentation
Komputer Grafik 2 (AK 045206) Pengenalan Warna Teori Warna 1

Komputer Grafik 2 (AK 045206) Pengenalan Warna Teori Warna 1

Komputer Grafik 2 (AK 045206) Outline • Warna dan panjang gelombang • Warna yang

Komputer Grafik 2 (AK 045206) Outline • Warna dan panjang gelombang • Warna yang dapat ditangkap mata manusia • Pencocokkan warna • CIE (diagram kromatis CIE, color gamut) • Ruang warna Teori Warna 2

Komputer Grafik 2 (AK 045206) Elements of Color Teori Warna 3

Komputer Grafik 2 (AK 045206) Elements of Color Teori Warna 3

Komputer Grafik 2 (AK 045206) Visible Spectrum • We percieve electromagnetic energy having wavelengths

Komputer Grafik 2 (AK 045206) Visible Spectrum • We percieve electromagnetic energy having wavelengths in the range 400 -700 nm as visible light. Teori Warna 4

Komputer Grafik 2 (AK 045206) Human Color Vision • The photosensitive part of the

Komputer Grafik 2 (AK 045206) 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 430 nm, 560 nm, and 610 nm for the "average" observer. Teori Warna 5

Komputer Grafik 2 (AK 045206) Color Perception • Different spectra can result in a

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Trichromacy • The receptor performance implies that colours do

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Trichromacy • Color Matching : – Given any colour

Komputer Grafik 2 (AK 045206) 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=r. R+g. G+b. B 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+r. R=g. G+b. B with this technique all colours can be matched. Teori Warna 8

Komputer Grafik 2 (AK 045206) The CIE Diagram • The CIE (Commission Internationale d’Eclairage)

Komputer Grafik 2 (AK 045206) The CIE Diagram • The CIE (Commission Internationale d’Eclairage) 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. • Normalised colors – 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 Teori Warna 9

Komputer Grafik 2 (AK 045206) The CIE Diagram • Normalised Color Space • CIE

Komputer Grafik 2 (AK 045206) The CIE Diagram • Normalised Color Space • CIE Chromaticity Diagram Teori Warna 10

Komputer Grafik 2 (AK 045206) The CIE Diagram • Convex Shape – Notice that

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Color Gamuts • The chromaticity diagram can be used

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Color Monitor • Color monitors are based on adding

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Color Printer • When printing color we use a

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Color Space - RGB • The additive color model

Komputer Grafik 2 (AK 045206) 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 • The RGB and CIE systems are practical representations, but do not relate to the way we perceive colours. Teori Warna 15

Komputer Grafik 2 (AK 045206) Color Space – HSI/HSV • For interactive image manipulation

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Color Space – HSI/HSV • Conversion between RGB and

Komputer Grafik 2 (AK 045206) 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 360 o) 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

Komputer Grafik 2 (AK 045206) Alpha Channels • Colour representations in computer systems sometimes

Komputer Grafik 2 (AK 045206) 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

Komputer Grafik 2 (AK 045206) Referensi • • F. S. Hill, Jr. , COMPUTER

Komputer Grafik 2 (AK 045206) 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 : brown. Uni/color. ppt) Interactive Computer Graphic, Slide-Presentation, (folder : Lect_IC_AC_UK/Graphics. Slides 10. pdf) http: //graphics. lcs. mit. edu/classses/6. 837/F 98/Lect ure 4/Slide 23. html , Slide-Presentation, MIT, (folder : MIT_Course. Note/lecture 4. pdf) Teori Warna 19