peterhuh
16th August 2014, 17:45
Hi!
I have this film in high definition but extremely soft focus. According to my pixel counting, the soft focus had a glow radius of about 8 pixels.
I was thinking of using a vanilla unsharp masking filter like those found in Photoshop and GIMP to "subtract" out the soft glow with USM's halo.
It works quite well in GIMP, but I had problem locating an equivalent filter for AVISynth. Most sharping filter uses 3x3 kernels which unsharps film grain rather than removing the soft glow.
I was wondering if anyone knows a USM filter with an option to adjust the radius. I never had a need to use a sharpener until now. Thanks in advance.
colours
16th August 2014, 21:08
There're a couple of USM filters (and other sharpeners) linked on the wiki (http://avisynth.nl/index.php/External_filters).
raffriff42
17th August 2014, 04:56
I know of two good ways;
- with VariableBlur by Tritical: # http://avisynth.nl/index.php/Variableblur
# http://forum.doom9.org/showthread.php?t=88645
# (libfftwf3-3.dll needs to be in the search path)
LoadPlugin(pathBase + "variableblur07\variableblur.dll")
#@function Unsharp(float "varY", float "varC", float "strength"[0-1], int "border"=4,
##\ bool "integrate"=false, int "Y"=3, int "U"=2,int "V"=2,
##\ int "gfunc"=-1, int "gfuncc"=-1, int "pcr"=0, int "pcrc"=0, int "nthreads")
##
Unsharp(varY=Sqrt(8.0), varC=Sqrt(4.0), strength=0.7)
- and with NonlinUSM by Didée:## posted at:
# http://forum.doom9.org/showthread.php?p=1555234#post1555234
#@function NonlinUSM(clip o, float "z", float "pow", float "str",
##\ float "rad", float "ldmp")
## @ z - default 6 (3 = subtle; 16 = massive)
## @ pow - default 1.6 (1.0 = oversharp; 4.0 = mild)
## @ str - default 0.7 (3 = strong; 18 = massive)
## @ rad - default 9 (0.6 = sharpen; 18 = soft)
## @ ldmp - default 0.001 (block overlap? 0.01 = a little smoother?)
##
NonlinUSM(z=6, pow=1.0, str=0.7, rad=8.0) NonlinUSM is much more versatile; recommended.
EDIT - for example:NonlinUSM(pow=4) ## enhance: for low bitrate sources
NonlinUSM(z=3, pow=4.0, str=1, rad=6) ## enhance less
NonlinUSM(z=6, str=1.5, rad=0.6).Sharpen(0.3) ## sharpen: for hi-q sources
NonlinUSM(z=3, str=2.5, rad=0.6) ## sharpen: less noise
NonlinUSM(z=6, pow=1.0, str=0.7, rad=6.0) ## unsharp
NonlinUSM(pow=1.0, rad=2, str=0.7) ## smoothen: for noisy sources
NonlinUSM(pow=1.0, rad=18, str=0.5) ## smear: soft glow
NonlinUSM(z=16, pow=4.0, str=18, rad=6) ## B+W psycho
NonlinUSM(z=16, pow=4.0, str=3, rad=6) ## sepia/artistic
NonlinUSM(z=6, pow=4.0, str=1, rad=36) ## local contrast
NonlinUSM(z=6, pow=1.0, str=1, rad=36) ## local contrast
NonlinUSM(z=16, pow=2.0, str=2, rad=36) ## solarized
peterhuh
17th August 2014, 16:02
NonlinUSM seems to do the trick!
Thanks!
zerowalker
17th August 2014, 22:13
Mind showing Before/After, out of interest?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.