Title: Math and science / INF ML AI / Color
Tags: copyright

Idea: Radient flux (power) Φ
Description: The total amount of energy passing through a surface or unit of space per unit time. Measure in joules/second or watts.

Idea: Irradiance (E)
Description: Irradiance is the area density of flux arriving at a surface (E/A); radiant exitance (M) is the area density of flux leaving a surface. The units are W/m^2. More generally, when the flux distribution is not constant, irradiance at a point is defined as: E = dΦ/dA. When imagining the derivative, it is important to not think of positional change, but growing/shrinking area and the effects on the flux. If you are imagining the possibility of a negative flux, you are probably thinking about position instead of area change.
Example: For a sphere with a point light source at the centre, the irradiance is given by E = Φ/4πr^2

Idea: Intensity (I)
Description: Flux per solid angle. I = dΦ/dw
Intensity describes the directional distribution of light, but it is only meaningful for point light sources.

Idea: Radiance (L)
Description: Radiance is the flux per unit area, per unit solid angle. L = dΦ / dw dA^⊥. A^⊥is the projected area of dA on a hypothetical surface perpendicular to w (where w is a unit vector).

Title: Photometry
Q: Photometry is the study of visible electromagnetic radiation in terms of [...].
All [...] measurements like flux and radiance can be converted to corresponding photometric measurements by integrating against the spectral response curve \( V(\lambda) \), which describes the relative sensitivity of the [...] to various wavelengths.
A: its perception by the human visual system; radiometric; human eye

Idea: Radiometry Integrals
Description: A few instructional integrals
Example: What is the power leaving a diffuse emitter with a given radiance, L, and area, A.[latex]
\begin{align}
\Psi &= \int_A \int_\Omega L(x \rightarrow \Theta)cos\theta dwdA \\
&= \int_A \int_\Omega L cos\theta dwdA \\
&= LA \int_{0}^{2\pi} \int_{0}^{\frac{\pi}{2}} cos\theta sin\theta d\theta d\phi \\
&= LA \int_{0}^{2\pi} \frac{1}{2} d\phi \\
&= \pi LA
\end{align}[/latex]
This solution highlights a important result:
[latex]
\begin{gather}
\int_{0}^{\frac{\pi}{2}} cos\theta sin\theta d\theta d\phi = 1/2
\end{gather}
[/latex]

