Script: Wavelet decompose for skin retouching

Moderator: Kathy_9

Post Reply
User avatar
gbotes
Posts: 104
Joined: Wed Sep 30, 2015 11:31 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16GB
Hard_Drive_Capacity: 500Gb
Corel programs: Paint Shop Pro X8, Aftershot 2
Location: South Africa
Contact:

Script: Wavelet decompose for skin retouching

Post by gbotes »

There is a wavelet decompose plugin for Gimp which I have used over the years for skin retouching. I haven't found anything similar for PSP, so I recorded this script in PSP X8. It operates in a similar fashion to the Gimp plugin, and gives me similar results.

Code: Select all

from PSPApp import *

def ScriptProperties():
    return {
        'Author': u'G Botes',
        'Copyright': u'Free to share, use and improve',
        'Description': u'Frequency separation into 5 wavelets (wavelet d'\
            u'ecompose)',
        'Host': u'PaintShop Pro',
        'Host Version': u'18.00'
        }


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

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

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

    # Gaussian Blur
    App.Do( Environment, 'GaussianBlur', {
            'Radius': 2, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

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

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 50, 
                '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': ((18,0,0),1)
                }
            })

    # LayerMergeDown
    App.Do( Environment, 'LayerMergeDown', {
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

    # Color Adjust HSL
    App.Do( Environment, 'ColorAdjustHSL', {
            'HSL': {
                'Colorize': False, 
                'Master': (0,-100,0), 
                'MasterColorize': (0,0,0), 
                'Red': (0,0,0,315,345,15,45), 
                'Green': (0,0,0,75,105,135,165), 
                'Blue': (0,0,0,195,225,255,285), 
                'Cyan': (0,0,0,135,165,195,225), 
                'Magenta': (0,0,0,255,285,315,345), 
                'Yellow': (0,0,0,15,45,75,105)
                }, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'1st wavelet', 
                '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': ((18,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.Overlay
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((18,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': ((18,0,0),1)
                }
            })

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

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

    # Gaussian Blur
    App.Do( Environment, 'GaussianBlur', {
            'Radius': 4, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

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

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 50, 
                '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': ((18,0,0),1)
                }
            })

    # LayerMergeDown
    App.Do( Environment, 'LayerMergeDown', {
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

    # Color Adjust HSL
    App.Do( Environment, 'ColorAdjustHSL', {
            'HSL': {
                'Colorize': False, 
                'Master': (0,-100,0), 
                'MasterColorize': (0,0,0), 
                'Red': (0,0,0,315,345,15,45), 
                'Green': (0,0,0,75,105,135,165), 
                'Blue': (0,0,0,195,225,255,285), 
                'Cyan': (0,0,0,135,165,195,225), 
                'Magenta': (0,0,0,255,285,315,345), 
                'Yellow': (0,0,0,15,45,75,105)
                }, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,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.Overlay
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((18,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': ((18,0,0),1)
                }
            })

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

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

    # Gaussian Blur
    App.Do( Environment, 'GaussianBlur', {
            'Radius': 8, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

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

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 50, 
                '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': ((18,0,0),1)
                }
            })

    # LayerMergeDown
    App.Do( Environment, 'LayerMergeDown', {
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

    # Color Adjust HSL
    App.Do( Environment, 'ColorAdjustHSL', {
            'HSL': {
                'Colorize': False, 
                'Master': (0,-100,0), 
                'MasterColorize': (0,0,0), 
                'Red': (0,0,0,315,345,15,45), 
                'Green': (0,0,0,75,105,135,165), 
                'Blue': (0,0,0,195,225,255,285), 
                'Cyan': (0,0,0,135,165,195,225), 
                'Magenta': (0,0,0,255,285,315,345), 
                'Yellow': (0,0,0,15,45,75,105)
                }, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,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.Overlay
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((18,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': ((18,0,0),1)
                }
            })

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

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

    # Gaussian Blur
    App.Do( Environment, 'GaussianBlur', {
            'Radius': 16, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

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

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 50, 
                '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': ((18,0,0),1)
                }
            })

    # LayerMergeDown
    App.Do( Environment, 'LayerMergeDown', {
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

    # Color Adjust HSL
    App.Do( Environment, 'ColorAdjustHSL', {
            'HSL': {
                'Colorize': False, 
                'Master': (0,-100,0), 
                'MasterColorize': (0,0,0), 
                'Red': (0,0,0,315,345,15,45), 
                'Green': (0,0,0,75,105,135,165), 
                'Blue': (0,0,0,195,225,255,285), 
                'Cyan': (0,0,0,135,165,195,225), 
                'Magenta': (0,0,0,255,285,315,345), 
                'Yellow': (0,0,0,15,45,75,105)
                }, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,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.Overlay
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((18,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': ((18,0,0),1)
                }
            })

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

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

    # Gaussian Blur
    App.Do( Environment, 'GaussianBlur', {
            'Radius': 32, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

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

    # MultiObjectProperties
    App.Do( Environment, 'MultiObjectProperties', {
            'General': {
                'Opacity': 50, 
                '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': ((18,0,0),1)
                }
            })

    # LayerMergeDown
    App.Do( Environment, 'LayerMergeDown', {
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

    # Color Adjust HSL
    App.Do( Environment, 'ColorAdjustHSL', {
            'HSL': {
                'Colorize': False, 
                'Master': (0,-100,0), 
                'MasterColorize': (0,0,0), 
                'Red': (0,0,0,315,345,15,45), 
                'Green': (0,0,0,75,105,135,165), 
                'Blue': (0,0,0,195,225,255,285), 
                'Cyan': (0,0,0,135,165,195,225), 
                'Magenta': (0,0,0,255,285,315,345), 
                'Yellow': (0,0,0,15,45,75,105)
                }, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,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.Overlay
                }, 
            'Effects': None, 
            'WorkingMode': 1, 
            'Path': None, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Silent, 
                'AutoActionMode': App.Constants.AutoActionMode.AllAlways, 
                'Version': ((18,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': ((18,0,0),1)
                }
            })

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

    # Gaussian Blur
    App.Do( Environment, 'GaussianBlur', {
            'Radius': 9, 
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default, 
                'AutoActionMode': App.Constants.AutoActionMode.Match, 
                'Version': ((18,0,0),1)
                }
            })

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

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'2nd wavelet', 
                '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': ((18,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': ((18,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'3rd wavelet', 
                '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': ((18,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': ((18,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'4th wavelet', 
                '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': ((18,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': ((18,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'5th wavelet', 
                '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': ((18,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': ((18,0,0),1)
                }
            })

    # Layer Properties
    App.Do( Environment, 'LayerProperties', {
            'General': {
                'Opacity': None, 
                'Name': u'blur layer', 
                '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': ((18,0,0),1)
                }
            })
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Script: Wavelet decompose for skin retouching

Post by JoeB »

First, thanks for the script. Lacking any prior knowledge of this stuff it would seem to me that it must have taken a lot of work to script this!

That said, I had to Google to find out what wavelet decompose actually meant and what you could do with it. Perhaps for more technical stuff like this it might help a bit if you posted a bit more info (or perhaps a link?) with a short explanation of what the purpose of the script is.

While I now have a rudimentary understanding it seems that it might take some more research and practice to make adequate use of this tool, but from what I've briefly read it does seem that it could be useful when trying to be somewhat more precise with skin retouching.

Thanks again for the hard work!
Regards,

JoeB
Using PSP 2019 64bit
User avatar
gbotes
Posts: 104
Joined: Wed Sep 30, 2015 11:31 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16GB
Hard_Drive_Capacity: 500Gb
Corel programs: Paint Shop Pro X8, Aftershot 2
Location: South Africa
Contact:

Re: Script: Wavelet decompose for skin retouching

Post by gbotes »

I thought about posting a link, JoeB, but then decided it would be better for those who are interested to Google it rather than being led or misled by me - it's more the misled I'd be worried about. I'm able to visualise what I want to do but not explain it very well, and frequency separation often still seems like a bit of mystery to me. The Gimp plugin is great, and works a bit better than my PSP script. But, my script does a fair job of approximating the Gimp tool's operation. I use the script to separate the texture of a face into layers and then I do skin smoothing, blemish removal, and so on, manually. Then I can back parts of the skin textures I separated to give me a more natural looking portrait.

I guess these links would be good places for those interested to start reading:
https://fstoppers.com/post-production/u ... nique-8699
https://pixls.us/articles/skin-retouchi ... decompose/
http://www.dpreview.com/forums/post/54636573
http://petapixel.com/2015/07/08/primer- ... etouching/
http://www.digitalartsonline.co.uk/tuto ... eparation/
http://phlearn.com/amazing-power-freque ... -photoshop

The biggest difficulty for me with PSP is that it doesn't have the same layers as Gimp, and there are several different ways one might attempt frequency separation and wavelet decompose. Hopefully, I'll refine my methods as I learn more about PSP and its scripting language.
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: Script: Wavelet decompose for skin retouching

Post by LeviFiction »

Is this anything like this tutorial by Photodrawken?

http://forum.corel.com/EN/viewtopic.php ... al#p259782

The tutorial is old and the images are no longer available.
https://levifiction.wordpress.com/
User avatar
gbotes
Posts: 104
Joined: Wed Sep 30, 2015 11:31 am
operating_system: Windows 7 Professional
System_Drive: C
32bit or 64bit: 64 Bit
ram: 16GB
Hard_Drive_Capacity: 500Gb
Corel programs: Paint Shop Pro X8, Aftershot 2
Location: South Africa
Contact:

Re: Script: Wavelet decompose for skin retouching

Post by gbotes »

Yes, LeviFiction. Very similar but not exactly the same. If I understand Photodrawken's tutorial correctly, the image should be split into a texture and colour (blurred) layer. I'm used to working with a few more layers - my script is meant to produce 5 texture layers and a colour layer. I find it easier to work with that way.
JoeB
Posts: 2778
Joined: Fri Mar 28, 2008 10:04 pm
operating_system: Windows 8.1
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: LENOVO 4524PE4 ThinkCentre M91p
processor: 3.10 gigahertz Intel Quad Core i5-2400
ram: 8 GB
Hard_Drive_Capacity: 4.6 TB
Corel programs: PSP 9, X7 to 2019, 32 & 64-bit
Location: Canada

Re: Script: Wavelet decompose for skin retouching

Post by JoeB »

Thanks for adding those links. I'll spend some free time checking them out.
Regards,

JoeB
Using PSP 2019 64bit
Post Reply