Frequency Separation -- various techniques?

Here everybody can post his problems with PhotoLine
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Frequency Separation -- various techniques?

Beitrag von photoken »

Frequency Separation is a method that is very useful in retouching images because it retains the texture of the subject. It's primarily, but not exclusively, used in portrait work.

cathodeRay and bkh have done good work in the other discussion thread
http://www.pl32.com/forum3/viewtopic.php?f=3&t=5120
with devising a method of creating frequency separation layers.

Now, I see that we have three fundamental methods of achieving frequency separation:
  • The "Frequency Filter" action included with PhotoLine.
  • The frequency separation method described above, using virtual copies for the layers.
  • A simple, quick method using a High Pass layer for the high frequency, as described in here:
    https://fstoppers.com/post-production/u ... nique-8699
I'm interested in your thoughts and comments about the relative merits, etc., regarding these three techniques. For example, the PL action appeals to me because it creates 3 frequency layers which theoretically gives more precise control. It also seems to me that the action automatically generates the frequencies according to the size/resolution of the original image, but I may be mistaken about that....
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
cathodeRay
Mitglied
Beiträge: 151
Registriert: So 15 Nov 2015 12:37

Re: Frequency Separation -- various techniques?

Beitrag von cathodeRay »

Some thoughts/observations, hopefully to get the discussion going:

(a) the Burkhard/cathodeRay method: simple, effective (and verifiable), but it's great virtue is it is dynamic (and non-destructive). You can change anything/go back at any time

(b) the PL included action with three layers: the good news if you got three layers to work on. The bad news is you've got three layers to complicate things... (plus no control over the action itself?)

(c) the HP filter method: there's quite a lot written out there pointing out that a HP method is not without its faults (errors). The definitive thread is High Pass Sucks. It's a huge thread but much interesting material, including the usual smattering of FS is evil/the Devil's Spawn/Ruins Art and all that. Well, anything (technical) that helps me get on with, and spend more time on, the art side of things is very welcome in my book.

cathodeRay
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Beitrag von photoken »

I'll start off with commenting on the HighPass hiqh frequency method:

I wanted to see for myself what the theoretical "faults" of this method looked like in the real world. The original image is an 8-bit 1,200px by 1,000px JPG and I used a radius of 8px for both the HighPass and the blurred low frequency images. The samples below are screen captures at 1,600% of the same area.

The original image:
original detail.jpg
The HighPass high frequency method:
HF HighPass detail.jpg
As expected, the HighPass method loses the highest highlight values; but you can see that it also loses the lowest low values, too.

I'd rather not lose that image info -- the highest highlights help define the spherical shape of the eye, and the lowest low values add depth to the image.

One of the advantages mentioned for the HighPass method is that it's much quicker to implement than the "standard" Frequency Separation method. This is true if one is creating the "standard" Frequency Separation layers manually in PhotoShop, but since both the PL methods are actions, there is no time penalty for using them.

Another advantage mentioned for the HighPass method is that the loss of the highest highlights can be desired if the original image is too "contrasty". Maybe so, but there are better ways of correcting overly bright highlights.

So, I'm rejecting the HighPass high frequency method for my use -- I want to retain the complexity of the highlights and shadowed areas as much as possible.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Beitrag von bkh »

cathodeRay hat geschrieben:(b) the PL included action with three layers: the good news if you got three layers to work on. The bad news is you've got three layers to complicate things... (plus no control over the action itself?)
Just a quick note that this method also uses the assumption that the High Pass filter is the precise counterpart of the Gaussian Blur filter, and thus does run into the same problems as the two layer High Pass filter/Gaussian combination.

Of course, it could be rewritten using a high pass filter constructed from Gaussian blur, even with virtual layers, if necessary.

Cheers

Burkhard.
cathodeRay
Mitglied
Beiträge: 151
Registriert: So 15 Nov 2015 12:37

Re: Frequency Separation -- various techniques?

Beitrag von cathodeRay »

