• Part I - Images A) COLOR IMAGES A) Color Spaces B) Image Formats B) IMAGE STANDARDS A) JPEG B) JPEG 2000 Color Images: Color Spaces
Total Page:16
File Type:pdf, Size:1020Kb
• Part I - Images A) COLOR IMAGES A) Color spaces B) Image Formats B) IMAGE STANDARDS A) JPEG B) JPEG 2000 Color Images: color spaces Colour Image Formation Light source Observer (human eye) Ε(λ) Ε(λ)ρ(λ) Incident light Reflected light • Humans perceive color light through the eye sensor. Colour is determined by the relative radiant power distribution of the incident light, the reflection of the materials and the characteristics of the observer. • The appearance of an object is determined by its reflectance and the visible wavelenghts of the light it is exposed with (and angle). Human eye sensor • The human eye sensor operates in the wavelenght interval 350nm - 780nm (infrared is beyond 780nm and ultraviolet below 350nm). The visible spectrum is therefore comprised between 384THz and 857THz (THz = 1012 Hz ) Eye response: Luminance and Chrominance + Achromatic Red cone + + + (Luminance) Rods + - Red-Green Green cone + + (Chrominance) Yellow - + Blue-Yellow Blue cone (Chrominance) • Human eye rods and cones have sensitivity to Luminance and Chrominance, respectively. Eye has higher sensitivity for Luminance Human eye spectral integration • Color sensation in humans is obtained from the combination of the responses of the three types of cones, according to the amount of light E ρ the object reflectance and the cone type sensibility St. ρ ρ ρ Reflectance of Human Skin ρ(λ) • Different objects have different reflectances in the visible spectrum Colour Image Formation Light source Observer (camera) Color image Ε(λ) Ε(λ)ρ(λ) Incident light Reflected light • Colour image formation is determined by the relative radiant power distribution of the incident light, the reflection of the materials and the characteristics of the observer. Camera spectral integration • Having the light spectrum and the spectral reflectance curve of the object the appearance of the object depends on the spectral sensitivity of the observer: considering Tristimulus RGB values of camera = Colour * Tristimulus. • If the spectrum of the light source changes then the colour of the reflected light also changes. R = E(λ)ρ (λ) f (λ)dλ ò Skin R λ G = E(λ)ρ (λ) f (λ)dλ ò Skin G λ B = E(λ)ρ (λ) f (λ)dλ ò Skin B λ Rewriting Integration as Summation f (x) A/ ∆x ∫ f (x)dx ≈ ∑ f (i∆x)∆x i=1 x 0 A ∆x • Integration over the light spectrum can be performed as a finite sum of evenly spaced samples. The sum of evenly spaced sample values weighted by the wavelenght distance between the samples is called Riemann Summation Color spaces • A color space is a three-dimensional definition of a color system. The attributes of the color system are mapped onto the coordinate axes of the color space. • Different color spaces exist: each has advantages and disadvantages for color selection and specification for different applications: – Some colour spaces are perceptually linear, a change in stimulus will produce the same change in perception wherever it is applied. Other colour spaces, e.g. computer graphics color spaces, are not linear. – Some colour spaces are intuitive to use, i.e. it is easy for the user creating desired colours from space navigation. Other spaces require to manage parameters with abstract relationships to the perceived colour. – Some colour spaces are tied to specific equipments while others are equally valid on whatever device they are used. – ….. Models Applications CIE Colorimetric XYZ Colorimetric calculations Device-oriented Non-uniform spaces Storage, processing, analysis, coding, RGB, YIQ, YCC color TV Uniform spaces Color difference evaluation, analysis, L* a* b*, L* u* v* color management systems Device-oriented and HSI, HSV, HSL, Human color perception, computer User-oriented I1I2I3 .... graphics Munsell Human visual system • All color spaces are subsets of the CIE colorimetric color space. CIE Colorimetric space • The CIE has measured the sensitivities of the three broad bands in the eye by matching spectral colours to specific mixtures of three coloured lights. • The spectral power distribution of a colour is cascaded with these sensitivity functions to produce three tri-stimulus values. • These tri-stimulus values uniquely represent a colour. The three CIE tri-stimulus values are the building blocks from which many colour specifications are made. CIE primaries and color matching functions • The color matching experiment , was devised in 1920 to characterize the relationship between the physical spectra and the perceived color, measuring the mixtures of different spectral distributions that are required for human observers to match colors. • In 1931 CIE standardized a set of spectral weighting functions that model the human perception of color. They are referred as the x, y and z color matching functions. CIE recommended them as monochromatic primaries. They roughly correspond to colour sensations of red green and blue 1.5 1 blue x, y, z color matching functions. 0.5 green red CIE Tristimulus values • The CIE primaries are not real colors but convenient mathematical constructs. Almost any spectral composition can be achieved by a suitably chosen mix of these three monochromatic primaries. • The mixture of the three CIE primaries may be specified by three numbers called tristimulus values. In fact, Given, the standard observer colour matching functions, a colour spectral distribution C(λ) and the three primary light sources, it is possible to retrieve the proportions βk in which the three light sources must be combined to obtain C. • Quantities Tk = βk /wk are called tristimulus values, where w k is the proportion of light sources needed to obtain a reference white light of known energy distribution. CIE XYZ color model • The CIE XYZ color model is based on the tristimulus values of the spectral matching functions of the three primaries identified by CIE. • The Luminance Y of a source is obtained by integrating the source’s Spectral Power Distribution, weighted by the y color matching function. The two other components X and Z, are concerned with hue and saturation and are similarly computed using the x and z color matching functions. Luminance Chrominance CIE Chromaticity diagram • By intersecting the XYZ space with plane X+Y+Z=1 and projecting this intersection on the x-y plane we obtain the CIE Chromaticity Diagram.The Chromaticity coordinates x,y map the color wrt hue and saturation on the two dimensional chromaticity diagram. The procedure is as follows: – Measuring the spectral power distribution at each wavelength – Multiply by each of the three color matching functions – Sum to get the three X,Y,Z (Y gives the brightness) – Normalize the values • The x and y are the chromaticity coordinates. Since z= 1-x-y it offers no additional information x= X/(X+Y+Z) y= Z/(X+Y+Z) White point Line of purples • The infinitesimal distance between two colors ij with coordinates Xi and 2 Xj = Xi+dX in the chromaticity diagram can be written as dij = Σ cij dXidXj where cij measures the ability of humans to perceive small differences. • If these quantities were constant, the space would be Euclidean and the distance between two colors would be proportional to the lenght of their connecting line. Instead colors corresponding to points that have the same distance from a certain point are not perceived as similar colors. • Mac Adams ellipses account for this phenomenon. Ellipses are such that colors inside them are not distinguishable from the color in the center. Device dependent color spaces • A device dependent colour space is such that the colour displayed depends on both the parameters used and on the equipment used for display. • For example the same RGB values on two different workstations produce visually different colors. RGB color model • The simplest way to reproduce colors is to mix the beams from lights of three different colors. • As a consequence of the principle of superposition, the color of an additive mixture is a strict function of the colors of the primaries and of the fraction of each primary that is mixed. The widest range of colors will be reproduced with red, green and blue lights. • The RGB color model is represented as a cube. • In computing there are no standard primaries or white point chromaticities. If you have an RGB image but have no information about its chromaticities, you cannot accurately reproduce the image. • In 1953 the NTSC specified a set of primaries that were representative of phosphors set in color CRT. However since phosphors changed over the years, they are of no practical use today. • For 525/59.94 systems and 1125/60 1920x1035 HDTV it is standard to use primaries of SMTPE RP145 Red Green Blue White X 0.630 0.310 0.155 0.3127 Y 0.340 0.595 0.070 0.3290 Z 0.030 0.095 0.775 0.3582 • Primaries representative of contemporary monitors in studio video computing and computer graphics follow ITU recommendation BT709 Red Green Blue White X 0.640 0.300 0.150 0.3127 Y 0.330 0.600 0.060 0.3290 Z 0.030 0.100 0.790 0.3582 • The matrices giving the transformation between XYZ and RGB 709 and viceversa are the following X 0.412453 0.357580 0.180423 R Y = 0.212671 0.715160 0.072169 G Z 0.019334 0.119193 0.950227 B R 3.240479 -1.537150 -0.498535 X G = -0.969256 1.875992 0.041556 Y B 0.055648 -0.204043 1.057311 Z • The extent – or gamut – of the colors that can be mixed from a given set of RGB primaries is given in the xy chromaticity diagram by a triangle whose vertices are the chromaticities of the primaries. • RGB color matching functions: while purely additive combination of the three primaries could match only the range of hues in the triangle of the chromaticity diagram, all the colors could be matched by adding a certain amount of RED to the color being compared.