Frequency Separation -- various techniques?

Here everybody can post his problems with PhotoLine
bkh
Betatester
Posts: 3663
Joined: Thu 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Post by bkh »

photoken wrote:
bkh wrote: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.
Ah, I see. That's nonsense, of course, because the HF range gets clipped. If you divide by 2 before (e.g. using a histogram correction) instead of setting High Pass to 50% intensity, the High Pass filter actually works fine, at least in PL.

Cheers

Burkhard.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

bkh wrote:
photoken wrote: I didn't. The technique I'm talking about is the second technique that's described further down on the Web page.
Ah, I see. That's nonsense, of course, because the HF range gets clipped. If you divide by 2 before (e.g. using a histogram correction) instead of setting High Pass to 50% intensity, the High Pass filter actually works fine, at least in PL.
Yes. The technique was described as being quick and dirty, and I certainly found it to be too "dirty" for my use! :wink:
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

cathodeRay,

I pretty much agree with your comments. For frequency separation methods, I wholeheartedly accept that a rigorous mathematical analysis is essential. That analysis is too dry and abstract for me to dive into, but I'm interested in the consensus opinion. In other words, for me, I'll put the resulting methods to my usage tests -- I don't want to lose sight of the fact that the important thing is to get a tool that works.

So far, I've looked at the "quick&dirty" method and rejected it. I've also successfully used the PL 3-layer method and like it a lot. If you and Burkhard have agreed that his action posted in the other discussion is the way to implement the virtual copy method, then I'll experiment with that one next.

I have my doubts about whether I'll need the flexibility to change the blurring at will and whether I'll need the ability to non-destructively remove defects/blemishes. I'm thinking that it's different than using adjustment layers for Curves and Histograms. Those adjustments are appropriate to do non-destructively and also be able to fine-tune their effects because varying one affects the others, etc. With defect/blemish removal the defect is either removed or not. Once the defect is removed, I'll never want to go back later and say "Gee, maybe I should let some more of the defect show."
cathodeRay wrote: 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?)
Yep. The difference mode check I used for the "quick&dirty" HighPass high frequency method was useful in that it showed me the areas to carefully examine. The check on the PL 3-layer method set my mind at ease about the layer's utility for me. These checks are basically a one-time thing I'll use in evaluating the methods, certainly not something that I'll be doing each time I use Frequency Separations.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Posts: 3663
Joined: Thu 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Post by bkh »

photoken wrote:I have my doubts about whether I'll need the flexibility to change the blurring at will and whether I'll need the ability to non-destructively remove defects/blemishes. I'm thinking that it's different than using adjustment layers for Curves and Histograms. Those adjustments are appropriate to do non-destructively and also be able to fine-tune their effects because varying one affects the others, etc. With defect/blemish removal the defect is either removed or not. Once the defect is removed, I'll never want to go back later and say "Gee, maybe I should let some more of the defect show."
I guess that's not the main point. Adjusting the radius after one has done retouch work probably doesn't make sense – it's just like retouching on top of a curves layer – change the curves, and the retouch layer doesn't fit any more.

Imo, the advantage of the virtual copies approach is that you can easily fine-tune the blur radius, looking at either the low pass or high pass layer and having just one control for both. Once you are done, you can still reduce the LF and HF groups to single layers, if that's what you prefer to work with. It would be easy to do that in the action as well. Depending on your experience, however, it's often enough to set the blur radius interactively, without using all that virtual layer stuff.

Cheers

Burkhard.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

bkh wrote:Imo, the advantage of the virtual copies approach is that you can easily fine-tune the blur radius, looking at either the low pass or high pass layer and having just one control for both.
I agree. Virtual copies very much have that advantage. What I'll be experimenting with is to see if that fine-tuning capability is important to me.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
cathodeRay
Mitglied
Posts: 151
Joined: Sun 15 Nov 2015 12:37

Re: Frequency Separation -- various techniques?

Post by cathodeRay »

First off, because this thread is as much about actions as FS methods, I do still struggle with the lack of transparency/ability to edit recorded actions. I have just recorded a 'simple' action for a simple FS stack and as I always seem to made a few wrong moves and would like to remove the wrong move and its correction but when the Action stack looks something like:

Show Layer
Show Layer
Show Layer

It's not obvious (as an example) which layer is being is being shown... If you could open the action as a script in a text editor life would be so much easier! There are also times when a specific action eg a move at the end of a set of recorded actions doesn't in fact get recorded. If one could edit a script/text file, these things could be sorted out quickly and easily. Another inconvenience, at least for me, is that actions are fussy about/lively when being selected - rather tricky to simply and calmly select one and play it. At the moment, the action is not tidy enough to put in the public domain.

I also wonder whether the Undo List (which is actually a 'Done' list until it is used to Undo) could be converted to an action. You could tweak the list until it was just so, and then convert it to an action.

Now, with that out of the way: I don't think there has to be an 'official' action or method to get to a working FS: we can all use what we prefer, perhaps changing what we prefer in different circs (which is in fact what we're doing anyway!). What is important is that we know what we are doing, and why, and have a means to check that our separation is valid, and that no artefacts have unwittingly been introduced. Personally, I like the way virtual layers mean we get real-time feedback on how the blur radius is affecting the HF layer, but that's just me, and most likely my inexperience (I'm still very much learning about FS in practice).

