Some observations on handling greens and violet in raw conversion

Erik Kaffehr

Veteran Member
Messages
7,740
Solutions
7
Reaction score
5,124
Location
Nyköping, SE
Hi,

I have shot a simple subject for checking out handling of greens on my P45+. The subject was a simple fllower, primula vulgaris (I think). It has violet/yellow blades. I also shot the same subject with my Sony Alpha 99.

I did expect some yellow contamination in the green, what I wanted to see was if this contamination, if present, could be reduced using DCP profiles.

What I have found was that Capture One reproduced the violet of the flower as clear blue, see below:

P45+ image processed by Capture One

P45+ image processed by Capture One

While Adobe Standard profile in Lightroon 5.7 gave a decent rendition:

P45+ image processed in LR 5 using Adobe Standard profile

P45+ image processed in LR 5 using Adobe Standard profile

Here are some measured colour patches:

Blade green as measured by ColorMunki Photo

Blade green as measured by ColorMunki Photo

Violet samples measured with ColourMunki Photo.

Violet samples measured with ColourMunki Photo.

All conversions are shown here

And raw images and patch data are here

Any comments, explanations would be much appreciated.



Best regards

Erik
 
I did expect some yellow contamination in the green, what I wanted to see was if this contamination, if present, could be reduced using DCP profiles.

What I have found was that Capture One reproduced the violet of the flower as clear blue, see below:
We have a problem: pure spectral violet has a purple color but so does a mixture of red and blue light, taken from the opposite sides of the spectrum. If the flowers do indeed reflect a mixture of red and blue light, then we should expect them to look purple, but if they only reflect the far blue part of the spectrum, then reproducing the purple color can be problematic.
Any comments, explanations would be much appreciated.
If a camera is to capture spectral violet, and make it distinguishable from blue, then the sensitivity of the red color channel must somehow have a distinct ‘hump’ in the end of the blue region of the spectrum. If that hump is not clearly present, it might be difficult to capture that color, and even if it is, there still might be other factors that eliminate it.

But camera calibration is something of an art, and it is not a purely objective and scientific process: there are always compromises and engineering trade-offs, as well as plenty of human psychological effects and aesthetic choices that must be made. Also, there are other factors including computer performance limits, inaccuracies in measuring colors, problems with automatic white balance, uncertainties with the choice of statistical methods, and difficulties with standard color spaces.

For example, in some standard color spaces, the hue changes with brightness, which is called a color ‘twist’. You might find that a purple color turns blue when it is brightened. Sometimes accurate color means excessive noise: we see this especially in Sigma camera, but even some Bayer filter cameras have excess noise in certain colors simply because they have broader color filters compared to some others with narrower filters. Some camera profiles attempt to provide good skin color at the expense of other colors.

Good color may require computational power that is unrealistic to expect on mid-priced cameras; even a relatively high-end computer might spend several minutes processing an image in order to squeeze high quality out of it. Computational short-cuts or simple low-bit-count integer arithmetic might harm certain colors or produce excess noise in some hues.

Regarding foliage, many cameras do render it as more yellow-green than purer green, and some brands or models arguably do produce better foliage colors than others, although this might be adjustable in raw processing. But don’t discount the possibility that the eye in daylight might not detect the same hue compared to viewing even an accurate image presented at small size and on a low contrast output medium.

We simply don’t have enough good color science, and even if we do have better science, it hasn’t tricked down to practical photographic software yet. Good, complete camera calibration requires expensive laboratories as well as competent, highly-trained staff. Also, some of that color science requires extremely fast computer hardware to compute quickly, and we need experienced programmers who are able to program specialized graphics processors: in the meantime, are you willing to wait hours or days for a raw image to render completely?

In the meantime, we simply have to accept that good enough is probably good enough. Sometimes there will be big mistakes, like with your purple flowers, and this will require work to come up with an ad-hoc solution. When I have a color-sensitive client, I find that I spend hours doing custom color correction: while it would be nice to have accurate colors ahead of time, I know enough that I shouldn’t expect it.
 
