Color & Light, Digitalization, Storage
Vision Rods work at low light levels and do not see color –That is, their response depends only on how many photons, not their wavelength Cones come in three types (experimentally and genetically proven), each responds in a different way to frequency distributions
Color receptors Each cone type has a different sensitivity curve –Experimentally determined in a variety of ways For instance, the L-cone responds most strongly to red light “Response” in your eye means nerve cell firings How you interpret those firings is not so simple
Trichromacy means… Spectrum 3 Primaries Color Matching: People think these two spectra look the same (metamers or monomers) Representing color: If you want people to “see” the continuous spectrum, you can just show the three primaries
The RGB Color Matching Functions
Normal Daylight # Photons Wavelength (nm) Note the hump at short wavelengths - the sky is blue Other bumps came from solar emission spectra and atmospheric adsorption
Tungsten Lightbulb Most light sources are not anywhere near white It is a major research effort to develop light sources with particular properties # Photons Wavelength (nm)
Red Paint Red paint absorbs green and blue wavelengths, and reflects red wavelengths, resulting in you seeing a red appearance # Photons Wavelength (nm)
Digital Images Computers work with discrete pieces of information How do we digitize a continuous image? –Break the continuous space into small areas, pixels –Use a single value for each pixel - the pixel value (no color, yet) –No longer continuous in space or intensity This process is fraught with danger, as we shall see Continuous Discrete Pixels: Picture Elements
Perceptual Issues Humans can discriminate about ½ a minute of arc –At fovea, so only in center of view, 20/20 vision –At 1m, about 0.2mm (“Dot Pitch” of monitors) –Limits the required number of pixels Humans can discriminate about 8 bits of intensity –“Just Noticeable Difference” experiments –Limits the required depth for typical dynamic ranges –Actually, it’s 9 bits, but 8 is far more convenient BUT, while perception can guide resolution requirements for display, when manipulating images much higher resolution may be required
Dynamic Range Image depth refers to the number of bits available, but not how those bits map onto intensities We can use those bits to represent a large range at low resolution, or a small range at high resolution Common display devices can only show a limited dynamic range, so typically we fix the range at that of the display device and choose high resolution All possible intensities Low range, high res High range, low res
Color Perception How your brain interprets nerve impulses from your cones is an open area of study, and deeply mysterious Colors may be perceived differently: –Affected by other nearby colors –Affected by adaptation to previous views –Affected by “state of mind” 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
The Same Color?
Going from RGB to XYZ These are linear color spaces, related by a linear transformation Match each primary, for example: Substitute and equate terms:
Standard RGB↔XYZ Note that each matrix is the inverse of the other Recall, Y encodes brightness, so the matrix tells us how to go from RGB to grey
Gamuts Gamut: The range of colors that can be represented or reproduced Plot the matching coordinates for each primary. eg R, G, B Region contained in triangle (3 primaries) is gamut Really, it’s a 3D thing, with the color cube distorted and embedded in the XYZ gamut x y XYZ Gamut RGB Gamut G R B
The Simplest File class Image { unsigned int width; unsigned int height; unsigned char *data; } 3 r,g,b 0r0r 0 r,g,b 1 r,g,b 2 r,g,b 4 r,g,b 5 r,g,b 8 r,g,b 7 r,g,b 6 r,g,b 0g0g 0b0b 1g1g 1r1r 1b1b 2r2r 2g2g 2b2b 3r3r 3g3g
Indexed Color Color Table Pixel DataImage