RetouchPRO

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


Photo Retouching "Improving" photos, post-production, correction, etc.

Curve of a curve of a curve...

Reply
 
Thread Tools
  #11  
Old 04-14-2015, 10:18 AM
skoobey skoobey is offline
Senior Member
 
Join Date: Jan 2012
Posts: 1,376
Re: Curve of a curve of a curve...

Quote:
Originally Posted by AKMac View Post
I for one would really like to know the answer. If PS makes a calculation 'in stack order', how does it recalculate when you remove a curve layer from the middle of the stack? And if it simply takes all the numbers from all the curve layers and does one calculation, why should there be a cumulative error?
I can't believe you are the one asking this.
It's simple, like in any other math. Every adjustment layer produces a new number value for each channel.
Now the next adjustment layer uses the resulting number. Once you remove a layer from the stack, pixels that it was affecting get re-calculated by adjustments above one by one.

So, every adjustment calculation treats everything underneath it as if it was a single layer.

There is a cumulative error because things get rounded up(as you know Photoshop turns RGB 0-255 values into decimals 0-1, and then rounds up after the third figure/decimal before it turns it into a 0-255 number yet again,meaning you get some clipping). This is for 8 bit, in 16 bit same rule applies, it's just a larger resulting number(but it doesn't matter, because photoshop still calculates based on 0-1 before returning the results to 0-65536)

And then there the clipping issue. When doing conflicting adjustments, if the R,G,B value has hit it's maximum brightness or minimum brightness as a result of adjustments before being affected by the top adjustment in the layer stack, the resulting calculation will be very different from using a single adjustment and not get conflict, or using multiple cumulative adjustments that don't conflict(example brighten vs. darken curve).

Layer stack doesn't matter in some calculations(especially if results are not values that clip), a+b=c same as b+a=c

Last edited by skoobey; 04-14-2015 at 10:35 AM.
Reply With Quote top
  #12  
Old 04-14-2015, 10:31 AM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
Re: Curve of a curve of a curve...

Here's a rough experiment result.

By my figuring, the one curve should cancel out the other. Do you agree? I used the arrow keys and a calculator to place the points.

Forgive the animated GIF, but it is merely to illustrate something happened, the quality isn't important. Orig was RGB/8, 900x600.

So, unless I've made some erroneous assumptions along the way, this should pretty much settle it.

What do you think, does it stand up?
Attached Images
File Type: png curve.png (17.8 KB, 12 views)
File Type: png inversecurve.png (17.7 KB, 12 views)
File Type: gif curvecurve.gif (74.4 KB, 13 views)
Reply With Quote top
  #13  
Old 04-14-2015, 10:35 AM
skoobey skoobey is offline
Senior Member
 
Join Date: Jan 2012
Posts: 1,376
Re: Curve of a curve of a curve...

No, they don't. I disagree. Give me a minute, I'll show you why.

It's like baking, adding to much salt, and then adding sugar to make it less salty won't result in the initial meal.

case-in-pint.jpg

Last edited by skoobey; 04-14-2015 at 10:42 AM.
Reply With Quote top
  #14  
Old 04-14-2015, 10:37 AM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
Re: Curve of a curve of a curve...

Anticipating one possible question, here's the same thing recreated in 16bit. I redrew the gradient in 16bit, not just a conversion.
Attached Images
File Type: gif 16bitcurvecurve.gif (52.6 KB, 5 views)
Reply With Quote top
  #15  
Old 04-14-2015, 10:43 AM
skoobey skoobey is offline
Senior Member
 
Join Date: Jan 2012
Posts: 1,376
Re: Curve of a curve of a curve...

Look at my example and a lot of things will be clear. We don't need to go into math, even though it's simple math, results speak for them selves.

Problem with your experiment is that you're trying to do things on pixels that have same values in all channels, so it's less apparent.

This happens because the second curve is no longer calculating based on the initial pixels, but rather based on the resulting pixels of the first curve.

Last edited by skoobey; 04-14-2015 at 10:50 AM.
Reply With Quote top
  #16  
Old 04-14-2015, 10:51 AM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
Re: Curve of a curve of a curve...

Obviously they don't cancel each other, as we both just demonstrated. But shouldn't they cancel out in theory? If +delta = -delta, shouldn't you end back up with the original value? So therefore any introduced difference is all on Photoshop?
Reply With Quote top
  #17  
Old 04-14-2015, 10:58 AM
skoobey skoobey is offline
Senior Member
 
Join Date: Jan 2012
Posts: 1,376
Re: Curve of a curve of a curve...

No, they shouldn't, here is why(math behind it, I am not going into parabolas, showing you a simpler example).

So, let's say first curve says value of 120+20%. That results in value of 136
Second curve says resulting value of the first -20%. So, 136-27.2=108.8
Reply With Quote top
  #18  
Old 04-14-2015, 11:06 AM
AKMac's Avatar
AKMac AKMac is offline
Senior Member
 
Join Date: Dec 2010
Location: London and Argyll, Scotland.
Posts: 309
Re: Curve of a curve of a curve...

Quote:
Originally Posted by skoobey View Post
I can't believe you are the one asking this.
It's simple, like in any other math. Every adjustment layer produces a new number value for each channel.
Now the next adjustment layer uses the resulting number. Once you remove a layer from the stack, pixels that it was affecting get re-calculated by adjustments above one by one.

So, every adjustment calculation treats everything underneath it as if it was a single layer.
I understand the principle of the above, but I thought that it was just a simplified model of a more sophisticated, interactive computation - more than just blindly adding the values of each adjustment layer from the bottom to the top of the stack. And I also had the impression that after multiple adjustment layers were merged, the histogram ended up looking a lot healthier than it did when the calculations were only pending.
Reply With Quote top
  #19  
