Log in

View Full Version : Removing extreme edge ringing


simple_simon
19th February 2023, 21:39
https://i.ibb.co/s6VfLnH/title-t02-mkv-snapshot-00-05-150.jpg

This source has extreme edge ringing (I think that's the right term). I can mostly get rid of it with this script:

Spline36Resize(360,480)
Spline36Resize(720,480)

But of course I'm losing half the resolution and the result is very blurry. Is there a better way to do this?

Reel.Deel
19th February 2023, 22:52
Try vsLGhost (http://avisynth.nl/index.php/VsLGhost).

FFImageSource("title-t02-mkv-snapshot-00-05-150.jpg")
vsLGhost(mode=[1,1,1], shift=[3,6,-4], intensity=[10,10,10])

https://i.ibb.co/6PSmNNb/ghosts.png

I only spent a few minutes messing with the settings, I'm sure it can be fine tuned to get a better result.

Selur
20th February 2023, 18:58
With Vapoursynth applying 2xYAHR also seems to work fine: https://imgsli.com/MTU2ODU1
Trying YAHR in Avisynth might help too.

anton_foy
20th February 2023, 20:51
Why dont you try just a horizontal blur in luma and merge with original?

Katie Boundary
21st February 2023, 05:50
My first try would be

blur(1,0).sharpen(1,0)

But I don't know how effective that would be.

simple_simon
22nd February 2023, 20:44
https://imgsli.com/MTU3MjQz

vsLGhost looked interesting but I honestly couldn't figure out how to use it. This is the script I ended up using. It was really slow but the results are surprisingly really good. Thanks for everyone who offered suggestions. I learned some new tricks.

z_convertformat(pixel_type="YUV420P16")
neo_fft3d(sigma=5.0,y=2)
smdegrain(prefilter=4)
clipY=spline36resize(360,480).propSet("_FieldBased",0).deep_resize(720,480,grain=0,qual=2,gpuid=-1)
mergeluma(clipY, 0.75)
yahr().yahr()
lsfplus(strength=160,preset="slow",soft=30)
finedehalo()
addgrainc(3)

Dogway
23rd February 2023, 07:33
You can try some deconvolution and pass it through an edge mask:
a=last
ex_unsharp(-1.0,0,Fc=width())
ex_unsharp( 2.0,0,Fc=width(),safe=true)

ex_merge(a,FlatMask(2))