What I have found was that Capture One reproduced the violet of the flower as clear blue, see below:
We have a problem: pure spectral violet has a purple color but so does a mixture of red and blue light, taken from the opposite sides of the spectrum. If the flowers do indeed reflect a mixture of red and blue light, then we should expect them to look purple, but if they only reflect the far blue part of the spectrum, then reproducing the purple color can be problematic.
Any comments, explanations would be much appreciated.
If a camera is to capture spectral violet, and make it distinguishable from blue, then the sensitivity of the red color channel must somehow have a distinct ‘hump’ in the end of the blue region of the spectrum. If that hump is not clearly present, it might be difficult to capture that color, and even if it is, there still might be other factors that eliminate it.
Hi, Erik. Fancy seeing you here.

If what Mark is talking about is what's going on (to some extent; note the Lr violet), the name for it is capture metameric error. The camera's filters aren't a 3x3 matrix multiply away from those in the putatively normal 1931 Standard Observer. Once two different spectra that are also different to the Standard Observer are captured as the same RGB triplet, no profile that is based on point processes, no matter how sophisticated, can tell them apart.

There are at least two paths for solutions. You could use neighborhood processes, a database of natural and artificial subject matter, and heuristics. There is potential there, but it's a lot of work, and has the potential to, when it gets the color wrong, to get it really wrong. Or, you could work on the CFA spectral responses. The problem with this is that, as you get closer to ones that are what you want, the SNR in the converted, say, Adobe RGB, image goes down.

Adding a fourth (or 5th or 6th) filter is, IMHO, a better way to go to improve color accuracy. But then you start to lose resolution. I don't think it will happen until people demand greater accuracy than they can get with the present ways of doing things, and I don't see that happening.

Jim
 