Idea: Color science 1.1 The eye and color perception
Description: Light hits the retina, which consists of rods (detects intensity) and cones (detect frequency). Cones are most concentrated at the fovea (near the back center). There 120 million rods, 6 million cones and 1 million optical fibers. Individual cones cannot distinguish light frequency. The photoreceptors are underneath several layers of cells and are orientated towards the back of the eye (for verterbrates).
The iris is a colored annulus (def: a ring-shaped object, structure, or region) behind the cornea but before the lens. The iris contains radial muscles that allow it to change the size of its inner hole, the pupil. Only light passing through the pupil proceeds further into the eye.
Light passes through the pupil then strikes the transparent crystalline lens. The lens is surrounded by muscles called the ciliary body, which can pull at the sides of the lens. When the ciliary muscles are relaxed, the lens is stretched radially, flattening it and reducing its optical power; the light entering the eye is now brought to a focus as far from the lens as possible. The ciliary muscles tense to exert a compressive force on the lens: its diameter shrinks, the lens becomes thicker, the optical power increases, and the focal point moves closer to the lens. Thus when the muscles are relaxed, the lens has its longest focal length and when the muscles tense, the lens is focused on nearer objects.
Light focused by the lens falls on the retina, a thin layering of cells covering about 200° on the back of the eye. The retina contains two types of photosensitive cells: rods and cones. Cones are primarily responsible for color perception; rods are limited to intensity, though they are ten times more sensitive to light than cones. Rods are physically smaller than cones, so they can be packed denser, giving greater spatial resolution.
There is a small region at the center of the visual axis known as the fovea, which subtends only 1 or 2° of visual angle. The structure of the retina is roughly radially symmetric around the fovea. The fovea contains only cones, and it is here that we find the densest collection of cones on the surface of the retina. Moving outward from the fovea, rods begin to appear among the cones, and at the edge of the fovea there are more rods than cones (see diagram below). Traveling further on a radial path from the fovea, the rods begin to form rings around each increasingly infrequent cone. The highest density of rods appears at about 20° from the fovea. In total, the human eye
contains about 120 million rods and 6 million cones. Since the optic nerve contains only about 1 million fibers, the eye must perform a lot of processing before the visual signal ever reaches the brain.
Photoreceptors
When light is absorbed in a receptor in the retina, the molecules of its photosensitive pigment are excited, and, as a result, a change in electrical potential is produced. The chemical at the heart of this process has the generic name photopigment. The particular photopigment found in rods, rhodopsin, has been studied extensively. It has been found that rhodopsin reacts to light in a bell-shaped curve, centered at about 500 nm (blue-green). Cone photopigments have rarely been extracted from primates.
There are three types of cones in the human eye, typically called S, M, and L (named respectively for their peak response to relatively short, medium, and long wavelengths), with peaks located at roughly 420, 530, and 560 nm. The response curves for these cones (as well as the rods) are asymmetrical; the drop-off at the high-frequency side is sharper than at the low-frequency side. Thus the shorter wavelengths are more readily absorbed than the longer wavelengths for all three ranges. Both rods and cones may be considered the ultimate in visual sensitivity: a single photon carries enough energy to produce the chemical reactions that change the electrical potential at the cell's membrane, signaling the arrival of light at that cell .
The relative abundance of the three types of cone varies considerably from one observer to another, but it is always found that there are many fewer S cones than M and L ; one estimate of their relative abundances is that they are, on average, in the ratios of 40 to 20 to 1 for the L , M ,and S cones, respectively. This rather asymmetrical arrangement is, in fact, very understandable. Because the eye is not corrected for chromatic aberration, it cannot simultaneously focus sharply the three regions of the spectrum in which the L, M ,and S cones are most sensitive, that is, wavelengths of around 580nm, 540nm, and 440nm, respectively. The eye focuses light of wavelength about 560nm, so both the ρ and γ responses correspond to images that are reasonably sharp; the β cones then have to receive an image that is much less sharp, and hence it is unnecessary to provide such a f ine network of β cones to detect it.
Backwards photoreceptors
Surprisingly, the photosensors are not the innermost layer of cells on the inside of the retina. Rather, there are several layers of interconnecting cells on top of the photoreceptors,
blocking the light from the lens. The overall density of these cells is quite low, so most of the incident light gets through. Even more surprising is the fact that the photoreceptors themselves are oriented so that they face the back of the eye rather than the pupil, so light must travel through the body of the photoreceptor before it reaches the photopigment that will trigger a response. These two pieces of physiology have suggested to some that the retina appears to have evolved "insideout" from the structure that we would probably think most efficient. This structure is common to all vertebrates (def: All vertebrates are built along the basic chordate body plan: a stiff rod running through the length of the animal (vertebral column and/or notochord), with a hollow tube of nervous tissue (the spinal cord) above it and the gastrointestinal tract below). In contrast, invertebrate eyes come from an invaginated bubble in the skin. The photoreceptors in invertebrates all face toward the lens, while in all vertebrates they face away from the lens and toward the brain. Spiders are unique in that they have both forms of eyes.
Principle of univariance
The signal carried by the change in membrane potential makes up the entire message sent by a photoreceptor to the rest of the visual system. Thus the only message sent by a rod or cone is that light has arrived and stimulated the photopigment; there is no information transmitted describing the wavelength of the photon. This effect is called the principle of univariance (The principle of univariance states that an individual receptor cell can be excited by different combinations of wavelength and intensity, and therefore cannot differentiate between a change in wavelength and a change in intensity). The likelihood of absorption of a photon by a particular cell is a function of the spectral sensitivity of the receptor and the intensity of the incoming light (e.g., if the receptor is 30% sensitive at some wavelength, any particular photon may not be absorbed, but about 30 of every 100 will). The time-averaged output of a photoreceptor is related to the number of photons received over some recent interval, but there is no way to determine the frequency distribution of these absorbed photons. It is only by combining the results of many photoreceptors with different spectral sensitivities that the visual system is able to reconstruct intensity and color descriptions of the incoming signal; this reconstruction is believed to happen at a very early stage in visual processing. The principle of univariance may at first seem puzzling. Suppose that the eye contained many distinct color sensors with different, narrowly defined bands of absorption. Although they might be as dose-packed as cones, the number of sensors for any particular frequency band in a fixed region would necessarily be fewer than if only three types of cones occupied the space, thereby sacrificing spatial color resolution. The human eye has evolved with a compromise of three sensors, which gives good color sensor density in the retina and a sufficient amount of color information to recompute the spectral information of the incident signal. Either the number of sensors or their density could be theoretically increased at the expense of the other.
Time averaged response
The chemical processes that occur inside a photoreceptor last several milliseconds, and additional photons that strike the receptor during that time add to the overall response. Thus the output of a receptor is really a time-averaged response, an effect called temporal smoothing. In effect, the sensors impose a low-pass filter over their time response, though the cutoff frequency of that filter changes with respect to the background light level: when there is little light arriving, there is little smoothing. The effect of temporal smoothing leads to the way we perceive light that blinks, or flickers. When the blinking is slow, we perceive the individual flashes of light. Above a certain rate, called the critical flicker frequency (or CFF), the flashes fuse together into a single continuous image. Far below that rate we see simply a series of still images, without an objectionable sense of near-continuity. Under the best conditions, the CFF for a human is around 60 Hz [389]. In contrast, a bee has a CFF of about 300 Hz. We note that as with most other visual phenomena, the flicker rate is dependent on many factors.
Signal transmission
The electric potential generated by a photoreceptor travels through a series of relay cells, and eventually results in a series of voltage pulses being transmitted along a nerve fibre to the brain. The rates at which these pulses are produced provide the signal modulation- a higher rate indicating a stronger signal, and a lower rate a weaker signal. Zero signal may be indicated by a resting rate, and rates lower than this can then indicate an opposite signal. The pulses themselves are all of the same amplitude, and it is only their frequency that carries information to the brain. The frequencies involved are typically from a few per second to around 400 per second. It might be thought that, as there are four different types of receptor, the rods and the three different types of cone, there would be four different types of signal, transmitted along four different types of nerve fibre, each indicating the strength of the response from one of the four receptor types. However, there is overwhelming evidence that this is not what happens. While much still remains unknown about the way in which the signals are encoded for transmission, the simple scheme shown below can be regarded as a plausible model. The strengths of the signals from the cones are represented by the symbols, ρ , γ ,and β (L, M, S).
Color constancy
The human visual system can compensate for different illumination conditions (e.g. sunlight vs tungsten bulb) in order to perceive the same colors in many different illumination environments. For the moment, we will assume that this means that the relative responses of the L, M and S being equal for white, grey and black objects regardless of the illumination. For example, humans can preceive grey objects as being grey and white objects as being white if they are placed in bright sunlight and if they are placed in the shade. The human visual system is somehow able to factor out the illumination from the properties of the object.
More: Spectral sensitivity of rods and cones.
Signal transmission (strope frequency limit, saturation, integration).

