Pages: [1] 2   Go Down

Author Topic: Brilliant explanation of color etc  (Read 20687 times)

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Brilliant explanation of color etc
« on: October 03, 2014, 10:42:13 am »

Hi,

I came across this series, which is part of a course given at Standford: http://graphics.stanford.edu/courses/cs178/applets/applets.html#color

It's absolutely brilliant and well worth having a look at.  There are some wonderful applets that animate and demonstrate things like color spaces and mapping and much more.  The course also covers exposure, focus, lenses, camera systems etc.

Robert
Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

PeterAit

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4559
    • Peter Aitken Photographs
Re: Brilliant explanation of color etc
« Reply #1 on: October 03, 2014, 11:01:26 am »

Wow, these look really great! I am eagerly anticipating finding the time to explore them in detail. Thanks for the post!
Logged

Simon Garrett

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 742
Re: Brilliant explanation of color etc
« Reply #2 on: October 03, 2014, 01:23:01 pm »

Thanks for posting.

The gamma applet and supporting text is worth a read for anyone that is confused about Tone Response Curves (which includes the authors of most books and articles I've read on the subject). 

The take-away that is often missed: the overall system gamma should be 1.0.  It has to be, or the image wouldn't look like the original scene. 
Logged

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Re: Brilliant explanation of color etc
« Reply #3 on: October 03, 2014, 02:44:50 pm »

Yes, it takes a bit of reading through (I found it a bit heavy going the first read through but the second read pretty much clarified things). 

But even the first time through there are really interesting snippets, like the gamut of a digital camera like the Canon D30 (surprising how much of the camera's gamut is outside human vision, and also how much of human vision exceeds it: certainly not a perfect match!). 

And the animation on gamut mapping is also very clear: it does show the mapping without any attempt to soften the compression or clipping, but it is entirely within the ICC spec, so any implementation will only be able to make the color shifts less drastic, not change the basic principles.

Robert
Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Brilliant explanation of color etc
« Reply #4 on: October 03, 2014, 03:24:08 pm »

But even the first time through there are really interesting snippets, like the gamut of a digital camera like the Canon D30 (surprising how much of the camera's gamut is outside human vision, and also how much of human vision exceeds it: certainly not a perfect match!). 
Robert

Robert,

Thanks for posting this. It looks very good. However, I don't understand your statement about the gamuts of the Canon and Human vision. The gamuts of human vision and the Canon are superimposed below. I would say there is a pretty good match.

Bill
Logged

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Re: Brilliant explanation of color etc
« Reply #5 on: October 03, 2014, 04:48:36 pm »

Robert,

Thanks for posting this. It looks very good. However, I don't understand your statement about the gamuts of the Canon and Human vision. The gamuts of human vision and the Canon are superimposed below. I would say there is a pretty good match.

Bill

Hi Bill,

Well, if you superimpose the plots you'll see that the tristimulus green sensitivity matches well, the blue not so well and the red very badly.  The result in the 3D mapping is to have large mismatches, with the 30D by-and-large being significantly wider than human vision, but in places smaller.  I've shown the 30D in gray and human vision in color.

Of course I'm relying on the applet to give me this information ... I guess it could be wrong.

Robert

Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Brilliant explanation of color etc
« Reply #6 on: October 03, 2014, 07:33:37 pm »

Hi Bill,

Well, if you superimpose the plots you'll see that the tristimulus green sensitivity matches well, the blue not so well and the red very badly.  The result in the 3D mapping is to have large mismatches, with the 30D by-and-large being significantly wider than human vision, but in places smaller.  I've shown the 30D in gray and human vision in color.

Of course I'm relying on the applet to give me this information ... I guess it could be wrong.

Robert



Robert,

You are correct. I was looking only at the two extremes of the plots. A sensor meets the Luther-Ives criterion if its spectral response represents linear combinations of the eye cone response functions l, m, and s. As a simplification, I imagine that the red (l) response of the Canon departs from a linear combination in the red wavelengths since it has a different shape and its response is not proportional to the l (red) cone response. Does this make sense? Doug Kerr gives a useful summary, but it is somewhat dense in some areas.

Regards,

Bill
Logged

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Re: Brilliant explanation of color etc
« Reply #7 on: October 04, 2014, 04:29:02 am »

Robert,

You are correct. I was looking only at the two extremes of the plots. A sensor meets the Luther-Ives criterion if its spectral response represents linear combinations of the eye cone response functions l, m, and s. As a simplification, I imagine that the red (l) response of the Canon departs from a linear combination in the red wavelengths since it has a different shape and its response is not proportional to the l (red) cone response. Does this make sense? Doug Kerr gives a useful summary, but it is somewhat dense in some areas.

Regards,

Bill

Hi Bill,

Yes, sort of ... I think!  My understanding is that the camera response curves will never be the same as the eye's because of the technical difficulties of achieving this, so the XYZ locus is always going to be different. However this doesn't necessarily mean that the camera response curves cannot be represented as linear combinations of the visual response curves, in which case it should be possible to transform the camera's response curves to the visual response curves.  This paper talks about it: http://www.jimworthey.com/Poster_CIC14.pdf.  

Have I understood this correctly?  Or in simple terms, even if the camera's RGB data is different to the eye's RGB data, it's possible (at least in theory) to correct the camera data, providing that it is essentially linear (like the eye).

I would have thought that even if the camera response is not linear, that it should still be possible to transform the data to match the visual response ... but in that case it couldn't be done using a simple mathematical function, but would need something like a table-based profile.

The essential thing is that the camera captures light in the same wavelength band as the eye (which the D30 appears to do) ... anything in the uv or ir range would just be lost (meaning a lower efficiency of the sensels).

A simple explanation of all of this would be interesting (and welcome!).

Robert

« Last Edit: October 04, 2014, 04:31:07 am by Robert Ardill »
Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

Alan Klein

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 15850
    • Flicker photos
Re: Brilliant explanation of color etc
« Reply #8 on: October 04, 2014, 11:58:14 pm »

Yet somehow the eye and brain seem to interpret the capture RGB from the camera well enough that we accept the colors as "normal"  in most cases.    Exceptions usually are when we have the while balance incorrectly set.  So what is the practical point that the phone and eye  have different curves?

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Re: Brilliant explanation of color etc
« Reply #9 on: October 05, 2014, 03:03:27 am »

Yet somehow the eye and brain seem to interpret the capture RGB from the camera well enough that we accept the colors as "normal"  in most cases.    Exceptions usually are when we have the while balance incorrectly set.  So what is the practical point that the phone and eye  have different curves?

I think we see the images correctly because we are not viewing the raw image directly: either the camera or raw converter is mapping from the camera response curves to the human response curves.  It seems that as long as both are linear (as they appear to be) that this mapping is possible.  But I guess it does mean that there might be small (but probably insignificant) mismatches (that we can correct easily enough in the raw converter ... not so easily with a camera-generated sRGB image).

Robert
Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

bjanes

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3387
Re: Brilliant explanation of color etc
« Reply #10 on: October 05, 2014, 10:09:19 am »

Yet somehow the eye and brain seem to interpret the capture RGB from the camera well enough that we accept the colors as "normal"  in most cases.    Exceptions usually are when we have the while balance incorrectly set.  So what is the practical point that the phone and eye  have different curves?

Look at the DXO site for an explanation of the sensitivity metamerism index. This is calculated by photographing a target with known color values and comparing the resulting image with the correct values. The difference can be expressed as a Delta E value. See Norman Koren for how Delta E is calculated.

Metameric failure is most problematic with so called memory colors such as blue sky, foliage, and skin tones. Color accuracy is also important in reproducing art work and with catalogs showing clothing and other items that must be reproduced failthfully.

Bill
Logged

MarkM

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 428
    • Alaska Photographer Mark Meyer
Re: Brilliant explanation of color etc
« Reply #11 on: October 06, 2014, 01:06:21 am »

Hi Bill,

Well, if you superimpose the plots you'll see that the tristimulus green sensitivity matches well, the blue not so well and the red very badly.  The result in the 3D mapping is to have large mismatches, with the 30D by-and-large being significantly wider than human vision, but in places smaller.  I've shown the 30D in gray and human vision in color.

Of course I'm relying on the applet to give me this information ... I guess it could be wrong.

Robert



It's not clear that you can superimpose one graph on top of another in a meaningful way. The graph isn't showing a gamut in the sense of a plot in LAB or XYZ space. It is simply taking the scaled response functions and plotting them on three independent axis rather of three separate functions. The way it works becomes clear if you use the single wavelength slider. I don't think you can make any meaningful conclusions about color gamuts from this graph. The reason the 3D plot extends out further on the B-G plane for the 30D is because its blue and green sensitive functions overlap more.
« Last Edit: October 06, 2014, 02:42:35 pm by MarkM »
Logged

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Re: Brilliant explanation of color etc
« Reply #12 on: October 06, 2014, 03:45:07 pm »

It's not clear that you can superimpose one graph on top of another in a meaningful way. The graph isn't showing a gamut in the sense of a plot in LAB or XYZ space. It is simply taking the scaled response functions and plotting them on three independent axis rather of three separate functions. The way it works becomes clear if you use the single wavelength slider. I don't think you can make any meaningful conclusions about color gamuts from this graph. The reason the 3D plot extends out further on the B-G plane for the 30D is because its blue and green sensitive functions overlap more.

This is something that Bill might be able to explain to us better.  My understanding is this:
  • The 3-dimensional plot is simply that: it shows the summation of the tristimulus values at every point in the spectrum on the 3 rho, gamma and beta axes (which correspond to the rgb cones in our eyes)
  • The curve can be mapped to RGB axes (or to XYZ axes, or to any other coordinates we want) just by defining these new axes.
  • We then get the gamut by drawing a plane at RGB=1 (or XYZ=1 ... etc).  This represents the maximum intensity and the sum of R+G+B will be 1 at every point on this plane.
  • Clearly different curves will result in different planes (since the RGB=1 points will be different), and so the gamuts will be different.

If that's correct, then the gamut of a person's vision and the gamut of a camera will not be the same ... at least not without correction to the camera's SPD.

But perhaps Bill, or someone who understands these things fully, could clarify things for us.

Robert
Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

MarkM

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 428
    • Alaska Photographer Mark Meyer
Re: Brilliant explanation of color etc
« Reply #13 on: October 06, 2014, 04:24:22 pm »

This is something that Bill might be able to explain to us better.  My understanding is this:
  • The 3-dimensional plot is simply that: it shows the summation of the tristimulus values at every point in the spectrum on the 3 rho, gamma and beta axes (which correspond to the rgb cones in our eyes)
  • The curve can be mapped to RGB axes (or to XYZ axes, or to any other coordinates we want) just by defining these new axes.
  • We then get the gamut by drawing a plane at RGB=1 (or XYZ=1 ... etc).  This represents the maximum intensity and the sum of R+G+B will be 1 at every point on this plane.
  • Clearly different curves will result in different planes (since the RGB=1 points will be different), and so the gamuts will be different.

If that's correct, then the gamut of a person's vision and the gamut of a camera will not be the same ... at least not without correction to the camera's SPD.

But perhaps Bill, or someone who understands these things fully, could clarify things for us.

Robert

There's a lot of misunderstandings here Robert. Most come from treating scaled response functions and relative filter transmission functions as if they were absolute tristimulus values in the same sense the CIE XYZ values are, and trying to compare them on the same set of axis. But the easiest way to see the problem of interpreting the graph this was is to look a single color.

Take for example the pure spectral cyan color in the neighborhood of 470nm. If you find this color on the graph of the 30D transmission functions it will sit way out in the blue/green plane about where orange arrow crosses the grey line in your illustration above. By your interpretation then, this should then be outside the gamut of human colors because it is outside the superimposed line of the human response function. But clearly, 470nm light is visible to us. In this graph, because both the the grey line from the camera and the colored one from humans represent the spectral colors, they are, by definition, in the gamut of human visions and in fact represent the same colors.

If the camera had a greater gamut than human vision you should be able to show a spectral power distribution that the camera recognizes as a color, but which we don't. The only way that will happen is if the camera sees a wider range of wavelengths than we do. If the graphs on the website are reasonable accurate, it looks like the camera and the human eye are seeing about the same range of colors. Because the response functions seem to be different shapes, it's possible that two different spectral power arrangements might be a metameric match for one and not the other, but that's a different subject.
Logged

Robert Ardill

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 658
    • Images of Ireland
Re: Brilliant explanation of color etc
« Reply #14 on: October 06, 2014, 06:44:32 pm »

There's a lot of misunderstandings here Robert. Most come from treating scaled response functions and relative filter transmission functions as if they were absolute tristimulus values in the same sense the CIE XYZ values are, and trying to compare them on the same set of axis. But the easiest way to see the problem of interpreting the graph this was is to look a single color.

Take for example the pure spectral cyan color in the neighborhood of 470nm. If you find this color on the graph of the 30D transmission functions it will sit way out in the blue/green plane about where orange arrow crosses the grey line in your illustration above. By your interpretation then, this should then be outside the gamut of human colors because it is outside the superimposed line of the human response function. But clearly, 470nm light is visible to us. In this graph, because both the the grey line from the camera and the colored one from humans represent the spectral colors, they are, by definition, in the gamut of human visions and in fact represent the same colors.

If the camera had a greater gamut than human vision you should be able to show a spectral power distribution that the camera recognizes as a color, but which we don't. The only way that will happen is if the camera sees a wider range of wavelengths than we do. If the graphs on the website are reasonable accurate, it looks like the camera and the human eye are seeing about the same range of colors. Because the response functions seem to be different shapes, it's possible that two different spectral power arrangements might be a metameric match for one and not the other, but that's a different subject.

Hi Mark,

I really don't pretend to fully understand this (but I would like to, so I hope your comments and those of others will help me to).

Quoting the Stanford notes:

"To see a really weird animal, click on the "Canon 30D". The sensor of this high-end consumer camera is covered with a mosaic of three types of colored filters. The relative transmissivities of these filters to light of various wavelengths is shown by the graphs. Look at the locus of spectral colors in the camera's 3D colorspace; it looks different than a human's. This suggests there are colors we can see that are indistinguishable to a Canon camera. It also suggests there are colors a Canon camera can distinguish that we cannot. However, these effects are likely to be subtle. Ideally, you want the transmissivity functions of the color filters in a camera to match the sensitivity functions of a human with normal vision, so that metamers to one system are also metamers to the other. "

This would seem to indicate (if the notes are correct) that the gamut of human vision and a 30D is different.  But they say "it suggests", and "likely to be subtle".  Your points also make sense to me: the range of both human vision and the 30D is essentially the same.  What is different is the SPD, so that the relative intensity of the colors will be different between humans and 30Ds (but can be corrected to match).

The gamut plots from the lecture notes are also not quite clear:



It seems that the axes for the human are shown as rho, gamma, beta, whereas for the 30D they are shown as RGB ... which would account for the apparent difference in gamut.  we would need to do the plot on the same axes to show the differences, if any.

Robert
Logged
Those who cannot remember the past are condemned to repeat it. - George Santayana

MarkM

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 428
    • Alaska Photographer Mark Meyer
Re: Brilliant explanation of color etc
« Reply #15 on: October 06, 2014, 07:49:01 pm »

It also suggests there are colors a Canon camera can distinguish that we cannot. However, these effects are likely to be subtle. Ideally, you want the transmissivity functions of the color filters in a camera to match the sensitivity functions of a human with normal vision, so that metamers to one system are also metamers to the other. "

This would seem to indicate (if the notes are correct) that the gamut of human vision and a 30D is different.  But they say "it suggests", and "likely to be subtle". 

None of this has anything to do with the gamut of colors. The quoted passage is talking about metamers. A metameric match happens when we are given two different spectral power distributions, but see the same color. For example we might have a color made up of almost pure cyan with a SPD consisting of a spike in the mid 400 nanometers. We could then look at a different stimulus with two spikes one in the blues and one in the greens. Even though the SPDs are very different they could look identical to us if the SPD was just right. This happens because the cone response is the same for both stimuli. We would call that a metameric match—two different power distributions, one color perception. If we suddenly had a different response function or were using instrument (like a camera) with a different response, then these two power distribution might no longer match. We would still see the color, but the one might be shifted a little more blue than cyan or more green, etc.

The part of the graph that lets you show a gamut requires that you identify three primaries which will be additively mixed. Of course three primaries will define a gamut because you can't additively mix those primaries and get a color outside the triangle that they define. But the triangle isn't the gamut of the camera or the eye—it's the gamut defined by the primaries in the same way that sRGB is defined by primaries. If it were the eye's gamut, this would suggest the all the spectral colors except the three chosen primaries are out of the gamut of our eyes, which of course they're not. I'm not sure how it's useful to see this gamut plotted in the space made up of cone responses, but I guess it's kind of interesting.
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Brilliant explanation of color etc
« Reply #16 on: October 06, 2014, 07:55:45 pm »

The take-away that is often missed: the overall system gamma should be 1.0.  It has to be, or the image wouldn't look like the original scene. 

That depends on the viewing conditions. The target system gamma for color slides is about 1.5, because they are expected to be viewed with a dark surround. If you're projecting your work in a dark room, you'll want to do something along those lines to compensate.

Reference: R.W.G. Hunt, "The Reproduction of Color", Fourth Edition, page 56.

Jim

MarkM

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 428
    • Alaska Photographer Mark Meyer
Re: Brilliant explanation of color etc
« Reply #17 on: October 06, 2014, 08:00:56 pm »

Hi Jim,

Glad to see you on this thread. Does the way this website is presenting color by using these 3D cone response plots make any sense to you? I can't figure out why they would want to talk about color gamuts in a space made of up sensor filter transmissivities and cone responses rather than traditional CIE spaces. It seems like a method almost guaranteed to be confusing and misinterpreted. Curious if you've come across this approach before.
Logged

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Brilliant explanation of color etc
« Reply #18 on: October 06, 2014, 08:12:53 pm »

Does the way this website is presenting color by using these 3D cone response plots make any sense to you? I can't figure out why they would want to talk about color gamuts in a space made of up sensor filter transmissivities and cone responses rather than traditional CIE spaces. It seems like a method almost guaranteed to be confusing and misinterpreted. Curious if you've come across this approach before.

Mark, now I'm gonna have to look at the material, instead of just responding to posts here while I wait for Matlab to do more color space conversion accuracy runs.

Give me a day or so, please.

Jim

Jim Kasson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 2370
    • The Last Word
Re: Brilliant explanation of color etc
« Reply #19 on: October 06, 2014, 08:27:44 pm »

Does the way this website is presenting color by using these 3D cone response plots make any sense to you?

I haven't gotten very far, but this made me react: "It also suggests there are colors a Canon camera can distinguish that we cannot."

He's talking about capture metameric error, AFAICT. If that's right, the author's definition of color is different from mine. I interpret color to mean normal human tristimulus response to input spectra. It looks like the author is using color to mean response of some arbitrary three-part capture system to spectral input. To my mind, color is defined by human response. If two spectra match for, say, the 1931 observer, they are the same color. If they don't, they aren't. It's a little wiggly because there is more than one standard observer, but you get the idea.

Jim

Pages: [1] 2   Go Up