Frequency Seperation.

Moderator: Kathy_9

Post Reply
zombielord
Posts: 22
Joined: Tue Jul 15, 2014 3:07 am
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUSTeK COMPUTER INC. Z87-K
processor: Intel Core i7 4770K [3.5Ghz 4.1Ghz OC]
ram: 32GB DDR3
Video Card: NVIDIA GeForce GTX 770 2GB
sound_card: Realtek High Definition Audio
Hard_Drive_Capacity: 8 TB
Monitor/Display Make & Model: ASUS Pro Art PA248, ViewSonic VP2785-4K
Corel programs: PsP2018, VSx10, Painter 2018, AS3 Pro
Contact:

Frequency Seperation.

Post by zombielord »

So I did a bit of research and developed this technique from a couple of how-to's and made a script.
User feedback, and script improvements are welcome.
I hope you find this useful. :D

Technique:
  • Right-Click Background Layer > Duplicate
    Right-Click Copy of Background Layer > Rename > Skin Blur
    PSP Main Menu > Adjust > Add / Remove Noise > Median Filter > 13
    NOTE: add prompt and suggest (12-15 pixels) could also also use guasian blur
    PSP Main Menu > Edit > Copy
    PSP Main Menu > Edit > Paste as New Image
    PSP Main Menu > Image > Negative Image

    Left-Click original image > De-select layer visibilty (click the eye) of skin blur
    Left-Click negative image > Image Arithmetic

    Image #1: original image
    Image #2: negative image
    Function: Add
    Check On: All channels
    Divisor: 2
    Bias: 0

    Copy Newly created grey image as layer on original image
    Left-Click > Set Layer to Hard Light > 100
    Right-Click > Rename > Skin Texture
    Right-Click > Duplicate
    Right-Click > Copy of Skin Texture > 65
    Right-Click > Rename > Skin Texture Mask & Merge
Frequency Seperation.PspScript

Code: Select all

from PSPApp import *

def ScriptProperties():
    return {
        'Author': u'Joshua D. Meadows',
        'Copyright': u'\u00A9 Joshua D. Meadows',
        'Description': u'',
        'Host': u'PaintShop Pro',
        'Host Version': u'20.00'
        }

