The Eye and the Code
What does the eye tell the brain?
In 1942, in a dark room at Columbia, Hecht, Shlaer and Pirenne found that a flash is seen when only five to fourteen quanta are absorbed, spread over about five hundred rods, so a rod must answer a single quantum. The steepness of a frequency-of-seeing curve gives the same number without knowing the eye's losses, because arrivals are Poisson. Optics and the cone mosaic stop detail near sixty cycles per degree; gain control spans ten log units of light and gives Weber's law. Adrian found that a fibre codes strength as a rate, Kuffler that a ganglion cell weighs a centre against a surround: a difference of Gaussians, a band-pass filter, Mach bands, and a cure for redundancy. Hubel and Wiesel's cells want edges at one orientation, modelled as Gabor fields, simple and complex. The viewer reads a Campbell-Robson chart and sees a hybrid image change with distance; adaptation reveals channels, and divisive normalization saturates and masks. Colour is three numbers: matching is a 3-by-3 solve that reproduces Stiles and Burch's 1955 data, metamers are the null space, and the 1931 diagram is built on it. Opponent channels explain why nothing looks reddish green; colour blindness is a lost dimension. Constancy discounts the light, and the dress shows two bets on one image. D.F. posts a card into a slot whose angle she cannot report.
What you need. Part 11's thresholds and Weber's law, Part 12's forced choice, and Part 6's lateral inhibition. Matrix inversion and null spaces from linear algebra; Fourier frequency in the loose sense.
- Hook
- A dark room at Columbia, 1942: a flash seen when five to fourteen quanta are absorbed
- Ideas, models and mathematics
- counting quanta from a curve's shape, optics, the mosaic and aliasing, gain control and Weber's law, the rate code, centre–surround and the difference of Gaussians, Mach bands, Gabor cells, the CSF and a hybrid image, channels and normalization, cone fundamentals, colour matching as linear algebra against the 1955 data, metamers, opponent colours, colour blindness, constancy and the dress, two streams
- Psyche gains
- a retina, a V1 filter bank and the colour machinery
- On you
- your contrast sensitivity at four stripe widths
What you will be able to do
Psych 101 and the major
- Explain how the frequency-of-seeing curve's steepness reveals the number of quanta needed.
- Describe a centre-surround receptive field and why it acts as a band-pass filter.
- Explain why three numbers describe a colour, and what a metamer is.
Graduate
- Derive the Nyquist limit of a mosaic and the alias of a finer grating.
- Compute colour-matching functions for any three primaries from the cone fundamentals.
- Show how gain control turns a saturating receptor into Weber's law.
Research
- Weigh the evidence for single-photon detection by people against the evidence for rods.
- Assess how far the edge-detector hierarchy explains V1, and the two-streams account.
Practice
- Explain chroma subsampling and gamut limits from the CSF and the chromaticity diagram.
- Choose and check a palette that colour-blind readers can use.
Contents
Each chapter has a home level. Choose a track to see what to read and watch: Psych 101 and the major 43 min · Graduate 48 min · Research 53 min · Practice 45 min.
- 0A dark room, 1942Psych 101 and the major3 min
- 1Counting quantaPsych 101 and the major5 min
- 2Optics and the mosaicPsych 101 and the major2 min
- 3Ten billion to onePsych 101 and the major3 min
- 4The retina sends differencesPsych 101 and the major4 min
- 5Edges in the cortexPsych 101 and the major3 min
- 6On you: your contrast sensitivityPsych 101 and the major3 min
- 7Channels and normalizationGraduate2 min
- 8Three numbers for a spectrumPsych 101 and the major3 min
- 9Colour matching as linear algebraPsych 101 and the major4 min
- 10Opponent colours and colour blindnessPsych 101 and the major3 min
- 11Constancy and the dressPsych 101 and the major3 min
- 12Two streamsResearch2 min
- 13The LedgerPsych 101 and the major4 min
- 14In practice: screens, codecs and palettesPractice2 min
- 15Frontier: what V1 does with the worldResearch3 min
- Recap, problems, and the road aheadAll tracks4 min
Also on this page: Lecture · Key results · Try it · Lab · Problems · Notes and sources · Build the film.
Lecture
The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.
A dark room, 1942Psych 101 and the major3 min
New York, 1942. In a laboratory at Columbia University, an observer sits in total darkness for forty minutes, eyes fixed on a faint point of light. Then, off to one side, a flash: tiny, brief, and blue-green. Did you see it? The observers, most of them the authors themselves, had trained themselves to say yes only when they were sure. Selig Hecht, Simon Shlaer and Maurice Pirenne measured the energy of the flash in the units physics had given light early in the century: quanta, the indivisible packets of light energy. Their question was the oldest one in psychophysics, asked at its limit. How little light can a person see?
Their answer. At the threshold, between fifty-four and a hundred and forty-eight quanta reached the front of the eye. But most never get to work. Four percent bounce off the cornea. About half are absorbed on the way through the eye. And of what reaches the retina, at most one in five is caught by the pigment in the rods. So the eye was seeing a flash when somewhere between five and fourteen quanta were absorbed. And they were spread over about five hundred rods, so it was rare for any one rod to catch two. A rod, then, must respond to a single quantum: the smallest amount of light there is. The eye is about as sensitive as physics allows.
And yet what the eye sends the brain is not a picture of the light. On the left, a texture with the statistics of natural images. On the right, the same light as the retina's output cells report it: the broad, slowly changing parts thrown away, the edges and changes kept. The eye sends differences: across space, across time, and across wavelength. And every step can be written down as a filter you could program.
This is Part 13 of Psychology, Built: the eye and the code. We'll count quanta, and see how the slope of a curve reveals a number nobody can observe directly. We'll follow light through the eye's optics, its mosaic of receptors, and a range of brightness of about ten billion to one. We'll write the retina and the first stage of the cortex as filters. You'll find your own contrast sensitivity, and see what it hides from you. Colour will turn out to be linear algebra: three numbers, lights that differ yet look identical, and colour blindness as a lost dimension. Then the dress that split the internet, the two streams of vision, and the screens in your pocket, which are built on all of it.
What it does: The experiment; from the cornea to the rods; the eye sends differences; objectives
1Counting quantaPsych 101 and the major5 min
Here is the idea that made it possible to count. Light doesn't flow; it arrives in packets, and the packets arrive at random. Fire the same flash again and again, and the number of quanta absorbed is different each time. It follows a Poisson distribution: with an average of six, one flash may deliver two, and another ten. Now suppose the eye sees a flash whenever at least some number, k, of quanta are absorbed. Say six. Then this flash is seen a little more than half the time. So even an observer with no noise of its own, with a fixed and perfect threshold, would see some flashes and miss others. The randomness is in the light.
Now plot the chance of seeing against the brightness of the flash, on a log scale. If one quantum is enough, the curve rises gently. If six are needed, it rises steeply; if nine, more steeply still. A threshold of many quanta is sharper, because a sum of many random arrivals is relatively less variable. Here is the clever part. Hecht and his colleagues didn't know exactly how much light the eye wastes before the rods. But a fixed loss multiplies every intensity by the same factor, and on a log axis that only slides the curve sideways. Sliding doesn't change the steepness. So the shape of the observer's own curve tells you k, without knowing the loss at all. The arithmetic is in the problems: the steepness depends on k alone.
Psyche can sit in the same dark room. Give it a threshold of six quanta, and let it absorb nine percent of the light that reaches its eye. Seven intensities, fifty flashes each, and here's the share it saw. Fit the Poisson curve to those points, letting both k and the loss be free, and out comes k equals six, and nine percent absorbed. Repeat the whole experiment a hundred and one times, and the fitted k is within one of the truth four times in five. Fifty flashes a point is enough to count to six, roughly. In 1942 the observers' curves gave between five and eight, and the physics of the losses gave between five and fourteen. Two independent routes to the same small number.
The 1942 argument said a single rod must respond to a single quantum. Thirty-seven years later, that could be checked directly. In 1979 Denis Baylor, Trevor Lamb and King-Wai Yau drew a single rod from a toad's retina into a fine glass tube and measured its current. One absorbed quantum gave a pulse of about one picoamp, five percent of the current the rod carries in the dark. About half the quanta the rod absorbed produced one. Can a person report a single photon? In 2016 a group in Vienna used a quantum light source that emits photons one at a time, and asked which of two intervals had held one. Over thirty thousand trials, the answer on single-photon trials was right fifty-one point six percent of the time, against fifty for guessing. The p value was point oh five five: at the edge. When the observers said they were sure, about sixty percent. It is a remarkable result, and it has not yet been repeated. The Ledger will say so.
The same arithmetic explains the eye's limits against a background. A dim background also arrives in quanta, and their count fluctuates: if N arrive on average, the count varies by about the square root of N. To be seen, an extra flash has to stand out from that noise, so the smallest visible increment grows as the square root of the background. Hessel de Vries in 1943 and Albert Rose in 1948 saw that this is what an ideal detector of quanta would do. Part 11 ran it on Psyche. In brighter light the eye does something else: it turns its own gain down, and Weber's law takes over. That is chapter three.
What it does: Poisson arrivals; the curve's steepness gives k; Psyche in the dark room; one rod, one quantum, one photon; photon noise and the square-root law
2Optics and the mosaicPsych 101 and the major2 min
Before light reaches a single receptor, it passes through the eye's optics, and they set the first limit. Image a grating of fine bars through a lens and some of its contrast is lost; the finer the bars, the more is lost. This curve, the modulation transfer function, says how much survives at each spatial frequency, counted in cycles of the grating per degree of visual angle. Even perfect optics can't beat diffraction: through a pupil three millimetres across, nothing finer than about ninety-four cycles per degree gets through. A wider pupil would pass finer detail in principle, but a real eye's flaws, its aberrations, grow as the pupil opens. Add a blur standing in for those flaws, and by sixty cycles per degree almost nothing is left.
Behind the optics, the image falls on a mosaic. At the centre of gaze the cones are packed about half a minute of arc apart. A mosaic can only carry a grating if it has at least two receptors per cycle, one for each bar, so the finest grating it can represent is about sixty cycles per degree. Present a finer one, eighty cycles per degree, to receptors sampling a hundred and twenty times per degree. The samples are exactly what a coarser grating, at forty, would give. The fine pattern masquerades as a coarse one. It's called aliasing, and it's why a striped shirt shimmers on television. But the eye's optics have already blurred away almost everything above sixty cycles per degree, so very little can alias. The lens and the mosaic are roughly matched, as in a well-designed camera. For scale: twenty twenty vision means resolving detail one minute of arc across, about thirty cycles per degree. The best young eyes come close to sixty.
What it does: The MTF and the diffraction limit; the cone mosaic, Nyquist and aliasing; 20/20
3Ten billion to onePsych 101 and the major3 min
The light you see by ranges from a moonless night to the noon sun. That's about ten log units: the brightest light is about ten billion times the dimmest. But a single neuron can only signal over a range of one or two log units before it's silent or saturated. Part of the answer is two kinds of receptor: rods for the dark, cones for the day. The pupil helps a little: it changes the light reaching the retina only about sixteen-fold. Most of the work is done by gain control. The receptors, and the cells after them, keep turning their own sensitivity up and down to match the light they're in.
Here's how it works in Psyche. A receptor's response to light follows a saturating curve: nothing far below a half-way point, sigma; full far above it; and a useful range of about two log units in between. It's called the Naka-Rushton function, and it fits responses all the way from photoreceptors to cortex. Adaptation moves sigma to wherever the light is. In starlight the curve sits far to the left; at noon, far to the right. One short curve, slid along ten log units. The price is that the eye stops reporting how much light there is, and reports how much there is compared with the surroundings. Which is why a page looks white indoors and out, though outdoors it may reflect a hundred times more light.
This has a consequence you've already met. Ask Psyche for the smallest flash it can see against each background. With a fixed curve, the receptor soon saturates, and beyond that no increment, however large, makes a difference. The red curve shoots off the chart. With a curve that follows the background, the smallest visible increment is always the same fraction of the background: about four percent, across ten log units. That's Weber's law, the constant fraction of Part 11. Fechner took it as a law of the mind. Here it falls out of a mechanism for keeping a neuron in its working range. At the very dim end, the quanta's own randomness takes over, and with it the square-root law from chapter one.
What it does: The range of light; a response curve that slides; gain control gives Weber's law
4The retina sends differencesPsych 101 and the major4 min
First, what is there to send? In 1926 Edgar Adrian and Yngve Zotterman cut a frog's muscle down until a single stretch receptor was left in it, hung weights from it, and recorded its nerve fibre. Every impulse was the same size. A heavier weight made them more frequent, not bigger. Strength is coded as a rate. And while the weight stayed on, the rate fell away. The fibre reported change more faithfully than it reported a steady state. Six years later, Haldan Keffer Hartline found the same rate code in a single fibre from the eye of a horseshoe crab. Part 5 told this as history; today it enters the Ledger.
In 1953 Stephen Kuffler recorded from single ganglion cells, the retina's output neurons, whose fibres form the optic nerve, in the eyes of cats. Each cell watches a small patch of the visual field, its receptive field, and the patch has two parts. A spot of light in the centre made an on-centre cell fire faster. The same spot in a ring around the centre made it fall silent. Light the whole field evenly, and centre and surround cancel: the cell hardly changes. Off-centre cells are the mirror image. Between them they report where a patch is brighter, or darker, than its surroundings.
There's a neat mathematical description, due to Robert Rodieck in 1965. Model the centre as a narrow bell curve of positive weight, the surround as a wider, shallower bell of negative weight, and the cell's receptive field as their difference: a Mexican hat. The cell's response is the light weighted by this profile and summed. Now ask how such a filter treats gratings of different fineness. A centre alone passes coarse patterns and blurs fine ones. Subtract the surround, and coarse patterns, broad even light, cancel too. What passes is a band of middle frequencies. The retina is a band-pass filter.
You can see this filter at work. Here is a dark plateau, a ramp, and a light plateau. Most people see a narrow stripe at the foot of the ramp that's darker than the plateau, and one at the top that's brighter. Ernst Mach described them in 1865. They are not in the light: the light, in grey, has no dips or peaks. Pass it through the difference of Gaussians, and the output overshoots at exactly those two corners. The bands you see are the code showing through. Part 6 drew them with lateral inhibition; this is the same idea written as a filter.
Why would an eye do this? Because natural images are redundant. In this texture, built with the statistics of natural scenes, points two pixels apart are correlated at about point six. Knowing one, you can largely guess the other. Sending every point's brightness would spend the optic nerve's million or so fibres largely on things that could be predicted. Subtract the neighbourhood, and what's left is the surprise: edges, textures, change. After the filter, the correlation falls to about point one. It's the principle behind most of the compression of images and sound you use every day. Part 58 returns to it under its proper name, efficient coding.
What it does: Adrian's rate code; Kuffler's centre and surround; the difference of Gaussians; Mach bands; why send differences
5Edges in the cortexPsych 101 and the major3 min
In 1958, at Johns Hopkins, David Hubel and Torsten Wiesel were recording from single cells in the visual cortex of a cat, and getting nowhere with spots of light. The story, as they told it later, is that the cell burst into life as they slid a glass slide into the projector: not the spot on the slide, but the faint straight edge of the glass, sweeping across the screen. The cell wanted a line, at one particular orientation, in one particular place. Here's a simulated cell like theirs: sweep a bar across its field at each angle, and count spikes. Turn the bar away from the preferred angle, and the firing falls off. Neighbouring cells prefer neighbouring angles, so that at every point of the visual field, every orientation is covered. The work won them a share of the Nobel Prize in 1981.
Like the retina's Mexican hat, these fields can be written down. The usual model is a Gabor function, named for the physicist Dennis Gabor: a striped grating seen through a Gaussian window. Light stripes where light excites the cell, dark where it inhibits. The even version has a bright bar down its middle; the odd one has an edge. Show it gratings at every orientation, and its response falls to half about twenty degrees either side of the preferred angle, which is about what's recorded in real cells.
In 1962 Hubel and Wiesel sorted these cells into two kinds. Simple cells care exactly where the bars fall. Slide the same grating sideways and the response swings from full to nothing, as a single Gabor followed by a threshold would. Complex cells respond to the right orientation anywhere in their field. A model that does this is called the energy model: take an even and an odd filter, square each response and add them. Because cosine squared plus sine squared is one, the position of the bars drops out, and only orientation and contrast remain. It's a small first step toward recognizing a shape wherever it appears, which is the problem of Part 14.
Put the pieces together and you get a hierarchy, the first in the study of the brain. Hubel and Wiesel proposed that a simple cell's elongated field is built from a row of centre-surround fields, lined up along a line. It took until 1995 to check it directly. Clay Reid and Jose-Manuel Alonso recorded from pairs of cells, one in the thalamus and one in the cortex, and found connections where the thalamic cell's centre overlapped a matching part of the simple cell's field. As a first approximation, the hierarchy holds. It's also, near enough, the first two layers of every convolutional neural network, as the series AI, Built shows.
What it does: Hubel and Wiesel's bar; the Gabor field and its tuning; simple and complex cells; a first hierarchy
6On you: your contrast sensitivityPsych 101 and the major3 min
Time for an experiment on you. This is a Campbell-Robson chart. From left to right the bars get finer; from bottom to top their contrast falls, from black and white to almost uniform grey. Every column has the same range of contrast. Follow with your eye the line where the bars fade into the grey. It isn't flat. It rises to a hump somewhere in the middle and falls away on both sides: you need more contrast to see very coarse bars, and much more to see very fine ones. That boundary is your own contrast sensitivity function, drawn by your visual system on a picture that doesn't contain it. Its exact place depends on your screen and how far away you sit, so pause and try it nearer and farther if you like.
Measure that boundary properly, with gratings one at a time and a staircase from Part 11, and you get a curve. Sensitivity is one over the faintest contrast at which a grating can be seen. Fergus Campbell and John Robson measured it in 1968. It peaks at a few cycles per degree, where a good observer needs well under one percent of contrast. It falls at fine frequencies because of the optics and the mosaic, and at coarse ones because of the surround that cancels broad, even light. The retina's band-pass filter, seen from outside. Four numbers describe the curve: its peak sensitivity, the frequency of the peak, its width, and a floor at low frequencies. Here they're fitted to eight simulated thresholds. Lesmes and colleagues showed in 2010 that a computer choosing each trial well can estimate all four in about fifty trials, which is how it's now measured in eye clinics. Where the curve meets full contrast is the finest grating you can see at all: here, about fifty-six cycles per degree.
The curve also tells you what you can't see. This image is a hybrid: a heavily blurred letter A, added to only the fine edges of a letter E. Filter it through the contrast sensitivity function as it would fall on your retina up close, two degrees across, and the E's edges land near the peak of the curve. You read E. Now shrink it to a quarter of a degree, as if seen from across a room. The same edges are now finer than your acuity, the filter removes them, and only the A remains. Step back from your screen, and you can watch the E turn into an A. Nothing in the image changed. What changed is which part of it fell where you're sensitive.
What it does: The Campbell-Robson chart; the CSF and its four numbers; a hybrid image
7Channels and normalizationGraduate2 min
Is the contrast sensitivity function one filter, or many? The hypothesis in the late nineteen-sixties was that it's the upper edge, the envelope, of many narrower filters, called channels, each tuned to a band of frequencies about an octave wide. That's what you'd expect if it were built from cells like Hubel and Wiesel's, each preferring one size of pattern as well as one orientation. But how would you test it, from the outside, with nothing but a person and some gratings?
Colin Blakemore and Fergus Campbell found a way in 1969. Look for a minute or so at a high-contrast grating of one fineness, and the neurons that respond to it tire. Then measure the curve again. Thresholds near the adapting frequency rose as much as fivefold, but gratings much coarser or finer were barely affected. The curve gets a notch. A single filter would have dimmed everywhere at once. A notch means there are separate channels, and you tired one. The same works for orientation: tire the vertical channels, and horizontal gratings are spared. The channels are, very probably, populations of cells like the ones in chapter five.
One more operation, and it may be the most general. In 1992 David Heeger proposed that each cortical cell's drive is divided by the summed activity of its neighbours. It explains why responses saturate at high contrast: as the cell's own drive grows, so does the pool it's divided by. It's the gain control of chapter three, again. It explains something stranger: a grating the cell ignores entirely, laid across its preferred one, still suppresses its response, because it feeds the pool. And it means that doubling every input leaves the pattern of responses nearly unchanged: what's kept is the pattern, not the overall strength. The same division turns up in smell, in attention, in how the brain codes value. Matteo Carandini and Heeger called it a canonical neural computation. Part 58 asks why a brain would compute this way.
What it does: A bank of channels; Blakemore and Campbell's adaptation; divisive normalization
8Three numbers for a spectrumPsych 101 and the major3 min
Colour has a long history, and its central idea came from pure reasoning. Isaac Newton showed in 1672 that white light is a mixture, which a prism spreads into a spectrum. Later he insisted that the rays themselves are not coloured: colour is something the seeing does. In 1802 Thomas Young argued that the eye can't possibly have a separate receptor for every wavelength at every point of the retina. Perhaps, he guessed, it has three. In the eighteen-fifties James Clerk Maxwell and Hermann von Helmholtz turned the guess into an experiment: any colour can be matched by a mix of three lights. The receptors themselves weren't measured until the nineteen-sixties, and the three cone pigments of human retinas, one cell at a time, in 1983.
Here are the three cone types, as measured by Andrew Stockman and Lindsay Sharpe in 2000, from people's colour matches and from the eyes of people missing one type. The long-wavelength cones peak near five hundred and seventy nanometres, the middle ones near five forty-five, and the short ones near four forty-five. The names are about wavelength, not colour: the long cones peak in what looks yellow-green, and the long and middle curves overlap heavily. The rods, dashed, have a single pigment, peaking near five hundred and five. With only one kind of rod, night vision has no colour at all.
A single cone cannot see colour. Its pigment either catches a quantum or doesn't, and once it's caught, every quantum has the same effect. The cone's output says how many quanta it caught, and nothing about their wavelength. So a light at five forty, where the long cone is sensitive, and a light at six twenty, where it's less sensitive but made brighter by the right amount, give it exactly the same response. This is called the principle of univariance. Colour exists only in the comparison between cone types.
So here's what colour is, to an eye. The light from a leaf in daylight is a spectrum: the power at every wavelength. Sampled every five nanometres across the visible range, that's seventy-nine numbers. The eye keeps three. Each cone type weights the spectrum by its sensitivity and adds it up, which is a three-by-seventy-nine matrix times a vector. In the language of linear algebra, it's a projection from a space of seventy-nine dimensions down to three. Almost all the information in the light is thrown away. And different lights can land on exactly the same three numbers. That's the next chapter.
What it does: Newton to Young; the cone fundamentals; univariance; a spectrum projected to three numbers
9Colour matching as linear algebraPsych 101 and the major4 min
The matching experiment is simple. An observer looks at a disc split in two. One half shows a test light. The other shows a mixture of three fixed lights, primaries, here a red, a green and a blue at the wavelengths Stiles and Burch used. The observer turns three knobs until the halves look identical. In the cones' terms, the match happens when the mixture gives the same three numbers as the test. That's a system of three linear equations in three unknowns: the primaries' cone excitations times the amounts equals the test's. Invert the matrix, and you have the amounts. A yellow at five eighty: mostly red, some green, no blue. A blue-green at five hundred needs a negative amount of red. No mixture of the three matches it. What the observer can do is add red to the test side instead, and match that. Negative weights are real, and every set of three primaries needs them somewhere.
Do this at every wavelength, and you get three curves, called colour-matching functions: how much of each primary it takes to match each pure wavelength. The lines are computed from the cone curves of the last chapter, with one three-by-three inverse. The dots are real matches: ten observers in W. S. Stiles and J. M. Burch's laboratory in 1955, with exactly these primaries. Notice the red curve dipping below zero between the blue and green primaries. The agreement is a correlation of point nine nine nine or better for every curve. It's a consistency check, not an independent test, because today's cone curves were themselves partly derived from matches like these. But it shows the whole of colour matching follows from three curves and one matrix inverse.
Now the linear algebra pays off. Take a spectrum, A. Add to it a wiggle chosen so that every cone type sums it to exactly zero: in the jargon, a vector in the null space of the cone matrix. The result, B, is a genuinely different light. But all three cone excitations are identical, so the two look identical. They're called metamers. The cone matrix has seventy-nine columns and only three rows, so its null space has seventy-six dimensions. Every colour you see stands for an enormous family of physically different lights. Metamers only match under the light they were matched in. Multiply both by the spectrum of a warm incandescent lamp, and the match breaks. This is why a jacket and trousers can match in the shop and differ in the street.
In 1931 the International Commission on Illumination turned this into a standard. From matches made by William Wright and John Guild, seventeen observers in all, it fixed a standard observer: three colour-matching functions that every display, camera, printer and paint chart is still built on. Divide out overall brightness, and every colour becomes a point on a page. The pure wavelengths trace this horseshoe. Because matching is linear, a mixture of two lights lies on the straight line between them, and a mixture of three lies inside their triangle. A screen has three primaries, so it can only show the colours inside its triangle. Everything outside, including the vivid blue-greens of pure spectral light, it simply cannot show. Three primaries suffice to match any colour, but only if some amounts are allowed to be negative, which a screen cannot do.
What it does: The matching experiment and negative weights; derived functions against Stiles and Burch; metamers; the 1931 diagram
10Opponent colours and colour blindnessPsych 101 and the major3 min
Three cones explain matching. They don't explain what colours look like. In 1878 Ewald Hering pointed out that some hues mix in experience and some never do. Orange looks reddish yellow; teal looks bluish green. But nothing looks reddish green, or bluish yellow. So, he proposed, colour is coded in opposed pairs: red against green, blue against yellow, and light against dark. A signal can be red or green, but not both. For eighty years Hering's pairs and Young's three receptors looked like rival theories. Both were right, at different stages of the same machine.
Here's how three cones become three opposed signals. Add the long and middle cones and you get brightness. Subtract them, and you get a signal that's positive for long wavelengths and negative for middle ones: red against green. Subtract the sum of long and middle from the short cones, and you get blue against yellow. A difference can be positive or negative, but never both at once. That's why there's no reddish green. Where the red-green channel crosses zero, a light is neither red nor green. With these weights that's near five eighty nanometres, close to the yellow that observers call pure, with no red or green in it. In 1957 Leo Hurvich and Dorothea Jameson measured such channels by cancellation: add green to a light until no red is left, and the amount needed is the strength of the red. And cells that add some cones and subtract others have been recorded from the retina onward.
The same algebra explains colour blindness. About eight percent of men and half a percent of women of northern European ancestry have missing or altered long or middle cones. The genes for those two pigments sit on the X chromosome, which is why men, with one X, are affected so much more often. John Dalton, the chemist, described his own case in 1794. With only two cone types, the red-green dimension collapses. Every colour lands on a plane, and colours that differed only along the lost direction become identical. Here are two palettes, as seen with all three cones and simulated without one. In the familiar rainbow palette, the red and the brown become almost indistinguishable without long cones. Masataka Okabe and Kei Ito's palette was designed to stay distinct either way. The numbers measure the smallest difference between any two swatches.
What it does: Hering's puzzle; opponent channels; dichromacy as a lost dimension
11Constancy and the dressPsych 101 and the major3 min
There's a third problem colour has to solve. The light coming from a surface is its reflectance multiplied by the light falling on it. So a white page under a warm lamp sends your eye yellowish light, and under a blue sky, bluish light. Yet it looks white in both. That's colour constancy. To see the surface, the visual system has to estimate the light, and discount it. The simplest way, proposed by Johannes von Kries in 1905, is to divide each cone type's signal by its response to the light itself. Adaptation, from chapter three, does something like this automatically.
In February 2015 a photograph of a striped dress went around the world, because people couldn't agree on its colours. Some saw blue and black. Others, just as sure, saw white and gold. Here is a swatch with colours like the photograph's: a pale, washed-out blue, and a dark golden brown. Not the photograph itself, but the same problem. Suppose your visual system assumes the dress is lit by warm, yellowish light. Discount that, and the pale stripes become distinctly blue, and the dark ones nearly black. Suppose instead it assumes the dress is in cool, bluish light, in shade under a blue sky. Discount that, and the pale stripes become white, and the dark ones gold. The image is genuinely ambiguous about the light, and the two answers both make sense.
Who saw what? Rosa Lafer-Sousa, Katherine Hermann and Bevil Conway surveyed about fourteen hundred people online. Fifty-seven percent saw blue and black, thirty percent white and gold, and eleven percent blue and brown. Their account is that the white and gold group were discounting a bluish light, and they were more often older, and more often women. In 2017 Pascal Wallisch ran two much larger surveys and asked people how they thought the dress was lit. Those who assumed it was in shadow saw white and gold more often. Why people differ in their assumptions about light, whether age, or how much time they spend in daylight, is less settled, and the effects found are modest. But the lesson is the one Part 14 is built on. Seeing a colour is a bet about the world, and different brains can place different bets on the same picture.
What it does: Discounting the light; one swatch, two illuminants; who saw what
12Two streamsResearch2 min
Everything so far happens in the first few stages of vision. From the primary visual cortex, V1, signals travel along two broad routes. In 1982 Leslie Ungerleider and Mortimer Mishkin, working from lesions in monkeys, proposed that a lower route, through the temporal lobe, works out what an object is, and an upper route, through the parietal lobe, works out where it is. Ten years later Melvyn Goodale and David Milner proposed a twist. The upper stream isn't so much about where things are as about how to act on them: vision for reaching and grasping. Their evidence was largely one woman.
She's known in the literature as D.F. In 1988 carbon monoxide poisoning damaged the lower, ventral stream of her brain. She could still see colours and textures, but could no longer tell shapes apart, or say which way a line was tilted. In a now famous test, she was shown a slot in a disc, at different angles, and asked to turn a card in her hand to match it. Her settings were close to random: each line here is one trial's error. Then she was asked to post the card through the slot, as you'd post a letter. Her hand turned the card to the right angle as it moved. Vision guided her action, though it gave her no knowledge of the angle. Today the streams are thought to be less separate than the first accounts suggested, and to talk to each other constantly. But seeing without knowing is real, and it comes back in Part 27, with blindsight.
What it does: What and where, or how; D.F. and the slot
13The LedgerPsych 101 and the major4 min
Five rows today. The first: a fully dark-adapted eye sees a flash when only a handful of quanta, roughly five to fourteen, are absorbed, spread so thinly that a rod must respond to a single quantum. The original: Hecht, Shlaer and Pirenne, 1942. The record: Baylor, Lamb and Yau's single rods in 1979, and in 2016 the single-photon experiment, with its fifty-one point six percent. The note matters. That a few quanta suffice, and that a rod answers one, is settled and has been repeated many times. That a person can report a single photon rests on one study, whose overall result sat at the edge of significance, and nobody has yet repeated it directly. For the claim as stated: replicated.
The second, carried over from Part 5. The claim: a single sensory fibre signals the strength of a stimulus by how often it fires, not by the size of its impulses, and its rate falls during a steady stimulus. The original: Adrian and Zotterman, 1926. The record: Hartline and Graham found the same in a single fibre from the horseshoe crab's eye in 1932, and it's been found in every sense since. With a qualification: rate isn't the only code. The timing of the first spike, and the pattern across many fibres, carry information too. Replicated.
The third. The claim: neurons in primary visual cortex respond best to an edge or a bar at one orientation, and simple cells' fields are built from aligned centre-surround inputs. The original: Hubel and Wiesel, 1959. The record: the same cells in monkeys, in 1968, and Reid and Alonso's paired recordings in 1995, built on Kuffler's centre and surround. Orientation tuning has been confirmed in every mammal with a visual cortex that's been studied. The hierarchy holds as a first approximation, and the frontier will say how much it leaves out. Replicated.
The fourth. The claim: sensitivity to contrast is band-pass, peaking at a few cycles per degree, and adapting to one grating lowers sensitivity mainly near its own frequency and orientation. The original: Campbell and Robson, 1968. The record: Blakemore and Campbell's adaptation in 1969, and the quick estimates of Lesmes and colleagues in 2010, which recover the same shape in about fifty trials. It's one of the best-replicated curves in vision, and it's used in clinics. Whether the channels are truly separate mechanisms or a convenient description is still discussed. Replicated.
The fifth. The claim: people who see the dress as white and gold, rather than blue and black, are assuming it's lit by bluish light, and discounting it. The original: Lafer-Sousa, Hermann and Conway, 2015. The record: Wallisch's two large surveys, and Witzel, Racey and O'Regan, both in 2017. Three groups, with different methods, tie the split to assumptions about the light. Why people differ in those assumptions is less settled. Replicated. That makes rows. Five today, all replicated, with one honest asterisk: the single photon. Vision science has more replicated findings than most of psychology, partly because it can measure in physics' units.
What it does: Few quanta; the rate code; orientation cells; the CSF and channels; the dress
14In practice: screens, codecs and palettesPractice2 min
Almost every piece of imaging technology you own is built on this part. A screen never reproduces the light of a scene. It mixes three primaries into a metamer, a different light that gives your cones the same three numbers. A camera puts three coloured filters over its sensor, playing the part of the cones. The colour standard the web assumes, sRGB, is a triangle on the 1931 diagram and a curve for brightness. And image and video compression spends its bits where your contrast sensitivity is high, and saves them where it's low. Even brightness controls, fonts and warning lights are designed with thresholds and Weber fractions in mind.
Here's one trick in detail. Your colour channels, the opponent ones of chapter ten, have much lower acuity than your brightness channel. So nearly every image and video format splits a picture into brightness and two colour-difference signals, and stores the colour at half the resolution in each direction. On the left, a picture. In the middle, its colour stored at a quarter of the resolution: look closely, and it's hard to tell. On the right, its brightness at a quarter of the resolution instead: the thin lines and edges are smeared at once. Storing colour coarsely halves the data, for a loss most people never notice.
And there's a rule for anyone who makes figures, maps or dashboards. Roughly one man in twelve can't separate colours that differ only along the red-green axis. So never put a meaning in red against green alone: stop and go, good and bad, up and down. Vary lightness as well as hue, add shapes or labels, and use palettes that have been checked against the projections of chapter ten, like Okabe and Ito's, shown here as seen normally and without middle cones. The same projection used in this film is built into common design tools, so you can preview a figure as a colour-blind reader will see it.
What it does: Engineering on the standard observer; chroma subsampling; designing for colour-blind readers
15Frontier: what V1 does with the worldResearch3 min
Here's where things stand. Solid: the eye's limits, stated in the units of physics: quanta, diffraction, sampling. Colour matching and metamers, as exact linear algebra. Centre-surround cells, orientation-tuned cells, and the contrast sensitivity function with its channels. Argued: what the first stage of cortex does with real scenes, rather than gratings and bars; what the many kinds of retinal output cell are each for; and how separate the two streams really are. For Kant's first objection, that mathematics can't apply to the inner sense, this part is about as strong a reply as the series will offer: a threshold counted in quanta, and colour experience predicted by a matrix.
Start with the cortex. In 2005 Bruno Olshausen and David Field asked how close we are to understanding V1, and their answer was uncomfortable. The cells that get recorded are a biased sample: the ones that respond well to bars and gratings, the stimuli experimenters use. And even for those cells, models built from gratings predict only part of their response to natural scenes. Their estimate was that much of what V1 does is still unexplained. The picture on the screen is a picture of that argument, not a measurement. Today, the best predictors of how V1 cells respond to images are deep neural networks trained on photographs. They're accurate, and very hard to read: a prediction is not yet an explanation.
Two more open questions. The retina doesn't have two kinds of output cell, on and off. Primates have about twenty, mice more than forty, each tiling the retina, each sending its own version of the image. We know a handful in detail. What the rest are for is an active field. And colour may have a fourth dimension in a few people. Some women carry genes for two slightly different long-wave pigments, so their retinas could hold four cone types. In 2010 Gabriele Jordan and her colleagues tested twenty-four such carriers. One of them made colour discriminations on every test that only a four-dimensional colour space allows. One person. A possibility, carefully tested, not yet a general finding.
Four questions to carry out of this part. What does V1 compute on the scenes it evolved for? Why twenty kinds of retinal output, and what does each one tell the brain? How far does normalization go, as a single computation the brain uses everywhere? And the starred problem: design a test that would reveal a fourth dimension of colour, and explain why ordinary three-primary matching would miss it.
What it does: What is solid and argued; how close we are to V1; twenty output types and a fourth cone; open questions
Recap, problems, and the road aheadAll tracks4 min
Part thirteen in ten lines. In a dark room in 1942, a flash was seen when five to fourteen quanta were absorbed. The steepness of a Poisson curve counted quanta nobody could see, and a single rod turned out to answer a single quantum. The optics and the cone mosaic stop detail finer than about sixty cycles per degree. Gain control spans ten log units of light, and gives Weber's law on the way. The retina sends differences, a centre minus a surround, a band-pass filter. The cortex looks for edges, with Gabor-shaped fields, simple and complex cells, and normalization. Your own contrast sensitivity peaks at a few cycles per degree, and hides what falls outside it. Colour is three numbers: matching is a three-by-three solve, and metamers are the null space. Opponent channels explain how hues look, and colour blindness is a lost dimension. And constancy discounts the light, which is the bet the dress revealed.
Kant's wager. Today was the first objection's day again: that mathematics can't apply to the inner sense. The threshold of seeing turned out to be a number of quanta, and the matching of colours a matrix inverse that predicts what ten observers in 1955 would do. Kant's deeper worry remains. A colour match says two lights look the same; it doesn't measure how red the red looks. Whether a sensation itself has a size is still argued, and Part 27 takes it up.
Where this comes back. Seeing as inference, of which the dress was a preview, is Part 14. The other senses, each with a code of its own, are Part 15. Attention, which turns out to work partly by changing gain and normalization, is Part 18. Seeing without knowing, with D.F. and blindsight, is Part 27. Displays, warnings and colour in design are Parts 51 and 52. And efficient coding, the theory of why an eye would send differences at all, is Part 58.
Seven problems, with full solutions in this part's README. One proves that the curve's shape gives k. One redoes Hecht's arithmetic, and asks how often a rod would catch two. One finds the mosaic's limit and an alias. One derives the difference of Gaussians' peak. One builds metamers from a projection matrix. One uses Psyche's vision module to compute matching functions for a modern display's primaries. And the last, with the star, is the frontier's problem. Pause here if you'd like to try them.
The books and papers behind this part are listed here and in the README. Wandell's Foundations of Vision is the place to start for the mathematics.
So the eye counts quanta, and sends the brain differences, filtered and compressed. But an image on the retina is flat, and ambiguous: infinitely many worlds could have produced it. Next time, two squares that send your eye exactly the same light, and look completely different. That isn't a failure of seeing. It's how seeing works: a bet about the world, and a surprisingly good one. It's Part 14: seeing as inference.
Where it goes next. Seeing as inference is Part 14, the other senses Part 15, attention as gain Part 18, seeing without knowing Part 27, displays and design Parts 51 and 52, and efficient coding Part 58.
Key results
The part's results in one place, for revision.
Try it
Lab 13 · The eye and the code: quanta, filters and colour
Simulate Hecht, Shlaer and Pirenne's experiment and recover the number of quanta from the curve's shape; find the diffraction and mosaic limits; turn a saturating receptor into Weber's law with gain control; build the retina's difference of Gaussians and see Mach bands appear; tune a Gabor cell; fit a contrast sensitivity function; and derive colour-matching functions from the cone curves, check them against real 1955 matches, and build a metamer.
python -m videos.psychology.labs 13
needs numpy, scipy, matplotlib · download lab13.py ·
source on GitHubPsyche (k = 6, 9% absorbed), 7 intensities x 50 flashes: fitted k and absorption 5, 7.2%
steepness per tenfold step at the midpoint for k = 1, 6, 9 0.80, 2.20, 2.71
diffraction cutoff for 2, 3 and 6 mm pupils (c/deg) 63, 94, 189
Nyquist limit of cones 0.5 arcmin apart; 80 c/deg sampled at 120/deg appears at 60; 40 c/deg
increment threshold over background with gain control, 10^0 to 10^8 0.046, 0.041, 0.041, 0.041, 0.041
Mach bands: the filter's output at the dark corner and on the dark plateau 0.008 < 0.020
a Gabor complex cell's half-width at half height 22 deg
a CSF fitted to 8 noisy thresholds: peak, width (octaves); the acuity of the true curve 4.3 c/deg, 2.5; 56 c/deg
derived colour-matching functions against Stiles and Burch (1955): r 0.9999, 0.9995, 0.9994
a metamer: cone excitations of A and B [16.522 13.663 4.927] = [16.522 13.663 4.927]
The curve's shape counts quanta without knowing the losses, because a loss only slides it along a log axis. Diffraction and the mosaic both stop near 60 to 90 cycles per degree. Gain control keeps the Weber fraction fixed over eight log units. Three cone curves and one 3-by-3 inverse reproduce ten observers' 1955 colour matches, and any spectrum plus a null-space wiggle is a metamer.
The code (94 lines; it asserts its own result)
"""Lab 13: counting quanta from a frequency-of-seeing curve, the eye's optics and the mosaic's limit, gain control
and Weber's law, the difference of Gaussians and Mach bands, Gabor cells, the CSF, and colour matching as linear
algebra checked against Stiles and Burch's 1955 data, with metamers built from the null space."""
import numpy as np
from videos.coursekit import labs
from explainer.psychology.psyche import vision as V
TITLE = "The eye and the code: quanta, filters and colour"
GOAL = ("Simulate Hecht, Shlaer and Pirenne's experiment and recover the number of quanta from the curve's shape; "
"find the diffraction and mosaic limits; turn a saturating receptor into Weber's law with gain control; build "
"the retina's difference of Gaussians and see Mach bands appear; tune a Gabor cell; fit a contrast "
"sensitivity function; and derive colour-matching functions from the cone curves, check them against real "
"1955 matches, and build a metamer.")
TASKS = [
"Repeat the frequency-of-seeing experiment with 20, 50 and 200 flashes per intensity, 200 times each. How often "
"is the fitted k within one of the truth? How many flashes did Hecht's argument need?",
"Compute colour-matching functions for a display with primaries at 630, 532 and 467 nm. Where is each negative, "
"and what does that say about the colours the display cannot show?",
"Build a metamer of a daylight-lit leaf, then light both with a 2856 K lamp. Which cone class differs most, and "
"by how much? Find the null-space direction that makes the difference largest.",
]
def run(seed=0):
out = labs.Lab()
rng = lambda k: np.random.default_rng(seed + k) # noqa: E731
# 1. counting quanta
q = np.geomspace(25, 250, 7)
y = V.simulate_fos(6, 0.09, q, 50, rng=rng(1))
f = V.fit_fos(q, y, 50)
out.row("Psyche (k = 6, 9% absorbed), 7 intensities x 50 flashes: fitted k and absorption", f"{f['k']}, {100 * f['efficiency']:.1f}%")
out.row("steepness per tenfold step at the midpoint for k = 1, 6, 9", ", ".join(f"{V.fos_slope(k):.2f}" for k in (1, 6, 9)))
lam = np.geomspace(0.1, 100, 2001)
p1, p2 = V.frequency_of_seeing(lam, 6, 1.0), V.frequency_of_seeing(lam, 6, 0.1)
i1, i2 = np.argmin(np.abs(p1 - 0.5)), np.argmin(np.abs(p2 - 0.5))
assert abs(np.log10(lam[i2] / lam[i1]) - 1.0) < 0.01, "a tenfold loss slides the curve exactly one decade"
# 2. optics and the mosaic
out.row("diffraction cutoff for 2, 3 and 6 mm pupils (c/deg)", ", ".join(f"{V.cutoff_cpd(p):.0f}" for p in (2, 3, 6)))
out.row("Nyquist limit of cones 0.5 arcmin apart; 80 c/deg sampled at 120/deg appears at",
f"{V.nyquist_cpd(0.5):.0f}; {V.alias_cpd(80, 120):.0f} c/deg")
# 3. gain control
b = np.logspace(0, 8, 9)
ratio = V.increment_threshold(b) / b
out.row("increment threshold over background with gain control, 10^0 to 10^8", ", ".join(f"{r:.3f}" for r in ratio[::2]))
assert np.allclose(ratio[2:], ratio[-1], rtol=0.05), "gain control gives a constant Weber fraction"
# 4. the retina and the cortex
m = V.mach_response(V.mach_profile())
out.row("Mach bands: the filter's output at the dark corner and on the dark plateau", f"{m[148]:.3f} < {m[100]:.3f}")
th = np.deg2rad(np.arange(-90, 91, 3))
out.row("a Gabor complex cell's half-width at half height", f"{np.rad2deg(V.half_width(th, V.orientation_tuning(th))):.0f} deg")
# 5. the CSF
fq = np.array([0.5, 1, 2, 4, 8, 16, 24, 32])
s = V.csf(fq) * 10 ** rng(5).normal(0, 0.08, len(fq))
fit = V.fit_csf(fq, s)
out.row("a CSF fitted to 8 noisy thresholds: peak, width (octaves); the acuity of the true curve",
f"{fit['peak']:.1f} c/deg, {fit['bandwidth']:.1f}; {V.acuity_cpd():.0f} c/deg")
# 6. colour matching against 1955
cm = V.matching_functions(V.SB_PRIMARIES)
idx = [int(np.where(V.WAVELENGTHS == w)[0][0]) for w in V.SB_WAVELENGTHS]
r = [np.corrcoef(cm[idx, j], V.SB_RGB[:, j])[0, 1] for j in range(3)]
out.row("derived colour-matching functions against Stiles and Burch (1955): r", ", ".join(f"{v:.4f}" for v in r))
assert min(r) > 0.998, "three cone curves and one inverse reproduce the 1955 matches"
base = V.surface(560, 70, 0.25, 0.55)
twin = V.null_space_metamer(base, 0.9, seed=7)
out.row("a metamer: cone excitations of A and B", f"{np.round(V.cone_excitations(base), 3)} = {np.round(V.cone_excitations(twin), 3)}")
out.note = ("The curve's shape counts quanta without knowing the losses, because a loss only slides it along "
"a log axis. Diffraction and the mosaic both stop near 60 to 90 cycles per degree. Gain control "
"keeps the Weber fraction fixed over eight log units. Three cone curves and one 3-by-3 inverse "
"reproduce ten observers' 1955 colour matches, and any spectrum plus a null-space wiggle is a metamer.")
fig, ax = labs.figure(2, size=(11, 4.2))
lam = np.geomspace(0.3, 40, 300)
for k, col in ((1, labs.GREY), (3, labs.BLUE), (6, labs.GREEN), (9, labs.PINK)):
ax[0].plot(lam, V.frequency_of_seeing(lam, k), color=col, lw=1.6, label=f"k = {k}")
ax[0].set_xscale("log")
ax[0].set(title="Frequency of seeing", xlabel="mean quanta absorbed", ylabel="P(seen)")
ax[0].legend(fontsize=8)
for j, col in enumerate((labs.PINK, labs.GREEN, labs.BLUE)):
ax[1].plot(V.SB_WAVELENGTHS, cm[idx, j] * np.dot(cm[idx, j], V.SB_RGB[:, j]) / np.dot(cm[idx, j], cm[idx, j]),
color=col, lw=1.6)
ax[1].plot(V.SB_WAVELENGTHS[::2], V.SB_RGB[::2, j], "o", color=col, ms=3)
ax[1].axhline(0, color=labs.GREY, lw=0.8)
ax[1].set(title="Colour matching: derived (lines), 1955 (dots)", xlabel="wavelength (nm)", ylabel="amount")
out.fig = fig
return out
Now change it
- Repeat the frequency-of-seeing experiment with 20, 50 and 200 flashes per intensity, 200 times each. How often is the fitted k within one of the truth? How many flashes did Hecht's argument need?
- Compute colour-matching functions for a display with primaries at 630, 532 and 467 nm. Where is each negative, and what does that say about the colours the display cannot show?
- Build a metamer of a daylight-lit leaf, then light both with a 2856 K lamp. Which cone class differs most, and by how much? Find the null-space direction that makes the difference largest.
Problems, with solutions
Try each problem before opening its solution.
1. The shape gives k. Show that \(P(N \ge k)\) for \(N \sim \mathrm{Poisson}(a q)\) depends on \(q\) and \(a\) only through \(\log a + \log q\), and so that the frequency-of-seeing curve's shape on a log axis gives \(k\) without \(a\).
Solution
With N ~ Poisson(λ), λ = aq, P(seen) = P(N ≥ k) = Q(k, λ), the regularized upper incomplete gamma function of λ alone. On a log axis, log λ = log a + log q, so changing a shifts the curve by log a without changing its shape. Its slope at the midpoint, dP/d log₁₀ q = ln 10 · λ · P(N = k − 1), depends only on k: 0.80 for k = 1, 2.20 for k = 6, 2.71 for k = 9.
2. Hecht's arithmetic. Hecht's flashes delivered 54 to 148 quanta at the cornea. With 4% reflected, half the rest absorbed in the eye, and at most 20% of what reaches the retina caught, how many were absorbed? Over 500 rods, what is the chance that some rod caught two?
Solution
54 × 0.96 × 0.5 × 0.2 = 5.2 and 148 × 0.096 = 14.2: five to fourteen. With n quanta in 500 rods, P(no rod has two) = ∏ᵢ (500 − i)/500 for i < n: 98% for n = 5, 83% for n = 14. So a rod catching two happens on 2% to 17% of flashes; the argument needs only that most seen flashes involve no rod with two, which holds.
3. The mosaic. Foveal cones are about 0.5 minutes of arc apart. Find the Nyquist frequency, and the frequency a 90 c/deg grating would alias to.
Solution
Spacing 0.5 arcmin = 1/120 degree; one cycle needs two samples, so the Nyquist frequency is 60 c/deg. A 90 c/deg grating sampled at 120 per degree appears at |90 − 120| = 30 c/deg.
4. The DoG's peak. Derive the frequency response of a difference of Gaussians, and find where it peaks when the surround is three times the centre and the two have equal area.
Solution
With unit-area Gaussians, H(f) = exp(−2π²σc²f²) − exp(−2π²σs²f²). Setting dH/df = 0 gives σc² e^{−2π²σc²f²} = σs² e^{−2π²σs²f²}, so f* = √(ln(σs²/σc²) / (2π²(σs² − σc²))). With σs = 3σc, f* = √(ln 9 / (16π²σc²)) = √(2.197/157.9)/σc ≈ 0.118/σc cycles per unit of distance.
5. Metamers by projection. With the cone matrix \(A\) (\(3 \times N\)), show that \(P = I - A^\top (A A^\top)^{-1} A\) projects onto the null space, and that adding \(P\mathbf{v}\) to any spectrum makes a metamer.
Solution
P = I − Aᵀ(AAᵀ)⁻¹A is symmetric and P² = P; AP = A − A = 0, so for any v, A(s + Pv) = As: the same three cone excitations. Its rank is N − 3, the dimension of the null space (76 on a 79-point grid). A physical metamer also needs s + Pv ≥ 0, which bounds how large Pv can be.
6. A modern display's primaries. With explainer.psychology.psyche.vision: compute the colour-matching functions for primaries at 630, 532 and 467 nm, and find the wavelengths where each is negative.
Solution
vision.matching_functions((630, 532, 467)) gives one row per wavelength. The red
function is negative from about 470 to 530 nm, the blue from about 535 to 625 nm, and the green below about 465 nm
and above about 635 nm; every set of three real primaries has negative lobes, which is why no display covers the
spectral locus.
7. ★ A fourth dimension. Design a test that would reveal a fourth dimension of colour vision, and say why a match with three primaries would not.
Solution
A trichromat's matches are fixed by three numbers, so a fourth cone shows up only as matches that trichromats accept and the observer rejects: give the observer a Rayleigh-type match (a mixture of two long-wave lights against a single one) and show that no setting satisfies them, or that the accepted settings form a point where a trichromat's form a line. Jordan et al. used such matches and discrimination thresholds along directions a trichromat cannot see. Ordinary three-primary matching misses it because with only three knobs, an observer with four cones can never be satisfied, and a careless experimenter records the closest setting as a match.
Notes and sources
Where it comes back
Seeing as inference, of which the dress was a preview: Part 14. The other senses, each with its own code: Part 15.
Attention as gain and normalization: Part 18. Seeing without knowing, D.F. and blindsight: Part 27. Displays,
warnings and colour in design: Parts 51 and 52. Efficient coding: Part 58. Psyche's vision module supplies the
filters, the CSF and the colour machinery those parts use.
Sources
Books. B. A. Wandell, Foundations of Vision (1995). R. W. Rodieck, The First Steps in Seeing (1998). D. H. Hubel, Eye, Brain, and Vision (1988).
Papers. S. Hecht, S. Shlaer and M. H. Pirenne, Energy, quanta, and vision, J. Gen. Physiol. 25 (1942) 819–840. D. A. Baylor, T. D. Lamb and K.-W. Yau, Responses of retinal rods to single photons, J. Physiol. 288 (1979) 613–634. J. N. Tinsley et al., Direct detection of a single photon by humans, Nat. Commun. 7 (2016) 12172. E. D. Adrian and Y. Zotterman, The impulses produced by sensory nerve-endings, Part II, J. Physiol. 61 (1926) 151–171. H. K. Hartline and C. H. Graham, Nerve impulses from single receptors in the eye, J. Cell. Comp. Physiol. 1 (1932) 277–295. S. W. Kuffler, Discharge patterns and functional organization of mammalian retina, J. Neurophysiol. 16 (1953) 37–68. R. W. Rodieck, Quantitative analysis of cat retinal ganglion cell response to visual stimuli, Vision Res. 5 (1965) 583–601. D. H. Hubel and T. N. Wiesel, Receptive fields of single neurones in the cat's striate cortex, J. Physiol. 148 (1959) 574–591; Receptive fields, binocular interaction and functional architecture in the cat's visual cortex, J. Physiol. 160 (1962) 106–154; Receptive fields and functional architecture of monkey striate cortex, J. Physiol. 195 (1968) 215–243. R. C. Reid and J.-M. Alonso, Specificity of monosynaptic connections from thalamus to visual cortex, Nature 378 (1995) 281–284. E. H. Adelson and J. R. Bergen, Spatiotemporal energy models for the perception of motion, J. Opt. Soc. Am. A 2 (1985) 284–299. F. W. Campbell and J. G. Robson, Application of Fourier analysis to the visibility of gratings, J. Physiol. 197 (1968) 551–566. C. Blakemore and F. W. Campbell, On the existence of neurones in the human visual system selectively sensitive to the orientation and size of retinal images, J. Physiol. 203 (1969) 237–260. D. J. Heeger, Normalization of cell responses in cat striate cortex, Vis. Neurosci. 9 (1992) 181–197. M. Carandini and D. J. Heeger, Normalization as a canonical neural computation, Nat. Rev. Neurosci. 13 (2012) 51–62. L. A. Lesmes et al., the quick CSF, J. Vis. 10(3) (2010) 17. W. S. Stiles and J. M. Burch, Interim report to the CIE (1955). A. Stockman and L. T. Sharpe, Vision Res. 40 (2000) 1711–1737. L. M. Hurvich and D. Jameson, An opponent-process theory of color vision, Psychol. Rev. 64 (1957) 384–404. G. Jordan, S. S. Deeb, J. M. Bosten and J. D. Mollon, The dimensionality of color vision in carriers of anomalous trichromacy, J. Vis. 10(8) (2010) 12. R. Lafer-Sousa, K. L. Hermann and B. R. Conway, Curr. Biol. 25 (2015) R545–R546. P. Wallisch, J. Vis. 17(4) (2017) 5. C. Witzel, C. Racey and J. K. O'Regan, J. Vis. 17(2) (2017) 1. A. D. Milner et al., Perception and action in 'visual form agnosia', Brain 114 (1991) 405–428. M. A. Goodale, A. D. Milner, L. S. Jakobson and D. P. Carey, Nature 349 (1991) 154–156. L. G. Ungerleider and M. Mishkin, Two cortical visual systems (1982). M. A. Goodale and A. D. Milner, Separate visual pathways for perception and action, Trends Neurosci. 15 (1992) 20–25. B. A. Olshausen and D. J. Field, How close are we to understanding V1?, Neural Comput. 17 (2005) 1665–1699.
About this partfrom its README
New York, 1942. In a laboratory at Columbia University an observer sits in total darkness for forty minutes, then watches for a tiny, brief flash of blue-green light off to one side. Selig Hecht, Simon Shlaer and Maurice Pirenne measured the flash in quanta, and found that it was seen when somewhere between fifty-four and a hundred and forty-eight reached the front of the eye, of which only five to fourteen were absorbed, spread over about five hundred rods. A rod must respond to a single quantum: the eye is about as sensitive as physics allows. Then the steepness of the observers' frequency-of-seeing curves gave the same small number by a second route, with no need to know how much light the eye wastes.
But the eye does not send the brain a picture of the light. It sends differences, across space, time and wavelength, and every stage can be written down as a filter. This part follows them: the Poisson argument; the optics and the cone mosaic, which stop detail near sixty cycles per degree; gain control, which spans ten log units of light and gives Weber's law on the way; the retina's centre minus surround, a band-pass filter, Mach bands, and why differences are worth sending; the cortex's edge detectors, Gabor fields, simple and complex cells; the viewer's own contrast sensitivity function and a hybrid image that it splits; channels and divisive normalization. Then colour as linear algebra: three cone types, matching as a 3-by-3 solve checked against Stiles and Burch's 1955 matches, metamers as the null space, the 1931 diagram; Hering's opponent colours and colour blindness as a lost dimension; colour constancy and the dress; and the two visual streams, with patient D.F. The practice chapter is the screens, cameras, codecs and palettes built on all of it; the frontier is what the first stage of cortex does with real scenes, the retina's many output types, and a tetrachromat. For Kant's first objection this is the strongest reply in the series so far: a threshold counted in quanta, and colour matches predicted by a matrix.
What is computed and built
explainer/psychology/psyche/vision.py: frequency of seeing as a Poisson tail, its slope, and a maximum-likelihood fit of k and the loss; the diffraction MTF, a blurred eye, the line spread, Nyquist and aliasing; the Naka-Rushton function and increment thresholds with and without gain control; the difference of Gaussians in space and frequency, Mach bands, a 2-D DoG; gratings, Gabor fields, simple and complex cells, orientation tuning; divisive normalization and a masked contrast response; a truncated log-parabola CSF, its fit, the acuity it implies, the Campbell-Robson chart and CSF filtering; the cone fundamentals, CIE 1931 and Stiles-Burch tables on a common grid; cone excitations, matching, colour-matching functions for any primaries, null-space metamers, chromaticity, sRGB; opponent channels, dichromacy, Planck spectra, von Kries. Tested intests/psychology/test_vision.py.explainer/psychology/archive/_colour_tables.py: the four colour tables at 5 nm, transcribed by script.- The Ledger gains five rows, including the rate code deferred from Part 5, and the Archive eleven datasets.
- The course's interactive measures the reader's contrast sensitivity at four spatial frequencies by staircase and draws the curve.
Chapter notes
| # | Chapter | What it does |
|---|---|---|
| 0 | A dark room, 1942 | The experiment; from the cornea to the rods; the eye sends differences; objectives |
| 1 | Counting quanta | Poisson arrivals; the curve's steepness gives k; Psyche in the dark room; one rod, one quantum, one photon; photon noise and the square-root law |
| 2 | Optics and the mosaic | The MTF and the diffraction limit; the cone mosaic, Nyquist and aliasing; 20/20 |
| 3 | Ten billion to one | The range of light; a response curve that slides; gain control gives Weber's law |
| 4 | The retina sends differences | Adrian's rate code; Kuffler's centre and surround; the difference of Gaussians; Mach bands; why send differences |
| 5 | Edges in the cortex | Hubel and Wiesel's bar; the Gabor field and its tuning; simple and complex cells; a first hierarchy |
| 6 | On you: your contrast sensitivity | The Campbell-Robson chart; the CSF and its four numbers; a hybrid image |
| 7 | Channels and normalization | A bank of channels; Blakemore and Campbell's adaptation; divisive normalization |
| 8 | Three numbers for a spectrum | Newton to Young; the cone fundamentals; univariance; a spectrum projected to three numbers |
| 9 | Colour matching as linear algebra | The matching experiment and negative weights; derived functions against Stiles and Burch; metamers; the 1931 diagram |
| 10 | Opponent colours and colour blindness | Hering's puzzle; opponent channels; dichromacy as a lost dimension |
| 11 | Constancy and the dress | Discounting the light; one swatch, two illuminants; who saw what |
| 12 | Two streams | What and where, or how; D.F. and the slot |
| 13 | The Ledger | Few quanta; the rate code; orientation cells; the CSF and channels; the dress |
| 14 | In practice: screens, codecs and palettes | Engineering on the standard observer; chroma subsampling; designing for colour-blind readers |
| 15 | Frontier: what V1 does with the world | What is solid and argued; how close we are to V1; twenty output types and a fourth cone; open questions |
| Recap, problems, and the road ahead | Ten lines; the first objection; payoffs; problems; references; Part 14 |
NotesWhere the numbers come from
| What | Source |
|---|---|
| 40 minutes in the dark; 510 nm flashes; 2.1 to 5.7 × 10⁻¹⁰ erg = 54 to 148 quanta at the cornea; 4% reflected, about 50% absorbed by the media, at most 20% of the rest caught; 5 to 14 absorbed over about 500 rods; 5 to 8 from the curves' shapes; observers mostly the authors | Hecht, Shlaer and Pirenne (1942), from the abstract and later accounts; registered in SOURCES.md |
| One absorbed quantum gives a toad rod a current of about 1 pA, 5% of its dark current; quantum efficiency about 0.5 | Baylor, Lamb and Yau (1979), from the abstract |
| Single photons in two-interval forced choice: 30,767 trials, 2,420 single-photon events, 51.6% ± 1.0% correct, P = 0.0545; about 60% on high-confidence trials | Tinsley et al. (2016), as quoted in summaries and in van der Reep et al. (2022) |
| The square-root law of photon noise | de Vries (1943), Rose (1948), as registered for Part 11 |
| A single stretch receptor: impulses of one size whose rate rises with load and falls while it stays on | Adrian and Zotterman (1926), from later accounts; Hartline and Graham (1932) for the eye of Limulus |
| On-centre and off-centre ganglion cells with an antagonistic surround | Kuffler (1953) |
| Cells driven by a line at one orientation; the story of the slide's edge | Hubel and Wiesel (1959), with the story from their later recollections; simple and complex cells (1962); monkeys (1968) |
| Thalamic cells connect to simple cells whose subregions they overlap | Reid and Alonso (1995), from the abstract |
| A band-pass CSF peaking near 3 to 5 cycles per degree | Campbell and Robson (1968), from secondary accounts |
| Adapting to a grating raises thresholds up to fivefold near its frequency and orientation | Blakemore and Campbell (1969), from the abstract |
| A four-parameter CSF estimated in about fifty trials | Lesmes et al. (2010), as registered for Part 11 |
| Cone fundamentals (peaks 570, 545, 445 nm); the CIE 1931 functions; Stiles and Burch's 1955 2° pilot matches (10 observers, primaries 645.2, 526.3, 444.4 nm); the scotopic curve (peak 505 nm) | the tables of the Colour & Vision Research Laboratory (cvrl.org), downloaded and transcribed into archive/_colour_tables.py |
| The 1931 standard observer rests on Wright's and Guild's matches, seventeen observers | the usual account, from memory |
| About 8% of men and 0.5% of women of northern European ancestry have red-green deficiency | the NIH's genetics reference and reviews |
| The dress: about 1,400 online, 57% blue-black, 30% white-gold, 11% blue-brown, 2% other; white-gold more common among older people and women | Lafer-Sousa, Hermann and Conway (2015), from the authors' university's release |
| Two surveys of 8,084 and 5,333; assuming shadow went with white and gold | Wallisch (2017), from the release and abstract |
| D.F.: carbon monoxide poisoning; matching a slot's angle near chance; posting a card accurately | Milner et al. (1991) and Goodale et al. (1991), from reviews |
| One of 24 obligate carriers of deuteranomaly behaved as a tetrachromat on every test | Jordan, Deeb, Bosten and Mollon (2010), from the abstract |
| About twenty types of retinal ganglion cell in primates, more than forty in mice | reviews and a 2023 release on cross-species work |
| Okabe and Ito's eight colours | Okabe and Ito (2008), hex values from memory |
Everything else is computed by compute.py with Psyche's vision module and is a model's behaviour, tagged as such
on screen. The radar of earlier parts is gone; the drawings here are the dark room, the cone mosaic, the brain's two
routes and the receptive-field diagrams, and they say so. D.F.'s polar plots are simulated trials with the published
pattern, not her data. The dress is a stand-in swatch with colours like the photograph's, which is not reproduced.
| Number on screen | Value | How |
|---|---|---|
| Steepness of P(seen) per tenfold step at its midpoint, k = 1, 6, 9 | 0.80, 2.20, 2.71 | Poisson tails |
| Psyche (k = 6, 9% absorbed), 7 intensities × 50 flashes: fitted k and absorption | 6 and 9.2% | maximum likelihood; the median of 101 experiments |
| Share of the 101 experiments whose fitted k is within one of 6 | 80% | the same |
| Diffraction cutoff for a 2, 3 and 6 mm pupil (555 nm) | 63, 94 and 189 cycles per degree | D/λ |
| The modelled eye's MTF at 60 c/deg; its line spread (full width at half height) | 0.002; 1.35 arcmin | diffraction × a Gaussian blur of 0.5 arcmin |
| Nyquist limit of cones 0.5 arcmin apart; an 80 c/deg grating sampled at 120 per degree appears at | 60; 40 c/deg | one cycle per two cones |
| Increment threshold over background with gain control | 4.1%, over ten log units | Naka-Rushton, σ following the background |
| Neighbouring correlation (two pixels apart) in a 1/f texture, before and after a DoG | 0.60; 0.11 | the retina's filter |
| A Gabor complex cell's half-width at half height | 22° | the energy model |
| The CSF: acuity it implies; fitted peak and width from 8 simulated thresholds | 56 c/deg; 3.7 c/deg, 3.1 octaves | a truncated log-parabola; the median fit of 101 |
| Threshold elevation after adapting to 8 c/deg | up to 5× | a bank of one-octave channels |
| Derived colour-matching functions against Stiles and Burch: correlation, each function | 0.9999, 0.9995, 0.9994 | P⁻¹ times the cone curves, one scale factor each |
| Matching 580 nm with their primaries; 500 nm | red 2.27, green 0.66, blue −0.01; red −0.27 | the same |
| A metamer pair under a 2856 K lamp: change in M and in S | 1% and 4% | a null-space metamer |
| Where the red-green channel (L − 1.5 M) crosses zero | 581 nm | weighted differences |
| Smallest colour difference (CIE ΔE) in a rainbow palette: normal, without L, without M; in Okabe and Ito's | 39, 7, 10; 26, 23, 17 | dichromacy as a projection |
| A stand-in swatch discounted under 3000 K and under 12000 K light | blue and near-black; white and gold | von Kries |
| Colour stored at a quarter of the resolution (4:2:0) | 76,800 samples become 38,400 | YCbCr |
Notes
| Finding | Original | Status |
|---|---|---|
| A dark-adapted eye sees a flash when a handful of quanta, about five to fourteen, are absorbed; a rod responds to one | Hecht, Shlaer and Pirenne 1942 | replicated |
| A sensory fibre codes strength as a rate of impulses of fixed size, and adapts | Adrian and Zotterman 1926 | replicated |
| V1 neurons are tuned to orientation; simple cells are built from aligned centre-surround inputs | Hubel and Wiesel 1959 | replicated |
| Contrast sensitivity is band-pass, and adaptation lowers it only near the adapting frequency | Campbell and Robson 1968 | replicated |
| Seeing the dress as white and gold goes with assuming bluish light | Lafer-Sousa, Hermann and Conway 2015 | replicated |
The first row's note records that single-photon detection by people rests on one study at the edge of significance.
Shown without a row, with the reason recorded in explainer/psychology/ledger.py: D.F. (a single case; vision
without awareness is entered in Part 27), the tetrachromat (one person, at the frontier), the colour tables (standard
measurements, not a finding) and Okabe and Ito's palette (a design recommendation).
Notes
Before the narrated master:
- Hecht et al.: "a faint point" for fixation, "tiny, brief" for the flash, and "off to one side" are the usual account; the field size, duration and eccentricity are not stated on screen. That most observers were the authors is from a summary.
- Tinsley et al. (2016): the numbers are quoted from summaries and a reanalysis; the 60% on high-confidence trials is as the reanalysis gives it. The number of observers is not given on screen.
- Adrian and Zotterman: the frog muscle, the weights and the adaptation are from later accounts; no rates are quoted, and the trains are schematic.
- Hubel and Wiesel: the slide's edge is their later recollection; 1958 and Johns Hopkins are from those accounts.
- The tuning half-width of about 20° "in the range recorded" is a general statement, from memory.
- Campbell and Robson (1968): the peak near 3 to 5 c/deg is from secondary accounts; the peak sensitivity of the model (200) and the acuity it implies (56 c/deg) are the model's.
- Blakemore and Campbell (1969): "up to fivefold" is from the abstract; the channel model's width (one octave) is a common assumption, not their measurement.
- The 1931 standard observer from Wright's and Guild's seventeen observers is from memory, as are the 1983 microspectrophotometry and the 1960s pigment measurements.
- Hurvich and Jameson (1957): hue cancellation is described from memory; the channel weights on screen (L − 1.5 M) are chosen, not fitted to their data. Unique yellow "about 575 to 580 nm" is the usual range.
- Dalton's 1794 account and the X-linked genes are from general knowledge.
- The dress: the swatch's colours are like the photograph's, chosen by eye; the 3000 K and 12000 K lights are illustrations. The survey shares are from the authors' university's release.
- D.F.: 1988 and "could still see colours and textures" are from accounts of the case; the polar plots are simulated.
- The number of retinal ganglion cell types (about twenty in primates, more than forty in mice) is from a release and a review; estimates differ.
- Okabe and Ito's hex values are from memory.
Companion material in this repository
The syllabus's plan for this partfrom SYLLABUS.md, the plan of record
- Hook: the dark room; from the cornea to the rods (54 to 148 quanta, 4% reflected, half absorbed, at most a fifth caught: 5 to 14); the eye sends differences; objectives.
- Counting quanta: Poisson arrivals; the curve's steepness depends on k alone (0.80, 2.20, 2.71 for k = 1, 6, 9), and a loss only slides it; Psyche in the dark room (k = 6 recovered; within one of the truth 80% of the time); Baylor, Lamb & Yau's single rods (1 pA); Tinsley et al. (2016: 51.6%, P = 0.0545); photon noise and the square-root law.
- Optics and the mosaic: the MTF and the diffraction limit (94 c/deg at 3 mm); cones 0.5 arcmin apart, Nyquist at 60, an 80 c/deg grating aliased to 40; 20/20 as 30 c/deg.
- Ten billion to one: the range of light; the Naka-Rushton curve that slides; gain control gives a Weber fraction of 4.1% over ten log units, a fixed gain saturates.
- The retina sends differences: Adrian and Zotterman's rate code (the Ledger row deferred from Part 5); Kuffler's centre and surround; Rodieck's difference of Gaussians and its band-pass response; Mach bands computed; a 1/f texture's correlation two pixels apart, 0.60 before the filter and 0.11 after.
- Edges in the cortex: Hubel and Wiesel's bar; the Gabor field (half-width 22°); simple and complex cells and the energy model; Reid and Alonso's paired recordings.
- On you: the Campbell-Robson chart; the CSF and its four numbers (acuity 56 c/deg in the model); a hybrid image that reads E up close and A from across a room.
- Channels and normalization: a bank of one-octave channels; Blakemore and Campbell's adaptation (up to fivefold); Heeger's divisive normalization, saturation and cross-orientation masking.
- Three numbers for a spectrum: Newton, Young, Maxwell and Helmholtz; Stockman and Sharpe's cone fundamentals (570, 545, 445 nm; rods 505); univariance; 79 numbers projected to three.
- Colour matching as linear algebra: the 3-by-3 solve and negative weights; derived matching functions against Stiles and Burch's 1955 matches (r ≥ 0.9994); a null-space metamer that breaks under a warm lamp; the 1931 diagram and a screen's gamut.
- Opponent colours and colour blindness: Hering's puzzle; L − M, S − (L + M); colour deficiency (8% of men) as a lost dimension; a rainbow palette collapses (ΔE 39 to 7), Okabe and Ito's does not.
- Constancy and the dress: von Kries; a stand-in swatch read under a warm and a cool light; Lafer-Sousa, Hermann & Conway (57%, 30%, 11%) and Wallisch (2017).
- Two streams: Ungerleider and Mishkin; Goodale and Milner; D.F.'s slot task (schematic).
- The Ledger. 14. In practice: screens, cameras and codecs on the standard observer; chroma subsampling (half the data); colour-blind-safe design. 15. Frontier: what is solid and argued; how close we are to understanding V1 (Olshausen & Field 2005); twenty retinal output types; a tetrachromat (Jordan et al. 2010).
Psyche: vision (explainer/psychology/psyche/vision.py, twelve tests): frequency of seeing and its fit; the
diffraction MTF, blur, Nyquist and aliasing; Naka-Rushton gain control; differences of Gaussians, Mach bands and a 2-D
DoG; gratings, Gabor fields, simple and complex cells, orientation tuning; normalization; a truncated log-parabola
CSF, its fit, the Campbell-Robson chart and CSF filtering; the CIE 1931, Stiles-Burch and Stockman-Sharpe tables
(archive/_colour_tables.py, from cvrl.org); cone excitations, matching, matching functions for any primaries,
null-space metamers, chromaticity, sRGB; opponent channels, dichromacy, Planck spectra and von Kries.
On you: the Campbell-Robson chart and the hybrid image in the film; the course's interactive measures the reader's
contrast sensitivity at four stripe widths by interleaved staircases and draws the curve.
Ledger: a handful of quanta (replicated, with the single photon noted as resting on one study at P = 0.0545); the
rate code of a single fibre (replicated; deferred from Part 5); orientation-tuned cells (replicated); the CSF and
its channels (replicated); the dress's illuminant account (replicated). Shown without rows, with reasons: D.F.
(Part 27), the tetrachromat, the colour tables and Okabe and Ito's palette.
In practice: displays, cameras and sRGB; codecs and chroma subsampling; colour-blind-safe design.
Frontier: what V1 does with natural scenes; the retina's many output types; tetrachromacy.
Reading: Hecht, Shlaer & Pirenne 1942; Baylor, Lamb & Yau 1979; Kuffler 1953; Hubel & Wiesel 1959, 1962;
Campbell & Robson 1968; Blakemore & Campbell 1969; Heeger 1992; Stockman & Sharpe 2000; Lafer-Sousa et al. 2015;
Wandell, Foundations of Vision; Rodieck, The First Steps in Seeing; Hubel, Eye, Brain, and Vision.
Build the film
python -m videos.psychology.psych13.compute # the part's numbers, into .cache/psych13
python tools/build.py psych13 # render and assemble the film
EXPLAINER_TTS=silent python tools/qa_scene.py psych13 Hook # one chapter, silent, with a contact sheet
Scenes: videos/psychology/psych13. Setup: see the course page. Source of these notes: the README and the scenes' narration.
Build it
python -m videos.psychology.psych13.compute # every number (seconds), into .cache/psych13/
python tools/qa_scene.py psych13 Matching # one chapter, silent, at 480p, with a contact sheet
EXPLAINER_TTS=silent python tools/build.py psych13 -q l # the whole part, silent preview
python tools/build.py psych13 # 1080p30 with narration
python tools/qa_scene.py psych13 Matching --lang zh # the Chinese edition of one chapter
python tools/make.py psych13 # both editions, with the checks a long build needs
python -m videos.psychology.labs 13 # the lab: quanta, filters, colour matching
python tools/check_ledger.py psych13 # every study shown has its Ledger row, or a reason
python -m pytest tests/psychology # Psyche's vision module, the Ledger, the Archive
The Chinese edition is zh_lines.py (the narration, line by line) and the series table
videos/psychology/psychology_text_zh.json (the text on screen); the terms are in
PSYCHOLOGY_ZH_GUIDE.md.