mikeytown2
28th January 2009, 10:42
After watching this video here (Skip to about 19 Min in, the rest of it is kinda boring...)
http://meetthegimp.org/episode-085-geeks-only-really/
I decided to replicate this using the files provided via this link
http://simplefilter.de/en/analysis/contrast.html
http://simplefilter.de/download/SF_Contrast_Testkit_RGY.zip
Run Script Below and have fun testing various AviSynth sharpeners!
#Number of pixels In (1-5)
pixels = 5
#Don't Change
colors = 256
depth = pixels*2-1
#Gray Bars
BlankClip(1,colors,colors*depth,"YV12",25, color=$000000)
base = mt_lutspa(false, mt_polish("(x%2)?127-(x/2):128+(x/2)"), U=-128, V=-128).PointResize(width*depth, height)
#Gradient
gradient_mask = base.GraMaMa(4, 0, colors*depth, 0, colors*depth)
#Blank Clip
BlankClip(1,colors*depth,colors*depth,"YV12",25, color=$000000)
blank=last
#Red Channel
mtString_red = (depth==3) ? mt_polish("(x%3==0)?255:(x%3==2)?255:0") : \
(depth==5) ? mt_polish("(x%5==0)?255:(x%5==2)?255:(x%5==4)?255:0") : \
(depth==7) ? mt_polish("(x%7==0)?255:(x%7==2)?255:(x%7==4)?255:(x%7==6)?255:0") : \
(depth==9) ? mt_polish("(x%9==0)?255:(x%9==2)?255:(x%9==4)?255:(x%9==6)?255:(x%9==8)?255:0") : \
mt_polish("0")
red = mt_lutspa(false, mtString_red, U=-128, V=-128)
#Green Channel
mtString_green = (depth==3) ? mt_polish("(x%3==1)?255:0") : \
(depth==5) ? mt_polish("(x%5==1)?255:(x%5==2)?255:(x%5==3)?255:0") : \
(depth==7) ? mt_polish("(x%7==1)?255:(x%7==2)?255:(x%7==3)?255:(x%7==4)?255:(x%7==5)?255:0") : \
(depth==9) ? mt_polish("(x%9==1)?255:(x%9==2)?255:(x%9==3)?255:(x%9==5)?255:(x%9==6)?255:(x%9==7)?255:0") : \
mt_polish("0")
green = mt_lutspa(false, mtString_green, U=-128, V=-128)
#Blue Channel
mtString_blue = (depth==7) ? mt_polish("(x%7==3)?255:0") : \
(depth==9) ? mt_polish("(x%9==3)?255:(x%9==4)?255:(x%9==5)?255:0") : \
mt_polish("0")
blue = mt_lutspa(false, mtString_blue, U=-128, V=-128)
#RGB Channel - Color Mask
rgy_color_mask = MergeRGB(red, green, blue)
base
##########################
#Test Your Sharpener Here#
##########################
LimitedSharpenFaster()
##########################
#End of Sharpener Area #
##########################
Overlay(last, gradient_mask, mode="difference", pc_range=true)
Levels(129,128,0,0,255,false)
(Depth==1) ? last : Overlay(rgy_color_mask, last, mode="multiply", pc_range=true)
PointResize(width,512).Spline64Resize(512,512).Levels(0,4,255,0,255)
GraMaMa() - http://www.geocities.com/wilbertdijkhof/
mt_***() - http://avisynth.org/mediawiki/MaskTools2
Here's LSF Output (yes it's not all black - click on the thumbnail)
http://img217.imageshack.us/img217/5241/lsfni9.th.png (http://img217.imageshack.us/my.php?image=lsfni9.png)
EDIT:
Use this to test about any function... DeHalo, Resize, Blur, ect...
EDIT:
Thanks J_Darnley for using masktools!
EDIT:
Using Better Colors -Cyan & Magenta
Better resize for high pixel count - Easier to read, still gets the idea across.
http://meetthegimp.org/episode-085-geeks-only-really/
I decided to replicate this using the files provided via this link
http://simplefilter.de/en/analysis/contrast.html
http://simplefilter.de/download/SF_Contrast_Testkit_RGY.zip
Run Script Below and have fun testing various AviSynth sharpeners!
#Number of pixels In (1-5)
pixels = 5
#Don't Change
colors = 256
depth = pixels*2-1
#Gray Bars
BlankClip(1,colors,colors*depth,"YV12",25, color=$000000)
base = mt_lutspa(false, mt_polish("(x%2)?127-(x/2):128+(x/2)"), U=-128, V=-128).PointResize(width*depth, height)
#Gradient
gradient_mask = base.GraMaMa(4, 0, colors*depth, 0, colors*depth)
#Blank Clip
BlankClip(1,colors*depth,colors*depth,"YV12",25, color=$000000)
blank=last
#Red Channel
mtString_red = (depth==3) ? mt_polish("(x%3==0)?255:(x%3==2)?255:0") : \
(depth==5) ? mt_polish("(x%5==0)?255:(x%5==2)?255:(x%5==4)?255:0") : \
(depth==7) ? mt_polish("(x%7==0)?255:(x%7==2)?255:(x%7==4)?255:(x%7==6)?255:0") : \
(depth==9) ? mt_polish("(x%9==0)?255:(x%9==2)?255:(x%9==4)?255:(x%9==6)?255:(x%9==8)?255:0") : \
mt_polish("0")
red = mt_lutspa(false, mtString_red, U=-128, V=-128)
#Green Channel
mtString_green = (depth==3) ? mt_polish("(x%3==1)?255:0") : \
(depth==5) ? mt_polish("(x%5==1)?255:(x%5==2)?255:(x%5==3)?255:0") : \
(depth==7) ? mt_polish("(x%7==1)?255:(x%7==2)?255:(x%7==3)?255:(x%7==4)?255:(x%7==5)?255:0") : \
(depth==9) ? mt_polish("(x%9==1)?255:(x%9==2)?255:(x%9==3)?255:(x%9==5)?255:(x%9==6)?255:(x%9==7)?255:0") : \
mt_polish("0")
green = mt_lutspa(false, mtString_green, U=-128, V=-128)
#Blue Channel
mtString_blue = (depth==7) ? mt_polish("(x%7==3)?255:0") : \
(depth==9) ? mt_polish("(x%9==3)?255:(x%9==4)?255:(x%9==5)?255:0") : \
mt_polish("0")
blue = mt_lutspa(false, mtString_blue, U=-128, V=-128)
#RGB Channel - Color Mask
rgy_color_mask = MergeRGB(red, green, blue)
base
##########################
#Test Your Sharpener Here#
##########################
LimitedSharpenFaster()
##########################
#End of Sharpener Area #
##########################
Overlay(last, gradient_mask, mode="difference", pc_range=true)
Levels(129,128,0,0,255,false)
(Depth==1) ? last : Overlay(rgy_color_mask, last, mode="multiply", pc_range=true)
PointResize(width,512).Spline64Resize(512,512).Levels(0,4,255,0,255)
GraMaMa() - http://www.geocities.com/wilbertdijkhof/
mt_***() - http://avisynth.org/mediawiki/MaskTools2
Here's LSF Output (yes it's not all black - click on the thumbnail)
http://img217.imageshack.us/img217/5241/lsfni9.th.png (http://img217.imageshack.us/my.php?image=lsfni9.png)
EDIT:
Use this to test about any function... DeHalo, Resize, Blur, ect...
EDIT:
Thanks J_Darnley for using masktools!
EDIT:
Using Better Colors -Cyan & Magenta
Better resize for high pixel count - Easier to read, still gets the idea across.