I also personally happen to like non-destructive editing on blank transparent layers. As noted elsewhere, this (as far as I can tell) works fine for any 'paint' process ie anything that applies pixels but doesn't work when modifying pixels (sharpen/blur, darker/brighter brush etc), because there are no pixels to modify (unless you've painted some on). Burning and dodging (as opposed to using the darker/brighter brush) can however be done non-destructively using the mid-grey overlay/soft light layer method.

Say I wanted, on the photo of the girl in the previous threads, to remove the lines under the lateral side of her right eye: I think that is routinely done by painting in mid grey on the HF layer. But what if I overdo it, and take out details I want to keep? I have to reset the layer stack, quite possibly in the process deleting other retouches I do want to keep.

Say I want to enhance the eyelashes - add some digital mascara? Tricky. Exactly that detail is on the HF layer but whoops, have to reset the stack again when I accidentally give her the Barbara Cartland look. Get rid of the yellow tinge around the RH corners of the mouth? A little easier because here I can add a blank transparent adjustment layer above the LF layer and paint gently on that (all these adjustments I do with all the layers visible so I can see the effect on the final image, not the layer I'm working on). If I'm not concentrating, and give the hair a pinkish tinge, no problem, just erase that bit. Come back the following day, and want to tweak things after a rest away from staring at the image? No problem.

I'm still working on the optimum way to achieve these subtle retouches...

cathodeRay
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

cathodeRay wrote:First off, because this thread is as much about actions as FS methods, I do still struggle with the lack of transparency/ability to edit recorded actions.
I agree with your comments about the difficulty of editing recorded actions -- for the simple revisions to the PL Frequency Filter I posted in another discussion, it was excruciating to get the correct names onto the correct layers.

You're right that if the PL actions were a human-readable script it would make things a lot easier.

A loooooonnnngggg time ago I posted a request that PL replace its Undo List with a "real" History panel -- one that supports non-linear undos. If we had such a History panel, then it would be possible to tie it into creating actions: select the appropriate items in the panel and write them into an action. Wouldn't even need a human-readable script in that case. PaintShopPro has that feature and it worked really nicely.

P.S. After spending over two years cursing whenever I wanted to select an action and having the action's name become edited, I finally got smart and switched the Actions panel to "Button Mode". Ahhhh...Life is good! :D
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Posts: 3663
Joined: Thu 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Post by bkh »

cathodeRay wrote:First off, because this thread is as much about actions as FS methods, I do still struggle with the lack of transparency/ability to edit recorded actions. I have just recorded a 'simple' action for a simple FS stack and as I always seem to made a few wrong moves and would like to remove the wrong move and its correction but when the Action stack looks something like:

Show Layer
Show Layer
Show Layer

It's not obvious (as an example) which layer is being is being shown... If you could open the action as a script in a text editor life would be so much easier!
I don't see the advantage of an editable script here. The comamnd would still be "Show Layer" because it refers to the active layer. It's one of the characteristics of PL scripts that it uses (mostly) relative layer movements – and I prefer it that way, because in this way, scripts can be used anywhere in the layer stack. Not even talking about the huge amount of numbers you'd be confronted with when all the parameters of some adjustment layers would have to be converted into text format.

For debugging, you can simply open the action in the action panel and "replay" it step by step (by executing one step after the other – the only thing I'm sometimes missing is a proper "single step" which automatically selects the next step). If there's a mistake, you can modify/delete/move/copy the step, you can record any missing step etc. This is much better than editing a script in an editor and having to try it as a whole.
cathodeRay wrote:Another inconvenience, at least for me, is that actions are fussy about/lively when being selected - rather tricky to simply and calmly select one and play it.
Not sure what you mean. Maybe it's a Windows problem?
cathodeRay wrote:I also wonder whether the Undo List (which is actually a 'Done' list until it is used to Undo) could be converted to an action. You could tweak the list until it was just so, and then convert it to an action.
Might be convenient at times. But since PL doesn't record everything, and because one usually does a lot of unnecessary steps while experimenting, it's probably more work to fix up such a script than to make a new one once you know what you are doing.

Cheers

Burkhard.
User avatar
Hoogo
Betatester
Posts: 3936
Joined: Sun 03 Jul 2005 13:35
Location: Mülheim/Ruhr

Re: Frequency Separation -- various techniques?

Post by Hoogo »

You can sort actions and the steps within with drag&drop.
Some readable format for actions would be nice to use an editor for editing.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
cathodeRay
Mitglied
Posts: 151
Joined: Sun 15 Nov 2015 12:37

Re: Frequency Separation -- various techniques?

Post by cathodeRay »

I can see the benefits of using a relative numbering system, but that doesn't have to be lost, think VBA in Excel, cell locations can be absolute or relative (offsets eg do this to the cell 2 cells to the right and one cell down). It does seem others who have far longer and great experience with PL than I also appear to like the idea of editable scripts. Just pop into the script and change the name of a layer, for example - much easier and simpler. Get rid of blown code etc. Absolutely agree non-linear undo/redo would be great.

I haven't fired it up in earnest recently for anything complex but I used to use Corel Photo Paint before it went off the rails (really was quite good, but had some absolute no-no's for today eg no real 16 bit capabilities) and as I recall it, it had an ability to convert a set of 'Done' actions to a script. Scripts could also be edited, albeit in a rather obtuse script if I remember right.

The fussy/lively action names thing is the same thing as Ken described. Even the lightest click/touch triggers an editable name, rather than just selecting the action so it can be run. I will try 'Button Mode'...

PL's capriciousness in what is recorded can be confusing eg I'm pretty sure if the last action in an action recording is to move a (virtually) duplicated layer to the top of the stack (as we might do for a visual check layer in a FS stack), it doesn't get recorded. If you could edit action scripts, there might be a command MoveLayerUp(x, y) where x is the number of layers to move up, with 0 = top of stack, and y is optional 0 or 1 for make moved layer active/inactive - or whatever etc. SetLayerMode(x, y) where x is a string, the name for the blend mode, and y is the opacity, defaults to 100%.

I fully appreciate any such changes are likely to be an immense amount of coding work and may not be a priority for the developers. Whatever, I still think PL is superb, and only matched by the quality of discussion and help in the forum here!

cathodeRay
bkh
Betatester
Posts: 3663
Joined: Thu 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Post by bkh »

cathodeRay wrote:The fussy/lively action names thing is the same thing as Ken described. Even the lightest click/touch triggers an editable name, rather than just selecting the action so it can be run. I will try 'Button Mode'...
I see what you mean. If the item is already selected and you aren't fast enough while double-clicking, the name field "opens" for editing. I usually press the arrow on bottom of the panel to start an action, probably that's why I don't mind too much.
cathodeRay wrote:PL's capriciousness in what is recorded can be confusing eg I'm pretty sure if the last action in an action recording is to move a (virtually) duplicated layer to the top of the stack (as we might do for a visual check layer in a FS stack), it doesn't get recorded.
The general rule is that all menu actions are recorded. PL has gotten better at recording things in the layer panel, but if you want to be sure that layer selection and layer movements are recorded properly, use the menu commands under Document -> Arrange and Layer -> Management. Among others, there is a command for placing a layer on the top of the layer stack.

Cheers

Burkhard.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

After a good night's sleep, I'll retract the intensity of my complaints about editing actions. I think they're still difficult to edit, but that could be due to my lack of experience with stepping through their items and knowing how to insert new items. Will have to work with them some more, I guess....

One thing occurred to me, though: If keeping the actions as binary means they're very small and extremely quick to run, then it's OK by me. In other words, if making the actions human-readable and editable in a text editor means having to implement a large, somewhat slow parser, etc., that would not be good, IMO.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
bkh
Betatester
Posts: 3663
Joined: Thu 26 Nov 2009 22:59

Re: Frequency Separation -- various techniques?

Post by bkh »

bkh wrote:Of course, it could be rewritten using a high pass filter constructed from Gaussian blur, even with virtual layers, if necessary.
So here's an action with separation into three frequencies which doesn't produce artefacts (except for rounding errors). Because of the increased number of calculations, rounding errors might be more visible than in a 2way frequency filter, so if in doubt, work with 16 bits of colour depth.

Since the Gaussian Blur layers are hidden deeply in groups, the action will open these groups for you. Use them to set the cutoff for low frequencies and high frequencies. It's probably best to reduce the frequency layers to one layer each before you start retouching, start with the high frequencies layer and work your way down, otherwise you'll destroy some virtual layers which are still needed.

EDIT: improved action further down this thread: http://www.pl32.com/forum3/viewtopic.ph ... 328#p38328.
Have fun!

Cheers

Burkhard.
Last edited by bkh on Fri 05 Feb 2016 14:21, edited 1 time in total.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

bkh wrote: So here's an action with separation into three frequencies ...
OK, thanks for that! :) I'll put it through its paces this weekend.
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.
User avatar
photoken
Mitglied
Posts: 2162
Joined: Sat 28 Sep 2013 01:25

Re: Frequency Separation -- various techniques?

Post by photoken »

Hmmm....

One quick thing I've noticed about the 3-way VC FS action is that it slightly darkens more of the image pixels than does the PL FS action. In other words, the PL action slightly darkens only the most dark pixels, thus slightly increasing the contrast in the dark areas (such as the iris), which is a Good Thing. This Virtual Copy action slightly darkens a wider range of pixels, thus slightly decreasing the contrast which is Not Good.

The effect is extremely subtle, to be sure. So subtle, in fact, that it probably is inconsequential for real world editing, but still.... It's more noticeable if I first reduce the 3 FS groups to one layer each in preparation for retouching.

Unfortunately this forum software is f*ing up attachments, rejecting 95Kb screenshots as being larger than the 128Kb maximum, so I can't attach samples now. :( I'll try again tomorrow...
Ken
Yes, I think it can be eeeeeasily done....
Just take everything out on Highway 61.