View Single Post
Old 7th July 2020, 14:28   #1  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,069
Sin squared kernel for resize (Gaussresize mod)

As numerical modeling shows sinus square function gives a bit narrower single pulse with given comparable outside non-linearity and non-monotonicality (ringing) in compare with gaussian function.

The modeling was done with web-accessible setup - you can check it at http://drakan.ru/FTProot/vid_work/LR...g_rest_en.html

For example at sigma = 0.85 gauss pulse has 0.5-level duration about 2T


and with T=3.7 sin squared pulse has 0.5-level duration 1.9T and significally better form near lower values.


Sinus squared function (pulse/kernel) is f(arg,T) (T as parameter)

for(abs(arg) < PI/2)
{
(cos(arg*T*PI))^2
}
else
0

(To be centered around 0 we replace sin(arg+pi/2) to cos() )/

Currently in avisynth only GaussResize gives acceptable results in attempts to get good anti-alized fonts for example or doing other high-quality anti-alized work. May be because of better pre-filtering.

So I assume using of sinus squared kernel instead of gaussian may gives a bit sharper results with same level of artifacts (ringing) control.

As building todays avisynth (+) is enough difficult for low-skilled programmer it will be nice if anyone with existing anisynth-build enviroment will make an additional resize function almost completely based on current GaussResize function with changed gauss kernel to sinus-squared kernel.
Also with additional parameter similair as GaussianResize have.

Last edited by DTL; 8th July 2020 at 12:47.
DTL is offline   Reply With Quote