Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th August 2014, 17:45   #1  |  Link
peterhuh
Registered User
 
Join Date: Jul 2003
Location: Singapore
Posts: 26
Looking for a USM filter with 8 pixel radius.

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.
__________________
Oh! Signature! My very own Signature! What should I put?! What can I write?! I must write something! Something that everyone can see! And it will appear at the bottom of my every post! Then everybody will be able to read my signature! Nobody will not read my signature! Somebody will tell others to read my signature! Which will be at the bottom of my every post! And i ca...<cropped>
peterhuh is offline   Reply With Quote
Old 16th August 2014, 21:08   #2  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
There're a couple of USM filters (and other sharpeners) linked on the wiki.
colours is offline   Reply With Quote
Old 17th August 2014, 04:56   #3  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
I know of two good ways;
- with VariableBlur by Tritical:
Code:
# 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:
Code:
## 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:
Code:
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

Last edited by raffriff42; 17th August 2014 at 05:14.
raffriff42 is offline   Reply With Quote
Old 17th August 2014, 16:02   #4  |  Link
peterhuh
Registered User
 
Join Date: Jul 2003
Location: Singapore
Posts: 26
NonlinUSM seems to do the trick!

Thanks!
__________________
Oh! Signature! My very own Signature! What should I put?! What can I write?! I must write something! Something that everyone can see! And it will appear at the bottom of my every post! Then everybody will be able to read my signature! Nobody will not read my signature! Somebody will tell others to read my signature! Which will be at the bottom of my every post! And i ca...<cropped>
peterhuh is offline   Reply With Quote
Old 17th August 2014, 22:13   #5  |  Link
zerowalker
Registered User
 
Join Date: Jul 2011
Posts: 1,121
Mind showing Before/After, out of interest?
zerowalker is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:15.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.