Old 04-14-2015, 11:09 AM
John Wheeler's Avatar
John Wheeler John Wheeler is offline
Senior Member
 
Join Date: May 2011
Location: Colorado
Posts: 583
Re: Curve of a curve of a curve...

A lot of good posts. Answers to a couple questions

Inverting an adjustment curve with an Invert Adjustment Layer just mirrors the curve around the horizontal output line between 127 and 128.

To create an inverse Curves Adjustment Layer you need a curve that is mirrored about the 45 degree angle line from lower left to upper right or the line where output = input (the default starting line in the Curves Adjustment Layer). Doing so accurately is possible yet difficult. There are also restrictions as not every curve has an inverse (details not included).

However, Doug, there is another way to show that errors accumulate with increasing number of adjustment layers and make that visible in Photoshop. Note that this does not answer the question whether you care or not about those errors as such errors are often (yet not always) masked.

The only premise that you have to believe in is that using 16 bit mode will create smaller errors than 8 bit mode. I think that includes most everyone yet there are still some that believe the world is flat If you are one of those, then don't bother with the rest of this experiment.

The basics of the experiment below is to take a test image using 3 Curve Adjustment Layers done in 8 bit mode, compared to the exact same test image and identical 3 Curve Adjustment Layers done in 16 bit mode. The above is repeated with 3 additional Curve Adjustment Layers (6 total) again both in 8 bit mode and 16 bit mode. The results will show that there are more introduced errors with 6 Curve Adjustment Layers than 3 Curve Adjustment Layers. (Note, the total number of Curve Adjustment Layers is arbitrary as long as the 8 bit best and 16 bit test are using identical curves)

Note that this can all be done in a single Layer stack in Photoshop using Smart Objects.

1) Create you test image in 16 bit mode. I used one created per https://luminous-landscape.com/how-t...r-test-charts/ yet most any image or test chart will do (Andrew Rodney has provided many in the past as well).

2) Add 3 Curves adjustment Layers (its best not to clip your output yet not a must)

3) Group the above 3 adjustment Layers into a Layer Group (leave it in the default collapsed state)

4) Add 3 more Curve Adjustment Layers and put those also into their own Layer Group (also leave it in the default collapsed state)

5) Select all Layers and convert to a Smart Object (if PS asks, don't change color space and leave in 16 bit mode). Label this Layer as "16 bit SO"

6) Create a duplicate yet independent Smart Object by command Layer>Smart Object>New Smart Object via Copy
Label this Smart Object as "8 bit SO"
(note it is important that the SO is created as independent or the experiment wont work)

7) Open the "8 bit SO" and change the mode from 16 bit to 8 bit. Cmd/Cntl+S to Save the Smart Object (I usually close a Saved SO yet that is optional)

8) Back in the main stack, change the "8 bit SO" Layer to a blend mode of difference. The image will mostly be black as this is accumulated errors that are only a few bits off. With the info panel open you can run your mouse over the image to see the RGB errors

9) To make these errors more visible, add a Levels Adjustment Layer and move the Highlight slider down to a low number until the accumulated errors for 6 Curve Adjustment Layers.

10) Stamp this image to a new Layer at the top of the Layer Stack with Shift+Opt/Alt+Cmd/Cntl+E
Then turn off visibility of this new Layer for Later viewing

11) Open up the "8 bit SP" Layer and turn off one of the two groups of Curve Ajustment Layers so only 3 Curve Adjustment Layers are being applied. Cmd/Cntl+S to save the SO

12) Do the same as in step 11 except with the "16 bit SP." Make sure you turn off the exact same Curves Adjustment Layer Group as you did in Step 11. Cmd/Cntl+S to save the SO

13) Now displayed are the amplified accumulated errors using only 3 Curves Adjustment Layers. Note that the number and magnitude of the errors is less than when using 6 adjustment Layers.

14) You can toggle the view by turning on the visibility of the previously created stamped Layer for comparison.

----------------
Even with this academic exercise, you would be challenged to see any difference with your eye looking at the 8 bit version of the adjusted test image vs the 16 bit version. It is visible in some types of images such as low noise images with slowly changing gradients. The difference is in the eye of the beholder for any given image.

Below are a couple screen shots with the first being the original test image, followed by the amplified errors with 3 adjustment Layers and the third with the amplified errors of 6 adjustment Layers.

Original Test Image
http://jkwphoto.smugmug.com/photos/i...-ZskzN45-L.jpg

Accumulated errors with 3 Curves Adjustment Layers:

http://jkwphoto.smugmug.com/photos/i...-fr9Z7Jx-L.jpg

Accumulated errors with 6 Curves Adjustment Layers:

http://jkwphoto.smugmug.com/photos/i...-hdddzGg-L.jpg

Hope this experiment was helpful.
Reply With Quote top
  #20  
Old 04-14-2015, 11:10 AM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
Re: Curve of a curve of a curve...

Aren't curves absolute mappings? Input value is changed directly to an output value? (again, theoretical curves)
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Retouching


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
How to make a live curve in photoshop... Eedmonam Photo Retouching 14 04-26-2015 02:10 AM
Fair skin curve Matilda Photo Retouching 2 06-28-2013 09:14 PM
Position vacant - Curve Digital Ltd Noodles Classifieds 0 06-03-2013 07:13 AM
Robert Randall mglover92 Photo Retouching 20 03-03-2012 10:45 AM
Did you know this about the S curve? I didn't! Rexx Photo Restoration 15 04-11-2005 07:10 AM


All times are GMT -6. The time now is 11:15 AM.


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