def Do(Environment):
    # EnableOptimizedScriptUndo
    App.Do( Environment, 'EnableOptimizedScriptUndo', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # LayerDuplicate
    App.Do( Environment, 'LayerDuplicate', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # Median
    App.Do( Environment, 'Median', {
            'Aperture': 13, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # Copy
    App.Do( Environment, 'Copy', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # PasteGraphicAsNewImage
    App.Do( Environment, 'PasteGraphicAsNewImage', {
            'CreateFromDropData': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': 0, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # NegativeImage
    App.Do( Environment, 'NegativeImage', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': -1, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # LayerSetVisibility
    App.Do( Environment, 'LayerSetVisibility', {
            'Command': App.Constants.ShowCommands.Hide, 
            'Path': None, 
            'WorkingMode': 1, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': 1, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # Arithmetic
    App.Do( Environment, 'Arithmetic', {
            'AllChannels': True, 
            'Bias': 0, 
            'Channel1': 0, 
            'Channel2': 0, 
            'ClipColorValues': True, 
            'Divisor': 2, 
            'Function': App.Constants.ArithmeticFunctions.Add, 
            'SourceImage1': -1, 
            'SourceImage2': 0, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': 1, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # Copy
    App.Do( Environment, 'Copy', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': -2, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # PasteAsNewLayer
    App.Do( Environment, 'PasteAsNewLayer', {
            'CreateFromDropData': False, 
            'InsertPos': -1, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # LayerDuplicate
    App.Do( Environment, 'LayerDuplicate', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 75, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': None
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((20,0,0),1)
                }
            })

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 71, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': None
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((20,0,0),1)
                }
            })

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 65, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': None
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((20,0,0),1)
                }
            })

    # Vector Selection Update
    App.Do( Environment, 'VectorSelectionUpdate', {
            'Path': (0,-1,[],False), 
            'Type': App.Constants.ObjectSelection.Select, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # Vector Selection Update
    App.Do( Environment, 'VectorSelectionUpdate', {
            'Path': (0,1,[],False), 
            'Type': App.Constants.ObjectSelection.Select, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'Skin Texture 65', 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': None
                }, 
            'BlendRanges': None, 
            'Path': (0,0,[],False), 
            'ArtMediaTexture': None, 
            'Effects': None, 
            'BrightnessContrast': None, 
            'ChannelMixer': None, 
            'ColorBalance': None, 
            'CurveParams': None, 
            'HSL': None, 
            'Threshold': None, 
            'Levels': None, 
            'Posterize': None, 
            'Vibrancy': None, 
            'Overlay': None, 
            'LocalToneMapping': None, 
            'Invert': None, 
            'HistogramAdjustment': None, 
            'FillLightClarity': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # Vector Selection Update
    App.Do( Environment, 'VectorSelectionUpdate', {
            'Path': (0,-1,[],False), 
            'Type': App.Constants.ObjectSelection.Select, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'Skin Texture 100', 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': None
                }, 
            'BlendRanges': None, 
            'Path': (0,0,[],False), 
            'ArtMediaTexture': None, 
            'Effects': None, 
            'BrightnessContrast': None, 
            'ChannelMixer': None, 
            'ColorBalance': None, 
            'CurveParams': None, 
            'HSL': None, 
            'Threshold': None, 
            'Levels': None, 
            'Posterize': None, 
            'Vibrancy': None, 
            'Overlay': None, 
            'LocalToneMapping': None, 
            'Invert': None, 
            'HistogramAdjustment': None, 
            'FillLightClarity': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': None, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': App.Constants.BlendMode.HardLight
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((20,0,0),1)
                }
            })

    # Vector Selection Update
    App.Do( Environment, 'VectorSelectionUpdate', {
            'Path': (0,1,[],False), 
            'Type': App.Constants.ObjectSelection.Select, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': None, 
                'Name': None, 
                'IsVisible': None, 
                'IsTransparencyLocked': None, 
                'LinkSet': None, 
                'UseHighlight': None, 
                'PaletteHighlightColor': None, 
                'GroupLink': None, 
                'BlendMode': App.Constants.BlendMode.HardLight
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((20,0,0),1)
                }
            })

    # LayerSetVisibility
    App.Do( Environment, 'LayerSetVisibility', {
            'Command': App.Constants.ShowCommands.Show, 
            'Path': (0,-2,[],False), 
            'WorkingMode': 0, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Default, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': 1, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # FileClose
    App.Do( Environment, 'FileClose', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': 0, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # FileClose
    App.Do( Environment, 'FileClose', {
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

    # SelectDocument
    App.Do( Environment, 'SelectDocument', {
            'SelectedImage': 0, 
            'Strict': False, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((20,0,0),1)
                }
            })

Lastly a shameless plug for my website: http://joshuameadowsphotography.com
Painter 2018, Paintshop Pro 2018 Ultimate, Aftershot 3, VIdeo Studio x7, WinDVD Pro 11, PhotoMirage
>>> http://joshuameadowsphotography.com <<<
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Frequency Seperation.

Post by Jean-Luc »

I tested...
Are you sure your steps are complete ?

It doesn't make the image softer. Or I'm missing something ? :)
Tried on this image (and others)
comment-se-debarrasser-des-rides-sous-les-yeux 900x800.jpg
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
LeviFiction
Advisor
Posts: 6831
Joined: Thu Oct 02, 2008 1:07 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Alienware M17xR4
processor: Intel Core i7-3630QM CPU - 2_40GH
ram: 6 GB
Video Card: NVIDIA GeForce GTX 660M
sound_card: Sound Blaster Recon3Di
Hard_Drive_Capacity: 500GB
Corel programs: PSP: 8-2023
Location: USA

Re: Frequency Seperation.

Post by LeviFiction »

I don't think it's supposed to make the image softer. I think it's just trying to separate the textures to their own layers. What effect you decide to bring to it after that is up to you.
https://levifiction.wordpress.com/
Jean-Luc
Advisor
Posts: 2177
Joined: Sat Oct 22, 2011 10:50 pm
operating_system: Windows 10
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: ASUS Computer N751J
processor: Intel i7_4710 HQ 2_50GHz
ram: 16GB
Video Card: NVIDIA GeForce GTX 850M
sound_card: NVIDIA High Definition Audio
Hard_Drive_Capacity: 2 Tb
Monitor/Display Make & Model: NVIDIA GeForce GTX 850M
Corel programs: PSP X7, X9, 2018 to 2023
Location: Belgium (French speaking)
Contact:

Re: Frequency Seperation.

Post by Jean-Luc »

LeviFiction wrote:I don't think it's supposed to make the image softer. I think it's just trying to separate the textures to their own layers. What effect you decide to bring to it after that is up to you.
Thank you. I understand now that the script achieves only a preliminary task. Was not clear for me...
:oops:
THE PAINTSHOP PRO COOKBOOK - GENEALOGY WITH PAINTSHOP PRO
Installed PSP Ultimate: X7, X9, 2018, 2019, 2020, 2021, 2022, 2023
Post Reply