RetouchPRO

Go Back   RetouchPRO > Technique > Photo Restoration
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read Chat Room


Photo Restoration Repairing damaged photos

Advertise Here

Did you know this about the S curve? I didn't!

Reply
 
LinkBack Thread Tools
  #1  
Old 04-10-2005, 01:42 AM
Rexx's Avatar
Rexx Rexx is offline
Senior Member
 
Join Date: Jan 2004
Location: Norway
Posts: 177
Did you know this about the S curve? I didn't!

I had a shattering "out-of-Photoshop" experience today! The S curve works completely different from what I thought. If you're interested, you may have a look at the complete thread here DP Review thread about S curve but I can give you the summary:

Andrea writes
Quote:
How can I apply the famous "S curve" to improve contrast without affecting color balance, i.e. without changing skin color?
Then I answer, completely wrong!!!
Quote:
The S curve only changes the luminosity, the greyscale appearance of an image. Colour, that is the balance between R G and B, will not change.
Mapril corrects me
Quote:
Effectively the S curve may change the tonality. I will illustrate this with one example: suppose that one pixel have values of 200 for red and 40 for blue. When you apply the S curve, the value of the red will increase for that pixel, while the value of the blue will decrease. This may be perceived as an increase in saturation, but is not quit so. To avoid changing the tonality, you can do this way: if you use an adjustment layer, change the blending mode from Normal to Luminosity; if you don’t use an adjustment layer, select menu Edit/Fade Curves after applying the curve, and change mode from Normal to Luminosity.
And finally I test this!
Quote:
I tried exactly this. I created a colour consisting of
R=200 G=128 B=50

Then I applied a strong, but not unrealistic S curve to it. Result?
R=231 G=128 B=34

WOW!

Since I was testing more, what I was really testing, was a gradient. This was just my middle point. The initial colour is a light brownish hue. After the S curve, the darker portion turns strongly red and the lighter portion strongly yellow. But there's more. I get banding. The former gradient becomes four bands of black, red, yellow and white, with the original colour as an unnoticeable transition between read and yellow.

My artificial colour is not far from some Asian flesh tones and very light negroes or white/black offspring. Oops! Disaster lurks in the S curve...

The S curve doesn't at all work the way I thought it did.

Thanks Andrea and Mapril! I've learnt a lot today!!!
Any brown people around here? You knew this all the time, didn't you?

What an eye-opener!
Reply With Quote
  #2  
Old 04-10-2005, 08:12 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Wow. Talk about timing. Yesterday I just finished up some work for somethinge extremely similiar that hits on most of those things.

An S Curve in Normal mode will increase saturation for values centered around the middle of the S curve.
PS's Sat=Max(RGB)-Min(RGB)
If you increase Max(RGB) and decrease Min(RGB), you get more saturation.

If you S Curve Luminosity, Sat will largely be left alone in the wide middles. However, Luminosity will cause Sat to be decreased the closer you get to 0 or 255 depending on Hue. For example, increasing the Lum of pure yellow will desaturate faster than decreasing the lum of pure yellow. The opposite is true for pure blue.

Let's say I want to desaturate a photo with lots of red <> orange. In a case like that, I will manually boost contrast in the seperate RGB channels with an S curve in each channel. (I also do this when trying to cull things like scar tissue.)

If a photo is kind of washed out and needs some 'regular' contrast, I will S curve the Luminosity. If a photo is too intense and needs some washing out, Luminosity again.

When you get into the RGB <> HS/Lum paradigm, things get really cool.

The work I was doing? A plug-in I call Uber Contrast.
My next one is going to be called Soft Contrast.
Reply With Quote
  #3  
Old 04-10-2005, 08:15 AM
byRo's Avatar
byRo byRo is offline
Moderator
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,603
BTW. Levels works the same way!

Quote:
Originally Posted by Rexx
....if you use an adjustment layer, change the blending mode from Normal to Luminosity;
Or, as I would prefer - separate out the Luminosity of the image and work on just that. When you're satisfied with the greyscale, then add the colours back in and fix them.

Reply With Quote
  #4  
Old 04-10-2005, 08:30 AM
Duv's Avatar
Duv Duv is offline
Senior Member
 
Join Date: Oct 2003
Location: Nanaimo, British Columbia
Posts: 1,213
The same situation applies to sharpening images. And changing to a Luminosity adjustment layer doesn't work either. Luminosity is a blending mode that combines the lightness component of the active layer with the hue and saturation components of the underlying layer. So even fading is not going to eliminate the color shift. So Roland is right in that you need to isolate Luminosity.