Agreed, this is why I like the simplicity and transparency of the Original - LF = HF, HF + LF = Original logic, however it is applied.

cathodeRay
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Beitrag von photoken »

bkh hat geschrieben:
cathodeRay hat geschrieben:(b) the PL included action with three layers: the good news if you got three layers to work on. The bad news is you've got three layers to complicate things... (plus no control over the action itself?)
Just a quick note that this method also uses the assumption that the High Pass filter is the precise counterpart of the Gaussian Blur filter, and thus does run into the same problems as the two layer High Pass filter/Gaussian combination.
Not as far as I can see. Placing the PL action layers into a "draw isolated" group and changing the group's blend mode to "Difference" does not show any differences.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Beitrag von bkh »

photoken hat geschrieben:
bkh hat geschrieben:
cathodeRay hat geschrieben:(b) the PL included action with three layers: the good news if you got three layers to work on. The bad news is you've got three layers to complicate things... (plus no control over the action itself?)
Just a quick note that this method also uses the assumption that the High Pass filter is the precise counterpart of the Gaussian Blur filter, and thus does run into the same problems as the two layer High Pass filter/Gaussian combination.
Not as far as I can see. Placing the PL action layers into a "draw isolated" group and changing the group's blend mode to "Difference" does not show any differences.
Probably difficult to spot in real life pictures because the filter radii are quite small (2 and 8 Pixels), but relatively easy to see in a test image (left: original, right: frequency filter layer).
Frequency Filter.png
Note the darkened interior of the bright spots and the lighter interior of the dark spots.

Cheers

Burkhard.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Beitrag von photoken »

bkh hat geschrieben: Probably difficult to spot in real life pictures because the filter radii are quite small (2 and 8 Pixels), but relatively easy to see in a test image
OK, that's good to know, but I'll treat it as "no difference" in practical applications (for my use). This, again, is quite different than the HighPass high frequency method which exhibits very noticeable differences with photographic images.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Beitrag von bkh »

photoken hat geschrieben:
bkh hat geschrieben: Probably difficult to spot in real life pictures because the filter radii are quite small (2 and 8 Pixels), but relatively easy to see in a test image
OK, that's good to know, but I'll treat it as "no difference" in practical applications (for my use). This, again, is quite different than the HighPass high frequency method which exhibits very noticeable differences with photographic images.
Strange. For me, the error produced by this three frequencies action is worse (but acceptable, I agree) than for a single high pass in PL, and can be further reduced when using 16 bits of colour depth. Maybe you made a mistake when trying the ordinary high pass method (forgot to divide by 2 before applying the high pass filter)? Also, the errors produced by the three frequency action remain the same when using 16 bits. I am sure, though, that, if necessary, the three layers approach can also be fixed to work more precisely.

Cheers

Burkhard.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Beitrag von photoken »

bkh hat geschrieben: For me, the error produced by this three frequencies action is worse (but acceptable, I agree) than for a single high pass in PL,
Not here. This is the same sample image at 1,600%.

The original:
original.jpg
The PL Frequency Filter (3-layer) result:
3 layer.jpg
If I test by copying the original image to the top of the stack and setting its blend mode to "Difference", I see absolutely no differences at 1,600%. If I rapidly show and hide the PL 3-layer group above the original image, I do detect that something is changing, but it's very faint -- almost below the threshold of perception. Examining the above screenshots reveals that the 3-layer result actually slightly darkens the darkest values. The effect is to give a very little more "contrast" in the darkest areas, most noticeable in the iris. This is not a bad thing, as far as I'm concerned.
bkh hat geschrieben:Maybe you made a mistake when trying the ordinary high pass method (forgot to divide by 2 before applying the high pass filter)?
I did not divide by 2, as far as I know. I just followed the instructions in the above quoted Web page.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Beitrag von photoken »

bkh hat geschrieben:I am sure, though, that, if necessary, the three layers approach can also be fixed to work more precisely.
I'd be interested in seeing that.

