raffriff42
14th March 2018, 01:03
I've been looking for a way to control curves-style filters with a simple "slider" interface. Each slider add or subtracts brightness at a particular luminance level -- like a graphic EQ in the audio world:
https://www.dropbox.com/s/pc6es67x3o2n5tf/geq_31v.jpg?raw=1
... except not so many sliders! The solution I have created supports 2, 3, 5, 7 or 9 sliders (which I call "points") -- and 9 is too many!
Also included in the script is a soft limiter, included simply because it has a lot of code in common with the curve filters.
All use LaTo's SmoothAdjust (http://forum.doom9.org/showthread.php?t=154971)/SmoothCurves to do their work; all I did was make it easier to supply the parameters. Also, added support for RGB and 8-16 bit depth.
Note, you may get an error like "Ycurve is not valid!" - this probably means you attempted a curve that is too radical -- back off and/or move the neighboring points so the change between them is not so abrupt.
Use as few points as possible; if more control is needed, "upgrade" to the filter with the next larger amount of points -- starting with SmoothPoints2, to SmoothPoints3, to SmoothPoints5 etc.
The script is located here (https://raw.githubusercontent.com/raffriff42/AvisynthPlusUtilities/master/SmoothPoints.avsi). Requires AviSynth+ (http://avisynth.nl/index.php/AviSynth+), SmoothAdjust (http://forum.doom9.org/showthread.php?t=154971) and Utils-r41.avsi (https://raw.githubusercontent.com/raffriff42/AvisynthPlusUtilities/master/Utils-r41.avsi)
Here are some typical curves generated by each filter - the first image is the source.
https://www.dropbox.com/s/8tdo906c3003cc8/SmoothPoints-demo-100-ramp.png?raw=1 https://www.dropbox.com/s/1wnmqzyw2ruodxq/SmoothPoints-demo-101-limiter.png?raw=1 https://www.dropbox.com/s/hs5qih5bicvtl5y/SmoothPoints-demo-102-pts2.png?raw=1 https://www.dropbox.com/s/r2hrx1ueukeznji/SmoothPoints-demo-103-pts3.png?raw=1 https://www.dropbox.com/s/216k8huy02da2v5/SmoothPoints-demo-104-pts5.png?raw=1 https://www.dropbox.com/s/38jeoyym79i0cim/SmoothPoints-demo-105-pts7.png?raw=1 https://www.dropbox.com/s/iz44xvc1cmmqq2k/SmoothPoints-demo-106-pts9.png?raw=1
https://www.dropbox.com/s/pc6es67x3o2n5tf/geq_31v.jpg?raw=1
... except not so many sliders! The solution I have created supports 2, 3, 5, 7 or 9 sliders (which I call "points") -- and 9 is too many!
Also included in the script is a soft limiter, included simply because it has a lot of code in common with the curve filters.
All use LaTo's SmoothAdjust (http://forum.doom9.org/showthread.php?t=154971)/SmoothCurves to do their work; all I did was make it easier to supply the parameters. Also, added support for RGB and 8-16 bit depth.
Note, you may get an error like "Ycurve is not valid!" - this probably means you attempted a curve that is too radical -- back off and/or move the neighboring points so the change between them is not so abrupt.
Use as few points as possible; if more control is needed, "upgrade" to the filter with the next larger amount of points -- starting with SmoothPoints2, to SmoothPoints3, to SmoothPoints5 etc.
The script is located here (https://raw.githubusercontent.com/raffriff42/AvisynthPlusUtilities/master/SmoothPoints.avsi). Requires AviSynth+ (http://avisynth.nl/index.php/AviSynth+), SmoothAdjust (http://forum.doom9.org/showthread.php?t=154971) and Utils-r41.avsi (https://raw.githubusercontent.com/raffriff42/AvisynthPlusUtilities/master/Utils-r41.avsi)
Here are some typical curves generated by each filter - the first image is the source.
https://www.dropbox.com/s/8tdo906c3003cc8/SmoothPoints-demo-100-ramp.png?raw=1 https://www.dropbox.com/s/1wnmqzyw2ruodxq/SmoothPoints-demo-101-limiter.png?raw=1 https://www.dropbox.com/s/hs5qih5bicvtl5y/SmoothPoints-demo-102-pts2.png?raw=1 https://www.dropbox.com/s/r2hrx1ueukeznji/SmoothPoints-demo-103-pts3.png?raw=1 https://www.dropbox.com/s/216k8huy02da2v5/SmoothPoints-demo-104-pts5.png?raw=1 https://www.dropbox.com/s/38jeoyym79i0cim/SmoothPoints-demo-105-pts7.png?raw=1 https://www.dropbox.com/s/iz44xvc1cmmqq2k/SmoothPoints-demo-106-pts9.png?raw=1