I guess that why I do virtually all my contrast building and sharpening to the lightness channel in LAB because it totally isolates the lightness component from the color. Try your adjustments in Luminosity Blend mode then try it with the Lightness in LAB and see what you get.

Dave
Reply With Quote
  #5  
Old 04-10-2005, 08:38 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
To understand Curves a little deeper, I recommend Steve's tutorial:
http://www.gurusnetwork.com/tutorial/curves/

Quick-n-sleazy method for extracting Luminosity in RGB mode in the Layer palette:
1. Copy photo.
2. Edit > Fill
- Use: Black, White, or 50% Grey (any Sat=0 will do)
- Mode: Saturation
Reply With Quote
  #6  
Old 04-10-2005, 08:46 AM
byRo's Avatar
byRo byRo is offline
Moderator
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,603
Quote:
Originally Posted by Stroker
If you S Curve Luminosity, Sat will largely be left alone in the wide middles. However, Luminosity will cause Sat to be decreased the closer you get to 0 or 255 depending on Hue.
Couldn't be any other way. As you increase the Luminosity the channels get max'ed out, when they all get to 255 you have no colour at all - Saturation 0. So, in the middle there's a lot of room for colours , at the ends Sat=0 .

Quote:
Originally Posted by Stroker
For example, increasing the Lum of pure yellow will desaturate faster than decreasing the lum of pure yellow. The opposite is true for pure blue.
Most images, and especially ones with skin tones have low values in the Blue channel and, besides that, the Blue channel by itself has a very low Luminosity component - so Blue luminosity starts out at the very low end. A lot of room to go up, not much to go down.

Quote:
Originally Posted by Stroker
When you get into the RGB <> HS/Lum paradigm, things get really cool.
Shame we don't see in RGB, would make this a lot easier.

Reply With Quote
  #7  
Old 04-10-2005, 08:52 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Stop it, Ro. You are encouraging me to make graphics and explain all of this stuff on different levels in different colour spaces and paradigms.
Gets me all giddy.
I *love* this stuff! Ahhh!
Must resist... urge... to ramble...!
~grits teeth~
Reply With Quote
  #8  
Old 04-10-2005, 09:16 AM
byRo's Avatar
byRo byRo is offline
Moderator
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,603
Thank you, Stroker, learned two new things in one post.
Quote:
Originally Posted by Stroker
Quick-n-sleazy method for extracting Luminosity in RGB mode in the Layer palette:
1. Copy photo.
2. Edit > Fill
- Use: Black, White, or 50% Grey (any Sat=0 will do)
- Mode: Saturation
Nice one, Quicker-n-sleazier than my way!

Quote:
Originally Posted by Stroker
To understand Curves a little deeper, I recommend Steve's tutorial:
http://www.gurusnetwork.com/tutorial/curves/
<ctrl><alt><M> repeats the last curve setting. (BTW <ctrl><alt><L> works for Levels)

Reply With Quote
  #9  
Old 04-10-2005, 09:19 AM
byRo's Avatar
byRo byRo is offline
Moderator
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,603
Quote:
Originally Posted by Stroker
Stop it, Ro.
It's Rexx's fault - He started it
Reply With Quote
  #10  
Old 04-10-2005, 09:45 AM
Duv's Avatar
Duv Duv is offline
Senior Member
 
Join Date: Oct 2003
Location: Nanaimo, British Columbia
Posts: 1,213
Will the real Luminosity please step forward. The left is the Lightness channel in LAB. The right is Stroker's method. Why are they different and does one perform better than the other whether it be curves, sharpening or anything else?

Dave
Attached Images
File Type: jpg Luminosity.jpg (90.5 KB, 42 views)

Last edited by Duv; 04-10-2005 at 10:06 AM.
Reply With Quote
  #11  
Old 04-10-2005, 09:59 AM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Duv, it's not so much the difference between L in Lab and PS's own Lum.
L in Lab = RGB > Y > L
PS's Lum = R*0.30 + G*0.59 + B*0.11
While there is difference, it's negligable when it comes to contrast (negligable when it comes to a lot of things, but it might matter to a number freak).

Contrast in two main flavors:
1. Manipulating RGB either together or in separate channels. This has a direct effect on PS's flavor of Saturation.
2. Manipulating your favorite flavor of Luminosity or Lightness or what have you. Depending on several things, this may or may not affect PS's Saturation.