Erik, looking at your violet spectra (sorry I didn't take time to pretty up the graph):

556b7340d63d4c4fab5fc25f08cf0d58.jpg.png


It doesn't look like we're dealing with spectral violet here, just red and blue light that's mixed. Don't know why that's particularly hard.

Jim

--
http://blog.kasson.com
 
Last edited:
Is that a spectrum reflected from an actual primrose? Otherwise, sRGB images of violet will certainly be a mixture of red and blue.

--

 
Is that a spectrum reflected from an actual primrose? Otherwise, sRGB images of violet will certainly be a mixture of red and blue.
I assumed it was; otherwise, what's the point?

Erik, please clarify.

Thanks,

Jim
 
Is that a spectrum reflected from an actual primrose? Otherwise, sRGB images of violet will certainly be a mixture of red and blue.
I assumed it was; otherwise, what's the point?
My point was if the primrose color is spectral violet — and not a mixture of red and blue — then it is entirely plausible that some raw converters might have trouble rendering the color well.
But we have no way of knowing from examining an sRGB photograph.
 
Is that a spectrum reflected from an actual primrose? Otherwise, sRGB images of violet will certainly be a mixture of red and blue.
I assumed it was; otherwise, what's the point?
My point was if the primrose color is spectral violet — and not a mixture of red and blue — then it is entirely plausible that some raw converters might have trouble rendering the color well.

But we have no way of knowing from examining an sRGB photograph.
Yes, Mark, I got that from the yellow quote above. We need Erik to weigh in on this. There's no point in looking at sRGB spectra to get color; it's defined by the RGB triplet. I thought the violet spectrum that Erik linked to in his original post was that of the flower. Erik, is it?

Jim
 
Yes, Mark, I got that from the yellow quote above. We need Erik to weigh in on this. There's no point in looking at sRGB spectra to get color; it's defined by the RGB triplet. I thought the violet spectrum that Erik linked to in his original post was that of the flower.
You are right, sorry I wasn’t paying enough attention to what you were doing. Yes, the flower does not appear to be spectral violet but just purple.

But in my experience, that is a tricky part of the color wheel to get right in post-processing. Lately I had a client who wanted photos of a room with a dark navy blue sofa: in my well-exposed photos, the color became a surprisingly pale sky blue, and making a color profile of the scene from an X-Rite ColorChecker Passport target didn’t help; and I tried using both the Adobe and the X-Rite software.

In Photoshop, I used various methods to force the color; not only did the color shift from blue to indigo to purple depending on brightness, it also exhibited a horrendous moiré pattern, which led to many unprofitable hours of retouching.

Since then I have better luck doing my color corrections in linear 32-bit mode, but I still find the whole experience somewhat puzzling.

--

 
Hi,

Sorry for not responding, I had a bad cold…

The spectral images were measured on green leaf and flower blade using a Color Munki Photo, and each patch represents a different sample.

This shows two patches of the green blade:

2d493997f2b146d0bb79bfc825780ad8.jpg.png


While this one shows the violet spectrum

Violet spectrum (all three patches essentially equal)

Violet spectrum (all three patches essentially equal)

What is interesting that Lightroom, especially with DNG Color Profiles generated in a similar shooting situation reproduced the violets pretty well. For instance, XRites colour picker identified the actual samples from the flower blade as Pantone 268C and Photoshop also identifies patches from the Lightroom processed images as Pantone 268C, but the Capture One processed image Pantone Blue 072C. So, in this case Lightroom arrives to a very good approximation of the correct colour while Capture One interprets the exactly same stimuli as clear blue.

Best regards

Erik
 
Last edited:
If a camera is to capture spectral violet, and make it distinguishable from blue, then the sensitivity of the red color channel must somehow have a distinct ‘hump’ in the end of the blue region of the spectrum.
Thank you! For some time, I have been wondering how a camera and raw converter records and interprets the difference between blue and violet.

I was actually wondering if the raw converter would somehow use the overlap of the blue and green channel sensitivity in the range above 450 nm. If there is blue without green in the photo, it could be interpreted as a sign that the wavelength was below 450 nm, and then the raw converter could mix in some red to make a purple approximation of the violet light.

Of course this would be a very dangerous way to do it because the correction would be very unlinear. And even if you do a colour calibration with a standard target, there would probably be too few different patches in this colour area to create a non-linear correction with the correct shape. Further, any presence of actual green light in combination with the violet light would seriously throw off the result.

So I am happy to hear that the answer is much more simple: The red channel is sensitive to violet and the red will consequently be mixed in automatically without any mangling of the colours.

Looking at the spectral response curves on this page confirms this, at last for the Canon 40D which has a very nice and significant red hump which cuts off sharply above 450 nm. But there are also cameras on the same page with a less significant hump, and for the Nikon D300, the hump is completely missing.

Which leads me to my questions:

What does a raw converter do to create accurate colours when it handles photos from a camera without a red sensitivity hump below 450 nm?

Is the P45+ such a camera (back)?
 
If a camera is to capture spectral violet, and make it distinguishable from blue, then the sensitivity of the red color channel must somehow have a distinct ‘hump’ in the end of the blue region of the spectrum.
Thank you! For some time, I have been wondering how a camera and raw converter records and interprets the difference between blue and violet.

I was actually wondering if the raw converter would somehow use the overlap of the blue and green channel sensitivity in the range above 450 nm. If there is blue without green in the photo, it could be interpreted as a sign that the wavelength was below 450 nm, and then the raw converter could mix in some red to make a purple approximation of the violet light.
That makes sense. All that is needed is unique differences between the colors than can be detected.
Of course this would be a very dangerous way to do it because the correction would be very unlinear. And even if you do a colour calibration with a standard target, there would probably be too few different patches in this colour area to create a non-linear correction with the correct shape. Further, any presence of actual green light in combination with the violet light would seriously throw off the result.
Yes, too often the simple 18-color X-Rite target is deemed good enough but can lead to problems with data fitting. More colors are better, but support for those targets gets rather expensive quickly.

And I wouldn’t think that this is the best method of camera calibration anyway.

But yes, those who are in the know say that just about all color cameras produced these days have non-linear color adjustments. I’d think that this is a good field for further research because I’ve see too many adjustments which change hue depending on lightness, and some may not provide subtle enough adjustments in all hue ranges.
So I am happy to hear that the answer is much more simple: The red channel is sensitive to violet and the red will consequently be mixed in automatically without any mangling of the colours.

Looking at the spectral response curves on this page confirms this, at last for the Canon 40D which has a very nice and significant red hump which cuts off sharply above 450 nm. But there are also cameras on the same page with a less significant hump, and for the Nikon D300, the hump is completely missing.

Which leads me to my questions:

What does a raw converter do to create accurate colours when it handles photos from a camera without a red sensitivity hump below 450 nm?
As mentioned, all that is needed is that some combination of input channels be unique for each color. While a hump in the red channel would certainly make the coefficients of the conversion matrix smaller (leading to less noise) that is not strictly needed. Sigma cameras have some prodigious math in their color conversion, which hurts their high ISO performance, but you still get good enough color from them.
 
Allan Olesen wrote:

Mark Scott Abeln wrote:

If a camera is to capture spectral violet, and make it distinguishable from blue, then the sensitivity of the red color channel must somehow have a distinct ‘hump’ in the end of the blue region of the spectrum.

Thank you! For some time, I have been wondering how a camera and raw converter records and interprets the difference between blue and violet.

I was actually wondering if the raw converter would somehow use the overlap of the blue and green channel sensitivity in the range above 450 nm. If there is blue without green in the photo, it could be interpreted as a sign that the wavelength was below 450 nm, and then the raw converter could mix in some red to make a purple approximation of the violet light.

Of course this would be a very dangerous way to do it because the correction would be very unlinear. And even if you do a colour calibration with a standard target, there would probably be too few different patches in this colour area to create a non-linear correction with the correct shape. Further, any presence of actual green light in combination with the violet light would seriously throw off the result.

So I am happy to hear that the answer is much more simple: The red channel is sensitive to violet and the red will consequently be mixed in automatically without any mangling of the colours.

Looking at the spectral response curves on this page confirms this, at last for the Canon 40D which has a very nice and significant red hump which cuts off sharply above 450 nm. But there are also cameras on the same page with a less significant hump, and for the Nikon D300, the hump is completely missing.

Which leads me to my questions:

What does a raw converter do to create accurate colours when it handles photos from a camera without a red sensitivity hump below 450 nm?

Is the P45+ such a camera (back)?

Hi,



Spectral response according to Kodak

Spectral response according to Kodak

Your point that the violet may be a spectral colour is interesting. It is also interesting most converters reproduce it pretty well, but that may not because of red sensitivity around 450 nm but about blue sesnsivity at 450 nm and red sensivity at 650-730 nm.



Reflectance spectrum of flower blade.

Reflectance spectrum of flower blade.

It is sort of interesting, comparing to human vision:



2000px-Cones_SMJ2_E.svg.png


Best regards

Erik



--
Erik Kaffehr
Website: http://echophoto.dnsalias.net
Gallery: http://echophoto.smugmug.com
Articles: http://echophoto.dnsalias.net/ekr/index.php/photoarticles
 
This shows two patches of the green blade:

2d493997f2b146d0bb79bfc825780ad8.jpg.png


While this one shows the violet spectrum

Violet spectrum (all three patches essentially equal)

Violet spectrum (all three patches essentially equal)
Erik, looking at those two curves and extrapolating, it looks like both the leaf and the flower have strong near-infrared reflectivity. I'm wondering if C1 isn't trying to do something to compensate for IR contamination in your camera and going too far. If it thought a lot of the red energy in the flower was IR contamination, it would discount it and you'd end up with a blue flower.

Jiust a thought...

Jim

--
 
Hi,

Spectral response according to Kodak

Spectral response according to Kodak
Hm. Not much humping going on there. So I guess it is such a camera.
Your point that the violet may be a spectral colour is interesting.
I assumed that was your own premise for this thread - that you had tried to take a photo of something which was pure violet and not purple?
It is also interesting most converters reproduce it pretty well, but that may not because of red sensitivity around 450 nm but about blue sesnsivity at 450 nm and red sensivity at 650-730 nm.
I don't understand. If it is a spectral colour (violet) and not a mixture of two spectral colours (red and blue leading to purple), then red sensitivity at 650-730 nm should not matter.

Reflectance spectrum of flower blade.

Reflectance spectrum of flower blade.
Well I guess that is actually purple, not violet.
 
Erik Kaffehr wrote:
Is the P45+ such a camera (back)?

Spectral response according to Kodak

Spectral response according to Kodak
Erik, is that before the IR filter is applied? Because if it's not, it looks like a recipe for IR contamination.

Jim

--
http://blog.kasson.com
Jim,

I don't know! I have not seen anyone complaining about IR contamination on the P45+ sensor, and I have any of those violet brown casts on shots of my antracite coloured photo backs.



The figure is coming from the KAF 3900 spec. sheet by Kodak.



Regarding the violets, all raw converters I tested give reasonable representation, except Capture One. If I look at both greens and violets, I would say that AccuRaw makes a decent job.



Best regards

Erik



Best regards

Erik

--
Erik Kaffehr
Website: http://echophoto.dnsalias.net
Gallery: http://echophoto.smugmug.com
Articles: http://echophoto.dnsalias.net/ekr/index.php/photoarticles
 
I don't understand. If it is a spectral colour (violet) and not a mixture of two spectral colours (red and blue leading to purple), then red sensitivity at 650-730 nm should not matter.
From what I understand, the typical human eye actually does have a L (red) and S (blue) cone response for spectral violet. That’s why it looks purple. Now it is kind of hard to tell; lots of graphs of human spectral response are inconsistent with each other, but I’ve heard it on good authority that the ones with a hump in the red down in the blue part of the spectrum are more accurate and that is how we get spectral violet color.

The distinguishing quality between violet and purple is that some green response might be mixed into the red response from the other side of the spectrum. I don’t believe that there is any green contribution on the spectral violet end of the spectrum and so the color is vibrant, pure, and dark.

We should distinguish between the spectral frequencies and how the eye responds to those frequencies. The eye response is what makes color science so horribly complicated and even counter-intuitive at times. It’s a matter of the old philosophical puzzle ‘Know Thyself’: knowledge of a thing is not a part of that thing, and so how can we have self-knowledge about color if we can’t step outside of our own vision? Newton’s objective spectral theory of color is problematic because it doesn’t take human physiology and psychology into account, but sadly, many in art take the opposite error and claim that color is completely subjective, and therefore nothing true can be said about it.
 
Erik, looking at those two curves and extrapolating, it looks like both the leaf and the flower have strong near-infrared reflectivity. I'm wondering if C1 isn't trying to do something to compensate for IR contamination in your camera and going too far. If it thought a lot of the red energy in the flower was IR contamination, it would discount it and you'd end up with a blue flower.

Jiust a thought...

Jim

--
http://blog.kasson.com
Jim,

Thoughts something similar have crossed my mind. In some other testing I have done it could be seen that Capture One is doing some pretty wild shifts on blues. It actually pushes blues outside Adobe RGB.

Adobe Standards seems to reduce saturation a bit.





Capture One pushes blues outside Adobe RGB

Capture One pushes blues outside Adobe RGB



Adobe standard rather reduces saturation.

Adobe standard rather reduces saturation.

Best regards

Erik











--
Erik Kaffehr
Website: http://echophoto.dnsalias.net
Gallery: http://echophoto.smugmug.com
Articles: http://echophoto.dnsalias.net/ekr/index.php/photoarticles
 

Keyboard shortcuts

Back
Top