This is a lesson about the fundamentals of digital imaging in three parts:
This is a fairly abstract or theoretical guide (considering it contains no block equations). If you want practical experience you can get Photoshop or the Gimp and teach yourself. Here I’ll explain underlying ideas – the reasons for things that might seem arbitrary from inside an image editor. Even if you never produce digital images, I hope this might increase your appreciation of them and of your own visual system.
Color is perceptual, not physical. It’s an experience. It isn’t a property of things you see, or a property of your visual system; it’s a condition of your mind. [Trick Julieclipse into helping write this, or at least let her sign off on it.] We usually see red, for instance, because photons of a certain range of frequencies are hitting our retinas, but the reds you see when you poke your closed eyes or when you imagine a firetruck are just as red. In everyday speech we refer to objects as having color, but when we talk about color itself we have to think more strictly.
Color is so distinct from other kinds of perception that philosophers often use it as an example of a quale: something which you have to see for yourself, rather than have described, to really comprehend. We can probably agree that the clear sky in daylight is blue, and that a particular test card is mostly orange, but we don’t seem to have any way of knowing that one of us experiences orange the way the other experiences blue and vice-versa. (Platty’s ≈playmate.)
How would we describe the perception of colors to an alien if we couldn’t refer to the colors of specific things? For other concepts we could say, for instance, “Love is the feeling of sharing, etc., etc.” or “Gödel’s Theorem is that any consistent axiomatic system blah blah”, or whatever. But where would we even start with color?
We’re going to be talking about fairly precise operations with represtentations and stumuli of color, and if we’re not careful this will lead us to think of the whole subject as rather discrete and delimited in every way, but no, color is weird.
Eyes, baby. What’s with them?
Creationists will occasionally use the human eye an an example of something so complex that it could not have evolved iteratively. In fact, eyes about as good as ours have developed independently several times, and it’s quite easy to make a model showing that an image-resolving eye can evolve from a simple photosensitive patch along a steeply positive utility gradient. It seems that if a species has the ability to sense any light at all, an avantage in sensing it more precisely, and some energy to spend on evolving, it will probably develop an eye.
In 1976, Ernst Mayr, to his own surprise, found evidence for 40–65 fairly seperate lineages of imaging eyes. More recently, indirect DNA evidence has suggested that cephalopods, arthropods, and vertebrates share an eye ancestor, but of course from long before the present forms of the most acute examples. Ancient eye evolution is tough to trace because eyes don’t fossilize well. [If time: sketch squid and fly eyes.]
But here we only care about our eyes. Light goes in your pupil, through the lens, and projects across the inside surface of your eye on the retina’s photosensitive cells: rods, which work in low light, and three kinds of cones, which work in strong light and give color.
In the center of the retina there’s a patch of about 2e5 cones called the fovea, which gives us 5˚ of high acuity and color sensitivity straight ahead. (A degree is about a finger-width at arm’s length.) In the middle of the fovea is a 0.2 mm dimple with few capillaries or rods; that’s the foveola, which covers 1˚ of field in which we can resolve about an arc minute (1/60˚).
About 15˚ toward the ear from the fovea is a blind spot where the optic nerve connects to the retina. To find it in your right eye:
When they’re about 1.5 thumb-lengths apart, the right one will disappear. Our visual system is really good at covering up holes, so instead of seeing a black spot, it’s a sort of indistinct interpolated area. Most of the time, each eye covers the other’s blind spot, so we can ignore it.
Conversely, to provide photopic vision – color and acuity in strong light – our eyes move whenever we’re alert and not concentrating to bring the fovea across the field. Perceptually, we can see clearly across the whole visual field (≈200˚ wide, 135˚ high), but it’s mostly just the ability to snap the fovea onto anything the relatively fuzzy and color-blind rods pick up. (Watching a good sleight-of-hand magician should help convince you that you can’t see that much of things you aren’t staring at, although of course it’s psychological too.)
But in low light, with skotopic vision, rods take over and so the fovea is almost useless; it becomes like a blind spot. This is why you can often see stars better if you look slightly away from them. (In analog photography terms, the fovea is like a slow, sharp color film; the rest of the field is like fast black & white film.)
In most people, cones come in three kinds, sensitive to relatively short, medium, and long wavelengths and thus called S, M, and L. We can graph their normalized sensitivity, with the rods’, against wavelength like this:
The actual cell count proportion is about 1 S, 16 M, 32 L, 1000 R. The preponderance of rods makes sense because (1) they’re spread all over the field instead of clustered in the fovea and (2) toward the edge they’re grouped several hundred per nerve – but the relative lack of S cells is odd. Somehow, through a mysterious boosting mechanism, the S signal is preceptually about as strong as the M and S signals. But because of this amplification (presumably), we’re much less sensitive to hue change at that end of the spectrum – which comes in handy for compression, as we’ll see.
[If time:
The genes that control the development of the cones are on the X chromosome, but they aren’t particularly reliable. Since males only have one X chromosome, there’s no backup if some of the genes don’t come through, so almost all color-blindness is in males – about 1/9 of the population. X inactivation probably makes some females slight tetrachromats. There’s some evidence that under medium illumination, we get tetrachomacy from the rods, but this doesn’t seem to ahve much perceptual effect. [Real tetrachromacy.] Pinnipeds and cetacians have one cone type (others there but suppressed). Some birds and butterfies have five or more.
Anyhow, most of us, under good lighting, are trichromats: we see with three cones. This means that we can construct a three-dimensional color space in which to place any point we perceive according to its color.
Take this color wheel, which is a 2D polar color space:
Now there’s no way to continuously and uniquely represent all the colors on a plane like this.
[]
[
]