Hopefully later today I'll have some material ready that gets into #2 and some related things.

edit:
Sorry, Duv. I totally missed a large chunk of your little post.
If it's not much trouble, try both methods for a given task and see which one you like more. No big deal.
If you want to know more about the differences, look into Cie xyz as it kind of a hub between a lot of colour related things.
It's a big can of worms and I don't feel anywhere near qualified to talk about such things.

Now, if contrasting, or other manipulations, lum in RGB mode, I would prefer to use PS's Lum because it's 'true to PS's RGB internals' so to speak.
Personally, it doesn't make much sense to me to RGB > Lab > RGB (even in part) when a 'pure' method is right there in RGB.
Ah, kinda like that.

If working in Lab, then I would use the L in Lab.

Last edited by Stroker; 04-10-2005 at 10:38 AM.
Reply With Quote
  #12  
Old 04-10-2005, 10:59 AM
byRo's Avatar
byRo byRo is offline
Moderator
 
Join Date: May 2004
Location: Goianésia, Brazil
Posts: 1,603
Quote:
Originally Posted by Stroker
I would prefer to use PS's Lum because it's 'true to PS's RGB internals' so to speak.
Right on, Stroker.
This is the main reason why I stick with Luminosity. Not because I understand all of the aspects of colour -> "brightness" conversion. But because it requires less PS math manipulation and hassle. It is easy to separate the luminosity into a layer (easier still, thanks to Stroker's post above) and easy to blend back in (as Luminosity, of course)

So, a shorter answer to Dave's question.
1) There is no real Luminosity. There are various depending basically on what you're going to use it for (TV, monitors, printing, Photoshop / JPEG).
2) Luminosity (R*0.30 + G*0.59 + B*0.11) is more natural to Photoshop. Easy. So why fight it?

Reply With Quote
  #13  
Old 04-10-2005, 02:58 PM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Okay, Curves and Saturation.

If you are not sure how Curves work, read the link previously posted.

Photoshop's flavor of Saturation is:
Max(RGB) - Min(RGB).
That is, find the lowest value amoung R, G, and B.
Find the highest value amoung R, G, and B.
Take the difference and you have Saturation.

*There are other flavors of Saturation, but PS's flavor is what we'll be dealing with.

When dealing with Sat, it's not really necesarry to think in terms of RGB. Rather, you have to twist your brain around a bit and learn to think in Max(RGB) and Min(RGB). Might be hard at first, but learning to think like that is good.

When you understand Curves and Sat, it's not that hard to put them together when dealing with things RGB.

See attachment.

On the left is a crappy drawing of an S curve and what happens to sat when Min and Max are centered around the middle of the S curve. Min is lowered on the lower half of the curve. Max is raised on the upper half of the curve. The net result is an increase in saturation for those values - the difference becomes greater.

On the right is what happens to different set of Min and Max on a curve. In this example, Min is raised and Max is raised. However, Min is raised more than Max. The net result is lower saturation.

Now, you could think of the second curve as the upper half of the first curve. This means that the higher Min Max values on the S curve will actually have lowered saturation. Oddly enough, the Lum will be raised and have the same effect of lowering saturation at the extremes. Coincidence? I think not! We just ran in a circle with and S curve. Heh.

If you Curve RGB, chances are very good that you will be lowering/raising Sat in various places. And that's not getting into how sat is affected when you do curving in seperate RGB channels. If you take the time to understand it, you can avoid it, negate it, or even take advantage of it. Or know when not to worry about it.

That's RGB, S curve, and Saturation in a very quick nutshell.
More coming about tossing Lum into the mix and the circle we ran around in.
Attached Images
File Type: gif scurve1.gif (8.5 KB, 27 views)

Last edited by Stroker; 04-10-2005 at 03:22 PM.
Reply With Quote
  #14  
Old 04-10-2005, 08:55 PM
Stroker's Avatar
Stroker Stroker is offline
Senior Member
 
Join Date: Jan 2005
Posts: 370
Hmm...

Min + n and Max + n
Will change RGB, but not Sat.
Same for Min - n and Max - n.

As long as the difference stays the same, Sat will stay the same.

Is there a way of doing this, and thus boosting contrast without affecting Sat? Absolutely. One of my favorite ways is Linear Light.

Are you familiar with colour cast blasting? One technique goes like this:
1. Pick the colour that you want to blast.
2. New Layer and fill.
3. Invert.
4. Set to Colour blending mode.
5. Reduce opacity to taste.

