PDA

View Full Version : Hacking HS for CB in Lab


Stroker
12-23-2005, 10:12 AM
I've been extra quiet this past while. I be gettin' sum time soon so hopefully I be ledding ya'll know wud I bean up tah. In the mean time, time for a break with something I was talking about elsewhere awhile ago.

I'm sure this belongs in Tips and Techniques, but I'll lose this thread if I post this down there. Indulge me and my rule-breaking ways?

HSL = polar
Lab = Cartesian

One way to fix colour cast:
- start in HSL
- convert to Cartesian
- offset
- convert back to polar

Being able to do that is very nice. However, can't exactly be done with stock tools in Photoshop. Bleh.

If you can believe it, that is pretty much how Lab fixes colour cast.
- photograph with colour cast in Lab mode
- Levels
-- a channel and wiggle gamma/mid-tone slider
-- b channel and wiggle gamma/mid-tone slider

If you do it just right, you will fix colour cast.

Both basic techniques/ideas are exactly the same. Differences only in paradigm and tools, but still the same in (basic) data and manipulation.

Is there a way to mix both of them for perhaps an easier or more intuitive technique? I like to think so.

- photograph with colour cast in Lab mode
- Foreground > Lab: L = 50%, a = 25, b = 25
- New layer and fill
- Set blending mode to Linear Light
-- for this layer, Advanced Blending and turn of L channel

Big ugly mess, right? Now for the HS hack.

- Adjustment Layer > Hue/Sat and clip to the LL layer
-- Wiggle Hue and Sat sliders until happy

What you are basically doing is offsetting ab using Hue for the direction and Sat for the magnitude. Something like:
- wiggle Hue slider until balanced or neutralized
- wiggle Sat slider until happily subdued or mixed

So, instead of messing with drop-downs to get to different sliders (or Brazier anchors), you can fix the bulk of colour with two sliders sitting right in front of your face. Then it's just a matter of other tweaks as you see fit. For example, maybe lowering the saturation in the lows. And various other things.

I recorded my own Action to set it up for me. I recommend you do the same. Then grap some colour cast photographs and put it through some paces. Personally, I'm very happy with it.

Tada.

(Not only do it I like it, but it makes me giggle like a giddy little school girl. Geek humour rocks.)

Stroker
12-24-2005, 08:23 AM
Attached is an example of this technique at work. Although, I did take it a step further.

First, I went through the HS hack. This took care of the bulk of the photograph rather quickly and easily.

Now, there is total seperation of L and ab and Lab, and fixing the colour doesn't do much for L*. This is largely good but it can be a bit weird. It takes some practice to be able to fix both seperately and put them together for a better whole. Know what I mean? Not to mention that L and ab actually should interact but don't interact much properly in Photoshop.

When you go through the HS/CB/LL hack, you could very well end up with pure blacks with some shades of blue or red. You could also end up with pure white with various shades of yellow, orange, cyan, or whatever PS allows but shouldn't allow. Some folks like this and use it, but I don't care for it.

You see, Lightness should limit rho or saturation much in the same it does in HSB, HSL, and HsY.

Here is one of my favorite hacks for properly limiting based on L. Uses Brazier interplation instead of Pythagoras, but I'm happy.

Use your methods to fix the colour.
Fix Lightness, like contrast or whatever.
In Channels palette, copy Lightness.
On this copy, Curves:
- 0,255
- 128,0
- 255,255
Use the result as a mask to lower saturation.

In the attached example, the white sky was way too pink for being white. There were also some fugly blue shadows around her face and armpit. The above mask took care of all of that in short order.

Maybe I should have left the sky a little pink or turned it blue/cyan? I don't know. Could be taste and flow. Also made her a little too red/magenta for my tastes.
:sigh:
But I'm sure you can mix it up for your own tastes. You know, tweak to your liking.

Stroker
12-24-2005, 08:32 AM
Another example I whacked out in 2 minutes. In this one, I only lowered saturation only in the shadows. If I had lowered sat in the highs, the forehead shine would have become more pronounced and way ugly and harder to fix.

Dami
12-24-2005, 02:12 PM
Awesome explanation as usual, Stroker, thanks!

Klatu Baradda Nekto
12-24-2005, 05:37 PM
Professor Stroker,
You have once more astounded us. This shall go down as one of your most significant discoveries. We love it. And the fact that it can be turned into an Action even better! Outstanding!

Time for a cookie.

