1

I'm learning about the trichromatic theory of color perception. Say a receptor detects a wavelength $\lambda\in\mathbb{R}$ and responds with $f(\lambda) = (r,g,b) \in \mathbb{R}^3$. This system is supposedly linear, so $f(n\lambda_1+\lambda_2) = nf(\lambda_1) + f(\lambda_2)$. However it is emphasized that the addition and scalar multiplication of wavelengths (left hand side) are not the "typical" ones on real numbers, and instead bear some physical meaning. The "addition" is really a simultaneous detection of two light sources with different wavelengths, and the "scalar multiplication" refers to a multiplied quantity of light at that wavelength.

My question is if this is contortion of the definition of linearity. If not, what vector space would $\lambda$ inhabit and would we need to supply a new addition definition for it?

Edit: I was asking specifically about linearity, if it's valid in a loose sense, and how to make it valid in a strict sense. I was already mostly knew the contents of the proposed duplicate post.

helixer
  • 13
  • relevant http://hyperphysics.phy-astr.gsu.edu/hbase/vision/colper.html – anna v Jan 19 '23 at 13:01
  • The wavelengths play the same role as indices in 3D vector space of vectors like $(v_1,v_2,v_3).$ In such finite-dimensional vector spaces we don't speak of linearity in terms of the indices 1,2,3, but rather in terms of the vector projections $v_1,$ $v_2,$ and $v_3$ on the coordinate axes, and their combinations. The same in infinite-dimensional vector space like here: we don't speak of linearity in terms of the indices $\lambda$, but instead in terms of the spectra, which play the role of vectors. – Ruslan Jan 20 '23 at 05:35

1 Answers1

1

(Note: I am not an expert on human eye color response or color spaces, so take what I'm saying with a grain of salt. For example, I am not sure if the response to different wavelengths combines in a way that is equivalent to a simple addition of responses. And it's very possible my wikipedia-level understanding of rod-and-cone cells is overly simplified.)

Light is detected in the eye through photoreceptor cells. So-called cone cells are responsible for detecting color.

Most people have red, green, and blue cone cells, which respond to light in approximately the following fashion (image from wikipedia)

enter image description here

If you were to observe a superposition of two wavelengths, one at $530\ {\rm nm}$ and one at $570\ {\rm nm}$, then you would observe a kind of "superposition of the responses" of these two wavelengths. In particular, you would observe a combination of green light and red light, which would appear as a kind of yellow light.

However, there is a subtlety in using the word "superposition" here, which is what I believe is behind your question. In particular, you cannot add $530+570=1100\ {\rm nm}$, and say that the combined response was "as if" you had measured $1100\ {\rm nm}$. As you can see from the figure, at $1100\ {\rm nm}$ the eye would have practically no response at all.

Therefore, I think it makes sense to model the eye's response to a superposition of wavelengths $\lambda_1$ and $\lambda_2$ as something like $$ f(\lambda_1) + f(\lambda_2) $$ where $f$ maps the wavelength to a color-vector using the three cone response functions in the figure. But, you cannot conclude $f$ is linear in the sense that $$ f(\lambda_1) + f(\lambda_2) \neq f(\lambda_1+\lambda_2). $$

Andrew
  • 48,573
  • Thanks. I understand it's not strictly linear given that you can't add wavelengths directly. But do you know if there is a way to define the domain of $f$ and addition on those numbers such that we can call it linear in the sense of your last equation? – helixer Jan 19 '23 at 13:14
  • *your last equation, but "=" lol – helixer Jan 19 '23 at 13:20
  • 1
    @helixer Color space theory is complicated. A lot of the technical information is behind paywalls, but the collection of Wikipedia articles provide an ok introduction. In particular, see the articles on the LMS color space and on CIELUV & CIELAB. – PM 2Ring Jan 19 '23 at 14:09
  • @helixer You may also like to look at some of Charles Poynton's articles on digital color. Some of that info is a bit dated (being from the CRT era), but it's still useful, IMHO. And you might like this blog post (which I just skimmed) on transforming spectral colors to XYZ & other color spaces. – PM 2Ring Jan 19 '23 at 14:14
  • @helixer Formally speaking you might be able to "one hot encode" the wavelength. That is, first, create $N$ wavelength bins that span the range of wavelengths that humans can see. Then create an $N$ dimensional vector. The $i$-th entry of this vector will tell you the intensity of wavelength $i$. Then if $u$, $v$ are two vectors in that space, and $f(u)$ gives the human eye response, perhaps $f(u+v)=f(u)+f(v)$ would be valid. I don't actually know if the relationship is truly linear, though -- I suspect not. (If nothing else I imagine the response saturates at some point). – Andrew Jan 19 '23 at 14:24
  • The one hot representation works for me. @PM2Ring Thanks for the additional resources. – helixer Jan 19 '23 at 22:55
  • @helixer In retrospect "one hot encoding" isn't really the right technical term. That's when you represent, say, a letter as a vector in a 26 dimensional space with one $1$ at the index position of the letter and $0$'s everywhere else. In the formalism I'm suggesting, the entries aren't only $1$ and $0$, so it's not really "one hot." It doesn't really matter, but just maybe don't repeat that name to anyone else if you end up using this :) – Andrew Jan 19 '23 at 23:01
  • @Andrew ha okay. I forgot about the scaling requirement so I subconsciously took it as a true one-hot encoding when I read it. But what about this idea: if I remember functions form a vector space. So why not represent each input to $f$ as a "luminance" function $l\in\mathcal{L}$ mapping wavelength to intensity. Then addition and scaling are easily defined, and $f: \mathcal{L} \rightarrow \mathbb{R}^3$? – helixer Jan 20 '23 at 00:22