Title: Color science 1.0 Introduction
Text: Light hits the retina, which consists of rods (detects intensity) and cones (detect frequency). Cones are most concentrated at the fovea (near the back center). There 120 million rods, 6 million cones and 1 million optical fibers. Individual cones cannot distinguish light frequency. The photoreceptors are underneath several layers of cells and are orientated towards the back of the eye (for verterbrates).
The iris is a colored annulus (def: a ring-shaped object, structure, or region) behind the cornea but before the lens. The iris contains radial muscles that allow it to change the size of its inner hole, the pupil. Only light passing through the pupil proceeds further into the eye.
Light passes through the pupil then strikes the transparent crystalline lens. The lens is surrounded by muscles called the ciliary body, which can pull at the sides of the lens. When the ciliary muscles are relaxed, the lens is stretched radially, flattening it and reducing its optical power; the light entering the eye is now brought to a focus as far from the lens as possible. The ciliary muscles tense to exert a compressive force on the lens: its diameter shrinks, the lens becomes thicker, the optical power increases, and the focal point moves closer to the lens. Thus when the muscles are relaxed, the lens has its longest focal length and when the muscles tense, the lens is focused on nearer objects.
Light focused by the lens falls on the retina, a thin layering of cells covering about 200° on the back of the eye. The retina contains two types of photosensitive cells: rods and cones. Cones are primarily responsible for color perception; rods are limited to intensity, though they are ten times more sensitive to light than cones. Rods are physically smaller than cones, so they can be packed denser, giving greater spatial resolution.
There is a small region at the center of the visual axis known as the fovea, which subtends only 1 or 2° of visual angle. The structure of the retina is roughly radially symmetric around the fovea. The fovea contains only cones, and it is here that we find the densest collection of cones on the surface of the retina. Moving outward from the fovea, rods begin to appear among the cones, and at the edge of the fovea there are more rods than cones (see diagram below). Traveling further on a radial path from the fovea, the rods begin to form rings around each increasingly infrequent cone. The highest density of rods appears at about 20° from the fovea. In total, the human eye
contains about 120 million rods and 6 million cones. Since the optic nerve contains only about 1 million fibers, the eye must perform a lot of processing before the visual signal ever reaches the brain.
Photoreceptors
When light is absorbed in a receptor in the retina, the molecules of its photosensitive pigment are excited, and, as a result, a change in electrical potential is produced. The chemical at the heart of this process has the generic name photopigment. The particular photopigment found in rods, rhodopsin, has been studied extensively. It has been found that rhodopsin reacts to light in a bell-shaped curve, centered at about 500 nm (blue-green). Cone photopigments have rarely been extracted from primates.
There are three types of cones in the human eye, typically called S, M, and L (named respectively for their peak response to relatively short, medium, and long wavelengths), with peaks located at roughly 420, 530, and 560 nm. The response curves for these cones (as well as the rods) are asymmetrical; the drop-off at the high-frequency side is sharper than at the low-frequency side. Thus the shorter wavelengths are more readily absorbed than the longer wavelengths for all three ranges. Both rods and cones may be considered the ultimate in visual sensitivity: a single photon carries enough energy to produce the chemical reactions that change the electrical potential at the cell's membrane, signaling the arrival of light at that cell .
The relative abundance of the three types of cone varies considerably from one observer to another, but it is always found that there are many fewer S cones than M and L ; one estimate of their relative abundances is that they are, on average, in the ratios of 40 to 20 to 1 for the L , M ,and S cones, respectively. This rather asymmetrical arrangement is, in fact, very understandable. Because the eye is not corrected for chromatic aberration, it cannot simultaneously focus sharply the three regions of the spectrum in which the L, M ,and S cones are most sensitive, that is, wavelengths of around 580nm, 540nm, and 440nm, respectively. The eye focuses light of wavelength about 560nm, so both the ρ and γ responses correspond to images that are reasonably sharp; the β cones then have to receive an image that is much less sharp, and hence it is unnecessary to provide such a f ine network of β cones to detect it.
Backwards photoreceptors
Surprisingly, the photosensors are not the innermost layer of cells on the inside of the retina. Rather, there are several layers of interconnecting cells on top of the photoreceptors,
blocking the light from the lens. The overall density of these cells is quite low, so most of the incident light gets through. Even more surprising is the fact that the photoreceptors themselves are oriented so that they face the back of the eye rather than the pupil, so light must travel through the body of the photoreceptor before it reaches the photopigment that will trigger a response. These two pieces of physiology have suggested to some that the retina appears to have evolved "insideout" from the structure that we would probably think most efficient. This structure is common to all vertebrates (def: All vertebrates are built along the basic chordate body plan: a stiff rod running through the length of the animal (vertebral column and/or notochord), with a hollow tube of nervous tissue (the spinal cord) above it and the gastrointestinal tract below). In contrast, invertebrate eyes come from an invaginated bubble in the skin. The photoreceptors in invertebrates all face toward the lens, while in all vertebrates they face away from the lens and toward the brain. Spiders are unique in that they have both forms of eyes.
Principle of univariance
The signal carried by the change in membrane potential makes up the entire message sent by a photoreceptor to the rest of the visual system. Thus the only message sent by a rod or cone is that light has arrived and stimulated the photopigment; there is no information transmitted describing the wavelength of the photon. This effect is called the principle of univariance (The principle of univariance states that an individual receptor cell can be excited by different combinations of wavelength and intensity, and therefore cannot differentiate between a change in wavelength and a change in intensity). The likelihood of absorption of a photon by a particular cell is a function of the spectral sensitivity of the receptor and the intensity of the incoming light (e.g., if the receptor is 30% sensitive at some wavelength, any particular photon may not be absorbed, but about 30 of every 100 will). The time-averaged output of a photoreceptor is related to the number of photons received over some recent interval, but there is no way to determine the frequency distribution of these absorbed photons. It is only by combining the results of many photoreceptors with different spectral sensitivities that the visual system is able to reconstruct intensity and color descriptions of the incoming signal; this reconstruction is believed to happen at a very early stage in visual processing. The principle of univariance may at first seem puzzling. Suppose that the eye contained many distinct color sensors with different, narrowly defined bands of absorption. Although they might be as dose-packed as cones, the number of sensors for any particular frequency band in a fixed region would necessarily be fewer than if only three types of cones occupied the space, thereby sacrificing spatial color resolution. The human eye has evolved with a compromise of three sensors, which gives good color sensor density in the retina and a sufficient amount of color information to recompute the spectral information of the incident signal. Either the number of sensors or their density could be theoretically increased at the expense of the other.
Time averaged response
The chemical processes that occur inside a photoreceptor last several milliseconds, and additional photons that strike the receptor during that time add to the overall response. Thus the output of a receptor is really a time-averaged response, an effect called temporal smoothing. In effect, the sensors impose a low-pass filter over their time response, though the cutoff frequency of that filter changes with respect to the background light level: when there is little light arriving, there is little smoothing. The effect of temporal smoothing leads to the way we perceive light that blinks, or flickers. When the blinking is slow, we perceive the individual flashes of light. Above a certain rate, called the critical flicker frequency (or CFF), the flashes fuse together into a single continuous image. Far below that rate we see simply a series of still images, without an objectionable sense of near-continuity. Under the best conditions, the CFF for a human is around 60 Hz [389]. In contrast, a bee has a CFF of about 300 Hz. We note that as with most other visual phenomena, the flicker rate is dependent on many factors.
Signal transmission
The electric potential generated by a photoreceptor travels through a series of relay cells, and eventually results in a series of voltage pulses being transmitted along a nerve fibre to the brain. The rates at which these pulses are produced provide the signal modulation- a higher rate indicating a stronger signal, and a lower rate a weaker signal. Zero signal may be indicated by a resting rate, and rates lower than this can then indicate an opposite signal. The pulses themselves are all of the same amplitude, and it is only their frequency that carries information to the brain. The frequencies involved are typically from a few per second to around 400 per second. It might be thought that, as there are four different types of receptor, the rods and the three different types of cone, there would be four different types of signal, transmitted along four different types of nerve fibre, each indicating the strength of the response from one of the four receptor types. However, there is overwhelming evidence that this is not what happens. While much still remains unknown about the way in which the signals are encoded for transmission, the simple scheme shown below can be regarded as a plausible model. The strengths of the signals from the cones are represented by the symbols, ρ , γ ,and β (L, M, S).
Color constancy
The human visual system can compensate for different illumination conditions (e.g. sunlight vs tungsten bulb) in order to perceive the same colors in many different illumination environments. For the moment, we will assume that this means that the relative responses of the L, M and S being equal for white, grey and black objects regardless of the illumination. For example, humans can preceive grey objects as being grey and white objects as being white if they are placed in bright sunlight and if they are placed in the shade. The human visual system is somehow able to factor out the illumination from the properties of the object.
Relative descriptors
The terms lightness, chroma and saturation are terms used to describe the relative appearance of objects:
Lightness
The brightness of an area judged relative to the brightness of a similarly illuminated area that appears to be white or highly transmitting (adjectives: light and dark). In terms of signals, lightness could be something like A/An where An is the achromatic signal of a response for an appropriately chosen white (or highly transmitting material).
Chroma
The colourfulness of an area judged in proportion to the brightness of a similarly illuminated area that appears to be white or highly transmitting. In terms of signals, chora chould be C1/An (C1, a chromatic signal An the same as that defined for lightness).
Saturation
Colorfulness of an area judged in proportion to its brightness. Something like: C1/A, where A is the achromatic signal for the area in question.
More: Spectral sensitivity of rods and cones.
Signal transmission (strope frequency limit, saturation, integration).

