Color Cast Removal
jjbong
Registered Users Posts: 244 Major grins
I'd like to start a discussion of ways to correct color casts, as this is an issue I have in virtually every image I shoot. I use a WhiBal card, and this gets me in the neighborhood, but rarely does it solve the problem completely.
Many images have casts whose intensity varies with lightness, and they are typically stronger in the darker parts of the image. Other images, typically but not exclusively those shot in artifical lighting (especially multiple types of lighting) have crossing casts, where both the color and intensity of the cast varies throughout the image. I usually shoot out of doors, so I rarely see this type of cast.
I use a variant of [thread=184713]Dan Margulis' Picture Postcard Workflow (PPW)[/thread], in which the first step is elimination of any cast. The last step is color enhancement in LAB, and any residual casts, even small ones, will be amplified to an unpleasant degree. My usual method to remove color casts is to use an RGB curve in color mode, with sample points in the image which are either neutral (so I'm going for roughly equal R, G, and B values) or which have a noticeable cast (usually a cold one, blue or green, and where I'm looking for positive A and/or B values in a LAB info palatte).
Here's an image I shot under less than perfect conditions (the egret decided to get between me and the sun):
This is right out of the Camera Raw, with no changes. Pathfinder has the raw image, if anyone is interested in that. The blue cast in the shadows of the bird is evident, even without looking at the info palette.
One way to remove a cast is to set the White Balance in Camera Raw by using the White Balance Tool. In fact, this is how you use a WhiBal card. But you could just as well use the Tool on any neutral part of the image, such as virtually anywhere on the bird's feathers in this image. I tried to do this, and it did a pretty good job, but I was always left with some parts of the bird that were either green or blue. So I did the best I could with the White Balance Tool, and tried my usual method of an RGB curve in color mode. This is the curve:
And this is the result:
It doesn't look too bad from a color cast perspective, but there are residual blue and green casts on the bird that I couldn't eliminate with curves, and some areas are too yellow. This is the result after the PPW Luminosity step, and you can see the unacceptably yellow areas:
The blue and green residual casts would come out later in color enhancement. Looking at the some of the problem areas with the info palatte, I could see why curves wouldn't work. There were blue casts in areas with similar RGB values than areas with green casts. There's no way an RGB curve will handle this situation.
In Dan Margulis' last set of Kelby online classes, he presented a technique for correcting crossing casts that's both simple and powerful, and I attempted it here. For reasons that will become evident later, I didn't want to correct very much in Camera Raw, so I used the White Balance Tool on the highlight in the bird's feathers, leaving a strong blue cast in the shadows.
The technique is simple:
1. Go into LAB with a flattened image
2. Add a copy of the layer in Color Mode, 50% opacity
3. To the top layer, do Image->Adjustments->Invert
You end up with these layers:
What's happening is that the Invert causes all of the channels to go upside down, light becoming dark, green becoming magenta, etc. Since the layer is in Color mode, it doesn't affect lightness, but only color. So the Invert causes all of the colors to go to their opposites. Since Opacity is 50%, it kills all of the colors to neutral. Here is my result:
The thing is, you don't need to understand how all of this works in order to use it. Think of it this way. The upper layer kills color, driving it to neutral. The color still exists in the bottom layer, so you want to control where the color is killed, and by how much.
In this image, I want to limit the effect to the bird's feathers, and that turns out to be easy. In this image, the only thing that's blue (negative in the B channel) is the cast on the bird. There are also some areas of a slight green cast, and these are the only areas in the image which are green (negative in the A channel). So I use the Blend-If sliders on the top layer to apply that layer only to areas where the bottom layer is negative in the A or B channel. The sliders look like this:
And the result is this:
The cast on the bird is completely gone.
This was an easy image for this technique. In other images, you could limit the effect of the top layer by using a mask. Often a mask can be created from the A, B, or a combination of A and B channels. It might have to be curved, and if it were derived from the A or B channel it would have to be Auto-Leveled. Adjusting the opacity of the layer can also help in some cases.
After removing the cast, I did the usual Luminosity and Color Boost steps of the PPW.
For Luminosity:
1. Go back to RGB with a flattened image
2. Copy the bottom layer in Luminosity Mode
3. Curve the Green and Red channels to lighten and increase contrast in the darker parts of the bird
4. Shadow/Highlight
For Color Boost:
1. Very steep A and B curves at very low opacity (17%)
2. Less steep A and B curves at low opacity. These usually go exactly through the origin of the graph, but here I steepened the B curve slightly to warm the image up a bit.
Sharpen and done:
Anyway, I'm interested in how others would approach the color cast part of this.
Many images have casts whose intensity varies with lightness, and they are typically stronger in the darker parts of the image. Other images, typically but not exclusively those shot in artifical lighting (especially multiple types of lighting) have crossing casts, where both the color and intensity of the cast varies throughout the image. I usually shoot out of doors, so I rarely see this type of cast.
I use a variant of [thread=184713]Dan Margulis' Picture Postcard Workflow (PPW)[/thread], in which the first step is elimination of any cast. The last step is color enhancement in LAB, and any residual casts, even small ones, will be amplified to an unpleasant degree. My usual method to remove color casts is to use an RGB curve in color mode, with sample points in the image which are either neutral (so I'm going for roughly equal R, G, and B values) or which have a noticeable cast (usually a cold one, blue or green, and where I'm looking for positive A and/or B values in a LAB info palatte).
Here's an image I shot under less than perfect conditions (the egret decided to get between me and the sun):
This is right out of the Camera Raw, with no changes. Pathfinder has the raw image, if anyone is interested in that. The blue cast in the shadows of the bird is evident, even without looking at the info palette.
One way to remove a cast is to set the White Balance in Camera Raw by using the White Balance Tool. In fact, this is how you use a WhiBal card. But you could just as well use the Tool on any neutral part of the image, such as virtually anywhere on the bird's feathers in this image. I tried to do this, and it did a pretty good job, but I was always left with some parts of the bird that were either green or blue. So I did the best I could with the White Balance Tool, and tried my usual method of an RGB curve in color mode. This is the curve:
And this is the result:
It doesn't look too bad from a color cast perspective, but there are residual blue and green casts on the bird that I couldn't eliminate with curves, and some areas are too yellow. This is the result after the PPW Luminosity step, and you can see the unacceptably yellow areas:
The blue and green residual casts would come out later in color enhancement. Looking at the some of the problem areas with the info palatte, I could see why curves wouldn't work. There were blue casts in areas with similar RGB values than areas with green casts. There's no way an RGB curve will handle this situation.
In Dan Margulis' last set of Kelby online classes, he presented a technique for correcting crossing casts that's both simple and powerful, and I attempted it here. For reasons that will become evident later, I didn't want to correct very much in Camera Raw, so I used the White Balance Tool on the highlight in the bird's feathers, leaving a strong blue cast in the shadows.
The technique is simple:
1. Go into LAB with a flattened image
2. Add a copy of the layer in Color Mode, 50% opacity
3. To the top layer, do Image->Adjustments->Invert
You end up with these layers:
What's happening is that the Invert causes all of the channels to go upside down, light becoming dark, green becoming magenta, etc. Since the layer is in Color mode, it doesn't affect lightness, but only color. So the Invert causes all of the colors to go to their opposites. Since Opacity is 50%, it kills all of the colors to neutral. Here is my result:
The thing is, you don't need to understand how all of this works in order to use it. Think of it this way. The upper layer kills color, driving it to neutral. The color still exists in the bottom layer, so you want to control where the color is killed, and by how much.
In this image, I want to limit the effect to the bird's feathers, and that turns out to be easy. In this image, the only thing that's blue (negative in the B channel) is the cast on the bird. There are also some areas of a slight green cast, and these are the only areas in the image which are green (negative in the A channel). So I use the Blend-If sliders on the top layer to apply that layer only to areas where the bottom layer is negative in the A or B channel. The sliders look like this:
And the result is this:
The cast on the bird is completely gone.
This was an easy image for this technique. In other images, you could limit the effect of the top layer by using a mask. Often a mask can be created from the A, B, or a combination of A and B channels. It might have to be curved, and if it were derived from the A or B channel it would have to be Auto-Leveled. Adjusting the opacity of the layer can also help in some cases.
After removing the cast, I did the usual Luminosity and Color Boost steps of the PPW.
For Luminosity:
1. Go back to RGB with a flattened image
2. Copy the bottom layer in Luminosity Mode
3. Curve the Green and Red channels to lighten and increase contrast in the darker parts of the bird
4. Shadow/Highlight
For Color Boost:
1. Very steep A and B curves at very low opacity (17%)
2. Less steep A and B curves at low opacity. These usually go exactly through the origin of the graph, but here I steepened the B curve slightly to warm the image up a bit.
Sharpen and done:
Anyway, I'm interested in how others would approach the color cast part of this.
John Bongiovanni
0
Comments
I will try to get my response up in a few days.
If folks want to join in, I will put the RAW file online in my public gallery -- https://public.me.com/path_finder
Moderator of the Technique Forum and Finishing School on Dgrin
The "Do-in-two" button, the usually reliable Match Color| Neutralize, also blues things up.
Here's my one-minute attempt using ColorWasher, a relatively inexpensive plugin that does a nice job with strong or strange casts:
I think it did a creditable job myself. I created two selection boxes, one for the body and one for the neck for ColorWasher to select. I also had the Sat. Fix button on to help tame the grass color. I didn't do anything with tone, so it's a bit flat, I was mainly working on the color cast part of it.
I'm not so sure. The tail and neck are still pretty blue. The background is pretty yellow for my taste, but that's a judgement call. The blue in the bird is not, however.
EDIT:
Actually, using Colorwasher, I can then move into Lab, write a quick curve to kill the blue in the bird, and still keep the grass green-yellow. I will post tonight if I have a chance. Could probably do the same thing with a quick RGB curve, if I was better at it. :lol
EDIT EDIT:
And then there's a whole discussion about why we're doing this. OK, we killed the cast. So what? Does it make the image better (match the vision of the artist), or are we just killing the cast to see if we can? Personally, I would find my posted version more pleasing than your version, even if you were more effective at killing the cast. But I'm not the artist, or the client.
EDIT EDIT EDIT:
Used the raw, WB on highlight of the bird. Used ColorWasher to remove most of the cast. Used L*a*b* to remove the blue cast from the neck and wing by a minor tweak to the b* channel.
[IMG][/img]
Let me start, by saying that color balance is up to the creator of the file, that there is no "real true" color, just the color desired by the editor of the file, as dictated by their artistic tastes or sensitivities. "Flame suit on"
When I opened the Heron file, John snailmailed me, in Adobe Camera Raw 6+, I was surprised to find it was shot with a 200-800mm zoom lens!!?? I went out to Google to see where I could find a lens like this, and did not find one anywhere. When I later opened the file in LR3, it told me that the file was shot with a Canon 100-400 and a 2xTC which made more sense to me, and demonstrated the funny particulars of ACR versus LR ( which Adobe tells us are the same exact engines )
I have decided to process this file in LR3, rather than ACR because I prefer the interactivity allowed by the History palette on the left tab of LR3, over the "no history palette" approach of ACR. I can then just do screen grabs from LR3 to show exactly what I am doing as I go through my workflow.
The first think I noticed is that the file was being processed with a 2003 camera profile, and a Custom color balance setting of 5250 and +7 Magenta I noticed green margins along the back of the heron due to chromatic aberration as well..
The first thing I did was switch to a 2010 Camera profile, and after playing with the color balance tool looking for neutrals, I decided I really liked the Shade setting the best. Now, there is no right answer here because the back of the heron is clearly sunlit, but the side is obviously lit by blue sky, and the heron is surrounded by the warm reddish brown grass that reflects off its underside. Rather than trying to follow John's approach of neutralizing colors, I decided to embrace them by using the Shade setting. This corrects the blue on the heron's side nicely, and creates a nice warm sunlit appearance to the heron's back, like a late afternoon sun, not a sun at noon. This also warms the foliage as well. The heron no longer reads as a neutral white, but a warm reddish tone, but that is ok to my eye in this warm late afternoon image.
Next I worked through each of the Raw processing tabs in the right column of LR3. Shade -> 7500, + 10 magenta
I then worked through the Exposure, Recovery, Fill, and Black sliders, and decided I wanted the image a bit brighter so I raised the Brightness to 54. Gentleness is the ticket with Brightness.
I added some Clarity and Vibrance as seen in the image of Lightroom, and left the Tone Curve as Medium, hence it is not displayed in the image. HSL/Color, Split Toning, were not altered from default.
The values I use for Sharpening and Noise Reduction are values I find I use quite frequently, I should make a preset with them I think. Sharpening Amount 70, Radius 1.0 unchanged, Detail 28, Masking 47 ( could even go higher ).... Noise Reduction I raised the Luminance slider to 10, and the Color slider to 34
I used the Brush Tool to add a bit of saturation and increased luminance to the yellow on the bill and the left leg.
I enabled the Lens Profile for the Canon 100-400 default and found this removed the green line along the superior margin of the Heron's back.
And I was done with the Raw Processing of this DNG with this result...
Here is the file as exported from LR3
This image has not been processed in Photoshop in anyway. I can see flaws with it - it does have a blue band along the upper shaded area, but I am uncertain still if this is bad or not. The feathers of a heron have no pigment, but are millions of tiny specular reflecting mirrors, and hence, like snow reflect the color of their environment. Which in this case is blue sky, warm yellow sun, red brown foliage from below.
I will pause at this point to allow viewer's to render their opinions of my Raw processing and color balance.
My final edited jpg in full size is available here - http://pathfinder.smugmug.com/Other/Large-files/1789718_YdTAs#1211366638_d7FvC-O-LB
Moderator of the Technique Forum and Finishing School on Dgrin
I believe John has probably killed the cast most effectively, but I'm not sure if the final result is as pleasing to my eye.
I might have a better test image for color cast removal, because it is an image that was shot under tricky museum lighting, (no flash, no tripods, dim area) and which relies on the contrast between clean white walls and bright green colors to meet the artist (my) vision, modest as it may be. Let me dig up the raw and I can post a jpeg from raw either here or in another thread, time permitting.
When I go to my Smugmug gallery the screen captures do not seem to have an sRGB profile whereas the final exported jpg is certainly exported from Lightroom as a 8bit sRGB file - i think that explains the different colors between the 3rd screen capture and the final exported image. I thought the screen captures would be sRGB tagged but I see that is indeed not the case.
Mark, I do agree that John has done a better job of neutralizing the casts in his image. I just am not sure that I like it better than mine, and I am waiting to see how the readers vote their opinions.
Do not place great emphasis on the screen captures, their color will not be completely accurate, but they do allow readers to see my EXACT editing steps as I worked through the image.
Let's have a separate thread for your image if you will please.
Moderator of the Technique Forum and Finishing School on Dgrin
I will edit it in a second.
That would be great. Exactly the kind of discussion I wanted to start.
Excellent question, and I'm in total agreement that what we're trying to do is make the image match what we saw, achieve a particular vision, etc. Removing a cast is a technique that may (or may not) help in this process. And I do admit that the residual casts in your posted image are not readily noticeable, so my critique here was entirely technical. Putting all of this aside, I actually like your bird, although I don't like the background. But this is subjective (and, as you point out, geographic).
My particular interest in removing the cast derives from my workflow, which is a variant of the Dan Margulis PPW (referenced earlier) and involves some rather drastic color boosts in LAB as the final step. If you go into these with a cast, the cast gets amplified to generally unpleasing results. So that's where I'm coming from on this, a somewhat narrow focus.
I spent a few minutes in Bridge, flipping back and forth between our two images and trying to decide which I liked best, and I couldn't decide. Each has something different to offer. In some earlier "competitions", I thought yours were decidedly better, but here I'm not sure, but I also don't think mine is decidedly better.
As you mentioned, you went down a different path than I did, wanting to take advantage of the colors and enhance them, reflecting them in the body of the egret. I was focused on eliminating the, to me, impossible colors in the egret's feathers, and then getting the best image.
Two things about your image bother me, though. One is the blue that you pointed out near the tail. When you're training yourself to look for casts in your images, you become sensitized, and this really jumps out to me. Unlike Mark's image, where I had to use to Info palette to see the blue, I could see this with my own eye. It just seems out of place to me, there being nothing blue remotely near. The other, which is perhaps unfair because we're focusing on color and not contrast in this discussion, is that I don't think the detail in your image is as good as that in mine.
Unfortunately, being Lightroom ignorant, I couldn't follow how you did the color cast removal, but I got that you were able to translate your intent into practice, and that's what matters.
I am impressed with what you're able to do the the various lens profiles in ACW. I'm several versions out of date in PS.
I agree that I am not certain I like that blue swatch near the tail in my edit, but this was merely Raw rendering, and the blue could be removed in Photoshop in a number of different ways - selecting Highlights and desaturating the Blue channel will probably remove it easily and might be my initial attempt. I think the blue swatch is reflected from the sky, which while not near in the image, is pervasive in the birds environment.
I agree that you have better contrast/detail in the white bird feathers. I di dnot sharpen as hard as I might have or that I would for printing. A bit steeper luminosity curve in the highlights might help here in my image, in Photoshop.
Do you think your bokeh along the superior margin of the out of focus background is just a bit harsher than in mine, perhaps?
I did not remove a cast, so to speak in LR, merely chose a different white balance - Shade. I usually do not like the Shade setting, but did in this case, since most of the image is actually in shade, I think. Certainly Sun would be the wrong balance point for the majority of the image.
I notice near the rear most inferior portion of the bird, you have the same reddish tones in the white feathers I do, reflections from the grass I think.
Moderator of the Technique Forum and Finishing School on Dgrin
Yes, I had not noticed that earlier, but I agree.
Ah, I get it. Which comes back to another question. It's been my experience that setting white balance alone, however it's done, is frequently not sufficient as the cast (or proper white balance) varies in the image. And I'm not talking about crossing casts due to radically different light sources, but shots in daylight such as this one. Is that your experience also?
As I touched briefly earlier, what is the color of a heron? I think it is like snow, the color of whatever light is shining on it, whether daytime sunlight, shade ( blue sky light actually is what shade is ) , or even red from a nearby barn, or green from surrounding vegetation. If you ever shoot a bride on a golf course you will know that her pure white dress IS green in the reflected light from the grass. SO what color is a heron? Not always a pure white that is for sure, but finally the color the photographer/editor decides looks right to his/her eye. Correcting casts can be beneficial, but if you correct the cast of a low afternoon sunlit scene, you will ruin it. It is the warmth in the color tone that makes it, frequently.
I think significant color casts more usually are caused by combinations of crossed lighting; sunlight with tungsten, or tungsten and a little fluorescent, or filtered tungsten, or even sunlight reflected off a wall - whether brick or stone or red rock.
Think of a person standing in the shade where the sun shines on a red rock wall opposite the shaded area and you can have blue light on one side of the subject and red light on the other....Theoretically an Expo disc would give you an average color temp that will render grey -> grey, but a person may have blue on one side of their nose and red on the other in this situation. We need to see this in advance so we can correct it with a scrim before shooting I think.
I am not sure I really answered your questions with my rambling monologue, John. Maybe our readers will give us their opinions as well.
Moderator of the Technique Forum and Finishing School on Dgrin
That's a nice explanation, Jim, and it explains a lot.
But there's the difference between what we see and what the camera sees, and that's the objective of cast removal. Regardless of the grass reflections in the bride's dress, for example, we all remember it as white. Somehow we don't see the green reflection, but the camera does. Same thing for the heron.
That really is the issue isn't it. We don't "see it" although the camera does capture it, and hence we know it IS there, but cannot accept it in our prints on paper. Thus the goal of cast removal is to alter the actual correctly captured colors to hues that are more inline with our subjective memory???
It really is challenging at times. When I first shot a bride on a golf course I was stunned by how green her dress looked in the images, and did not "see" the green at the shoot at all, although it obviously was there if you looked for it. A magenta filter would kill the green in her dress nicely.
Folks tell me clouds are white and never green; I invite them to photograph the cumulous clouds over the cornfields in Iowa sometime.
Moderator of the Technique Forum and Finishing School on Dgrin
I'd rephrase it slightly. The goal is to show what we actually saw, as the eye/brain work differently than a camera. I'm not an expert on this, but Google quickly provided me these examples:
http://www.psychworld.com/optical-illusion-of-the-week-chromatic-adaptation-2011-01
http://www.colorcube.com/illusions/chrmadptb.htm
I have a real good example right outside our house. We live on a hill, looking out on an old, white hotel with a cupola that these days is lit with florescent lights. so at night the interior of the cupola looks pretty green from here. But where you're up there at night, it sure looks white.
I sound like President Clinton I think.
Moderator of the Technique Forum and Finishing School on Dgrin