Iain, your ‘Pyramid processing’ filter is very nice, thank you for this filter.
It can be used for color correcting. But then the filter must have the possibility to choose color spaces/channels.
For color correcting; a low noise value and a higher mix value (higher than is possible now), is required. With RGB [all], the results are fine.
I used the next code:
#@gui Pyramid processing2 : iain_pyramid_processing2,iain_pyramid_processing2(0)
#@gui : 1 levels = int(4,1,6)
#@gui : 2 noise = float(50,1,100)
#@gui : 3 mix = float(.5,0,3)
#@gui : sep = separator(), Channel(s) = choice(2,"All","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
#@gui : note = note("<small>Author : <i>Iain Fergusson</i>. 14 June 2017 - First release</small>")
iain_pyramid_processing2:
-repeat $! -l[$>]
-remove_opacity
-ac "
--l
dilate=1
blur=1
mix=$3
noise=$2
levels=$1
size={3^$levels}
cropwidth={w}
cropheight={h}
#-resize {w+($size-w%$size)},{h+($size-h%$size)},{d},{s},0,1,0.5,0.5
-resize {w+($size-w%$size)},{h+($size-h%$size)},{d},{s},0,1
-repeat $levels
-l[-1]
--resize[0] 33.33333%,33.33333%,{d},{s},2
--iain_resize_x3[-1]
-blur[-1] 1
-sub[0,-1]
-endl
-done
-repeat {$!-1}
-l[{$>}]
--abs
max={iM}
-dilate[-1] $dilate
-blur[-1] $blur
-max[-1] 0.00000000000000001
--fill[-1] $max
-div[-1] [-2]
-cut[-1] -1000000000,$noise
-mul[0,-1]
-k[0]
-endl
-done
-to_rgb
-repeat {$!-1}
-iain_resize_x3[-1]
-blur[-1] 1
-add[-1,-2]
-done
-crop 0,0,{$cropwidth-1},{$cropheight-1}
-replace_nan 0
-replace_inf 255
-n 0,255
-endl
-mul[0] {1-$mix}
-mul[1] $mix
-add
-c 0,255
",$4
-endl -done