Header: The human eye
Sources: James Ferwerda, Siggraph 2020

Header: The human eye
Sources: James Ferwerda, Siggraph 2020
Extra 1: Maybe use this image instead:

Title: Different spectra, same color
Q: Two different spectra that produce the same perceptual color are called [...].
A: metamers
Back only: The concept is called metamerism. (pronunciation emphasizes the "ta").
The great thing about metamerism is our ability to recreate colors using different spectra:
Source: James Ferwerda, Siggraph 2020

Title: CIE XYZ color matching curves
Q: For a given wavelength \( \lambda \) (x-axis), the 3 values of the X, Y and Z color matching functions represent the "amount" of [3 something] that combine to produce a light that is perceived as being [some other light].
A: the 3 hypothetical light sources; a pure light of wavelength \( \lambda \)
Back only: It's interesting to note that the lack of computers motivated the X, Y and Z functions to have the same integral area and for them to all be positive. This enabled easier calculations by humans.
The R, G and B color curves represent the same thing, but for physically realizable light. The values for the R, G and B function were determined by the below experiment.
Calculating XYZ values
You can calculate the XYZ values for some arbitrary light source if you know:
1. the spectral power distribution of this light source (the source SPD)
2. the surface spectral reflectance function (SRF)
3. the official XYZ function values
Source: James Ferwerda, Siggraph 2020