Right now, pending further testing, my very strong preference is for the PL 3-layer Frequency Filter action. The primary reason is because of the stunning and absolutely beautiful simplicity of its result -- one group, three layers. Period. Nothing more, nothing less. I can simply dive right in and begin working without worrying about anything else.

I also like having the granularity of control that 3 frequency layers allows. If a blemish/defect can be corrected by modifying the mid-frequency layer while retaining the overlying texture of the high-frequency layer, that's excellent as far as I'm concerned.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Beiträge: 3674
Registriert: Do 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Beitrag von bkh »

photoken hat geschrieben:I did not divide by 2, as far as I know. I just followed the instructions in the above quoted Web page.
How did you do that "Scale 2" in PL, then?

Cheers

Burkhard.
Benutzeravatar
photoken
Mitglied
Beiträge: 2162
Registriert: Sa 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Beitrag von photoken »

bkh hat geschrieben:How did you do that "Scale 2" in PL, then?
I didn't. The technique I'm talking about is the second technique that's described further down on the Web page.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
cathodeRay
Mitglied
Beiträge: 151
Registriert: So 15 Nov 2015 12:37

Re: Frequency Separation -- various techniques?

Beitrag von cathodeRay »

Some general thoughts:

(a) in general, I try to avoid black box technology, especially at the science rather than practical application end. I can live with (and the choice is deliberate) the computer in my car but I am very wary of medical research that says X is/isn't good for us based on black box (you and I have no grasp of the techniques used) statistics. I also like parsimony.

(b) applying this to FS, my aim is to have the simplest, most transparent (as in I can understand it), reliable (gives the same results each time) and valid (no errors) system. The two separation virtual copy based stack with the HF layer derived from the LF layer achieves these things. it's incredibly flexible eg I can go back and change the blur method/radius at any time and the whole stack updates in real time. Verification is a doddle. I can spend more time retouching and less time fretting about whether my separations are OK.

(c) the High Pass Sucks thread and many other ones like it are testimony to how confusing many people find these complex and counter-intuitive 'recipes'. I think the discussion above about 'scale of 2' is a lightweight PL example. The (PS) 'scale of 2' is absolutely not essential, it is merely a supposed convenience (if indeed it is that, given the confusion it causes) so that you don't have to lower the opacity on the Linear Light layer by 50% - by dividing by 2, you've already reduced it to 50% so you leave it at 100% of 50%...no wonder folk get confused! 'Recipes' that appear to read like 'think of a number, multiply it by this, divide it by that and offest it by that' are to be avoided, especially when no rationale for the numbers is given at recipe time (its all very well giving the rationale later, but why not up-front? (Maybe a bit of a cult thing: "Me, I'm a PhotoShop Guru, see how cool I am", or even deliberate obf*ckstration. Thankfully the culture here at PL is the complete opposite!!!).

BTB, a thought about Difference mode checks - when the errors are present but diffuse (and so hard to see - so (Devil's advocate) why are we worrying anyway?), maybe adding a Threshold layer set to an appropriate extrema value would reveal what's what?
Benutzeravatar
Hoogo
Betatester
Beiträge: 4031
Registriert: So 03 Jul 2005 13:35
Wohnort: Mülheim/Ruhr

Re: Frequency Separation -- various techniques?

Beitrag von Hoogo »

I think lots of these magic tricks appear because an obvious mathematical formula has to be pressed into the number format of 0..255. Without sign...

That turns a quit simple "I need a layer that can store values from -255 up to 255, because that's the maximum difference" into something like "I need 128 to be the neutral value, and now I can only store -128 to +127 relative, so I have to multiply by 2, and I store the whole formula in a layer mode and name it with something with light".

Guess a lot of things will look much more logical when the question is not not about 8 or 16 Bit that are mapped to 0..1, but if there is a sign or an offset. HDR (32Bit) has the sign and does not really need the offset.

I assume there could be a frequency split for 32Bit that uses add as layer mode?
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!