scharfis_brain
15th May 2004, 09:44
Found this by accident.
unsharp masking with limiting the edgemask:
x=xxxsource("blabla.xxx")
# apply sharpening strength here 0 = lowest
s=48
# apply edge limiting here 127 = lowest limiting
w=5
i=x.blur(1.58)
j=subtract(i,x).levels(0+s,1,255-s,0,255)
w=w*(128/s)
k=j.levels(127-w,1,128+w,127-w,128+w)
l=subtract(x,k).subtitle("limited")
m=subtract(x,j).subtitle("normal")
stackhorizontal(x.subtitle("original"),l,m)
to use it as smoother, just swap i & x in the j= line
unsharp masking with limiting the edgemask:
x=xxxsource("blabla.xxx")
# apply sharpening strength here 0 = lowest
s=48
# apply edge limiting here 127 = lowest limiting
w=5
i=x.blur(1.58)
j=subtract(i,x).levels(0+s,1,255-s,0,255)
w=w*(128/s)
k=j.levels(127-w,1,128+w,127-w,128+w)
l=subtract(x,k).subtitle("limited")
m=subtract(x,j).subtitle("normal")
stackhorizontal(x.subtitle("original"),l,m)
to use it as smoother, just swap i & x in the j= line