Title: Width of visible light waves
Q: The gray line represents a strand of [...], and the orange bar represents a [...].
A: spider silk; human hair
Back only: A strand of spider silk is visible to the human eye (apparently). So the wavelength of visible light is small, but not small enough to be difficult to conceptualized.

Sources: https://onlinelibrary-wiley-com.ez.wul.waseda.ac.jp/doi/pdf/10.1002/9781118653128

Title: Webber's law, Fechner's law and Stevens' law
Weber's Law
Weber, in the early 19th century, discovered that for a person lifting weights in an experiment, the just distinguishable additional weight depended proportionally on the weight of the original weight. In other words, if the original weight is \( I \) and the just distinguishable additional weight is \( \Delta I \), then \( \frac{\Delta l}{I} \) is a constant.
Fechner's Law
Fechner wished to derive a transformation that would transform the physical intensity scale to a "perceptual scale" where units on the perceputal scale corresponded to perceptual changes of the same magnitude.
Fechner started with two assumptions:
- Weber's law was valid.
- A just noticeable difference can be considered a unit of perception.
Stevens' law
Stevens showed that many relationships between just noticable differences and physical stimulus changes actually follow a power law. Steven's work finds its way into some fundamental aspects of color measurement.
Back only: More details
Below, the details on the front side are expanded upon.
Weber's law
Weber's law holds approximately for many perceptural stimuli. It can be used to explain why stars cannot be seen during the daytime. At night, the stars represnt a certain increment in intensity \( \delta I \) that is relatively large in comparison to the background intensity. Thus, \( \frac{\delta I}{I} \) is large enough to be perceptable. During the day, \( I \) is much larger and \( \frac{\delta I}{I} \) is smaller than \( \frac{\Delta I}{I} \).
Fechner's law
With Weber's law, on the physical scale, just noticeable differences are proportional to the current value. Having a scale that acts as the exponent will make just noticeable differences be constant in this scale. Thus, transforming the physical scale by taking the logarithm is what we need.
Fechner's law states that the perceived intensity of a stimulus is proportional to the logarithm of the physical stimulus intensity.
Fechner's law is why color is often manipulated in "perceptual linear" aka manipulating the exponent (the logorathim of the physical color value).
Source: Color Appearance Models, Fairchild