That is a good technique, but reduces Sat across the whole spectrum. That reduction in Sat has to do with the Hue <> RGB paradigm and reduced opacity.

If you think about it, you can do a variation on that technique with Linear Light that will reduce Sat for the given colour, but will actually boost contrast at the opposite hue. Neat, eh?

Another way of boosting contrast while leaving Sat alone is through Luminosity. This will also move Min and Max around by the same values and essentially leave Sat alone.

However - and this is the part that really cool - Luminosity will actually limit and modify Saturation if need be.

What?

See attachment.
*I made it in a hurry and didn't bother with some particulars. As such, some aspects are wrong. However, should be good enough to get the point across.

On the left is a slice of HSL.
The vertical center is Lightness and has Sat=0.
On the outides are yellow and blue with Sat=255/100%.

That little diagram on the left tells us quite a bit about how Lightness limits Saturation.

For example, Sat can be 255/100% *only* when Lightness = 128/50%.
Anything above or below Lightness=128/50% will result in a lesser maximum of Saturation.

When Lightness = 191/75%, Sat has a maximum of 128/50%.
When Lightness = 64/25%, Sat has a maximum of 128/50%.

That's SL in HSL in a nutshell.

What about Photoshop's priority method of Luminosity? That's a bit tricky.
Lum = R*0.30 + G*0.59 + B*0.11
(Getting tired of that yet?)
Since Lum weights the RGB channels differently, the Lum is greatly affected by Hue. This means that Sat is limited by Lum differently depending on Hue.

Lum of pure yellow = 227
Lum of pure blue = 28
* Notice 227 + 28 = 255
* Coincidence? I think not!

Using 227 and 28, a similiar slice for Photoshop's space can be constructed. In the attachment, this is that funky parallelogram on the right.

In a similiar vein, this means:
Yellow can only have Sat=255/100% when Lum = 227/89%.
And so on.

This same idea can also be seen in Lab space. Even though Lab doesn't have Sat persay, it can easily be derived and it is limited by L in the same manner.

Boost contrast while keeping saturation?
Luminosity is your best bet - even if it does limit saturation in funny ways at the top and bottom.

There is still so much more to this.
All of these bits-n-pieces can be put back together is so many cool ways.
Even though RGB and HS/Lum are a far cry from each other, you can even mix them together to do some amazing acrobatics. Some of you already do.
I love this stuff.
Attached Images
File Type: jpg lumlimitssat.jpg (12.9 KB, 11 views)

Last edited by Stroker; 04-10-2005 at 09:19 PM.
Reply With Quote
  #15  
Old 04-10-2005, 11:53 PM
Duv's Avatar
Duv Duv is offline
Senior Member
 
Join Date: Oct 2003
Location: Nanaimo, British Columbia
Posts: 1,213
[QUOTE=Stroker]
While there is difference, it's negligable when it comes to contrast (negligable when it comes to a lot of things, but it might matter to a number freak).
Quote:
Originally Posted by Ro
Luminosity (R*0.30 + G*0.59 + B*0.11) is more natural to Photoshop. Easy. So why fight it?
Here's why. Heron's crest. Image 1: Original Image 2: HighPass 10 pixel LAB Lightness Image 3: HighPass 10 pixel RGB Luminosity.

Most images I have changed are perhaps not as dramatic as this, sometimes impossible to see the difference but I personally cannot recall ever having an RGB Luminosity correction turn out "better" than a LAB luminance correction. If you can provide a sample I'd love to see it. It does exist somewhere, I'm sure. These esoteric discussions are great and very interesting but at some point you have to show why your ramblings result in a better image. I'm open to see what you can produce guys.

Cheers
Dave
Attached Images
File Type: jpg BlueHeron.jpg (52.6 KB, 31 views)
Reply With Quote
Reply

  RetouchPRO > Technique > Photo Restoration


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solar Curve Cameraken Photo Retouching 26 06-23-2012 08:33 PM
Dodge and burn with curve layers Lithodia Photo Retouching 19 05-15-2010 11:53 PM
Hidden Power Curve Presets Tony Gander Hidden Power Support 6 06-16-2007 05:30 AM
How Do You Make A Nice Smooth Curve In PS? rnbluvva Image Help 5 01-13-2007 10:08 AM
Curve Adjustments T Paul Scratch Pad 17 06-15-2005 05:53 PM

Advertise Here


All times are GMT -6. The time now is 06:34 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 Doug Nelson. All Rights Reserved