EDIT: Wanna post your Action?
__________________
We are explorers.
We have come to visit you in peace and good will.
http://photoshoptechniques.com/forum/images/smilies/e.gif -Klaatu-
| File | Edit | View | Edit Again | Delete | Sleep |

Stroker
12-24-2005, 09:03 PM
I was thinking about posting an Action or two, but I usually don't for something this simple and easy. Besides, recording Actions for your own flow is good. Maybe start straight away from Background? Or maybe start with Copy Merged + Average + Invert? Or maybe variations with different Modality options? I prefer you take the basic idea and make it your own. Know what I mean?

Then again, I have been known to break even my own rules.

When it comes to limiting saturation based on Lightness, maybe try a Blend If hack instead of creating a greyscale mask.

- new layer and fill with any shade of grey
- set blending mode to Saturation
- Advanced Blending > Blend If > Underlying Layer, split the sliders and tweak away

Being tweakable and not entirely dependent on a derived greyscale mask, should make further tweaks easier. That is, you shouldn't have to recreate the mask or paint so much to accomodate further work. Give it a whirl. Make it a part of your own Action. Heh.

I'm off to bed. Maybe in the morning after 3 pots of coffee and yelling at the kids to share their new toys.
G'night, folks.

Stroker
12-26-2005, 03:43 AM
Quit twisting my arm, please. I surrender.

Attached are some of my Lab actions. I did clean them up a little bit, but feel free to re-record steps and what-not to make them your own.


Stroker Lab

Lab Mode: This will change current mode to Lab. If you have several layers, this will not flatten and it will not warn. Some adjustment layers and things could get deleted so be aware. On my machine, I have this bound to F4, but I took that out so it wouldn't conflict with yours.

Curves ab LL: This will create a Curves adjustment layer. It will be in Linear Light mode and the curves will be normalized for no effect. For some things I find this method easier than working with a tilted line. Because of the way LL works, this might be a bit heavy handed. If it is too heavy for your tastes, try Overlay or Soft Light.

HS offset ab: This is the original technique I was talking about.

HS ab Average: This is a variation that should give you a good running start. It will copy Background specifically, Invert, Average, LL and the rest. Should give you a better running start than the original. Because it copies Background specifically and works from there, it may not be quite as flexible for some of you folks. Works dandy for me, but you might want to fix that particular aspect for your needs (if you need that extra flexibility).

Lab Sat Blend If Hack: This is the Blend If hack. I'm actually liking it very much for several reasons. You might want to change the Modality of the second 'Set current layer' step so you can tweak right away instead of having to open the dialog when it's done. The number I have in there for Blend If are arbitrary and more than likely will need to be tweaked.


That should keep you busy for awhile.

(I do have more to say about Lab Sat Blend If Hack. I just might have to fiddle something together.)

Stroker
01-11-2006, 12:40 AM
Finally got around to looking for a shortcut. I can be so lazy sometimes.

- Lab mode
- Hue/Sat adjustment layer
- Colourize turned on
- Linear Light
- Advanced Blending > turn off L channel
- Hue and Sat sliders as before

Gets rid of one layer if you got the yarbles for it.

Stroker
01-24-2006, 09:32 AM
Did some more junk and finally settled on how I would put this together for a filter.

PC/Win Lab 8-bit
Neutralize (http://tech-slop.serveit.org/wiki/index.php?title=Neutralize)

Being the lazy guy that I am, no telling when I'll get to adding a few more little things and tutorials. The big thing on my mind is writing a long article about my journey with colour cast.

Stroker
01-31-2006, 06:58 AM
Whoops... internet hiccup.

solecist
01-31-2006, 01:25 PM
A filter that's only PC?

An elegant solution, my admiration. I haven't played with it extensively yet, but I've always wanted a levels(or similar) dialog that auto corrected losses or gains in saturation when making a dramatic adjustment. Would applying an eccentric layer combination as you've shown here make that possible without having to convert to LAB (for speed in a JPEG workflow)?

Stroker
02-03-2006, 12:41 AM
Any and all filters that I do are PC/Win.This due to a limitation of Filter Meister (http://www.filtermeister.com) and my own laziness (I am one of the laziest programmers you will ever meet).

The original RGB variation can be seen here: http://www.chainstyle.com/tutorials/colcast.html
If you think about it, shouldn't be too hard to incorporate some of the extra ideas that I've talked about in this thread.

However, the RGB variation can be rather poor at times. Because of the RGB <> HSL/HsY paradigm, it's rather easy to wash out a photograph and other minor bad things.

Try it, mess with it, and decide for yourself.