What filter do I need? Is this artifact halo?

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by Mister Hatt » Sat Mar 26, 2011 11:36 pm

That sounds odd to me, I was talking about the method selector (clip.method()) so yeah. It should be fine with last.whatever() and in most contexts this is the correct thing to do when using a named variable on both sides of the assignment operator :S

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by mirkosp » Sun Mar 27, 2011 8:19 am

Mister Hatt wrote:That sounds odd to me, I was talking about the method selector (clip.method()) so yeah. It should be fine with last.whatever() and in most contexts this is the correct thing to do when using a named variable on both sides of the assignment operator :S
No, it's that I did last.spline36resize(last,640,480) in the example, but apparently avisynth doesn't like it being called as the clip paramenter too. Seems like you just have to do one or the other.
Image

mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by mikansei » Sun Mar 27, 2011 4:16 pm

>Mister Hatt
Mister Hatt wrote:Either that dehalo setting is off or there is some luma floating going on.
(...) Could also be some luma ghosting from the previous frame or field, a bit hard to tell with only the one shot.
I have uploaded a sample of the video for you to see: http://www.megaupload.com/?d=A2YO6L98
I can't really tell if there luma ghosting or not since I'm not even quite sure what luma ghosting is... although I think I know what you mean.


>Mirkosp

Thank you for the explanation but what does "last" mean in avisynth language and how does it influence a clip parameter?
Thank you also for the link, I will check it out!

I've been tweaking the depth parameter in mergechroma. You said that depth=48 may be possibly overdone, so I tried different depths and I at least I set it really high (depth=100), I didn't appreciate any difference in the resulting image. I tried depth=16 (default) and depth=40 or 48 among others and all of them give the same result. I'm satisfied with it btw. The chroma quality has improved a lot, I think.

About dehalo_alpha... I've observed the image's halos almost disappear completely but the image looses relief. I read Scintilla's miniguide on dehalo_alpha (http://www.aquilinestudios.org/avsfilte ... tml#dehalo) and it mentions it. I guess I have to choose between having more relief and halo or no halo and less relief, right? :)

mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by mikansei » Sun Mar 27, 2011 4:21 pm

Btw, this is the script as of now:

MPEG2Source("D:\sample.d2v")

TFM(slow=2, pp=5, clip2=TDeint(mode=2, type=3))
TDecimate()
DeRainbow()
dehalo_alpha(darkstr=0,brightstr=0.6,rx=2,ry=2)
dehalo_alpha(darkstr=0,brightstr=0.2,rx=2,ry=2)
dehalo_alpha(darkstr=0,brightstr=0.8,rx=2,ry=2)
dehalo_alpha(darkstr=0,brightstr=0.8,rx=1.2,ry=0.45)
dehalo_alpha(darkstr=0,brightstr=0.4,rx=1.2,ry=0.45)
dehalo_alpha(darkstr=0,brightstr=0.6,rx=1.2,ry=0.45)
mergechroma(awarpsharp2(depth=40))
Tweak(sat=1.2)
Crop(8, 2, -8, -0)
Spline36Resize(640,480)

The DVD is NTSC region 2.
In still have to add the antialising. In former test I've done, when converted to mp4 and played on full screen I see aliasing on the video.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by mirkosp » Sun Mar 27, 2011 8:00 pm

Uhm... it's kinda harder to explain than it is to understand, but you could sat that last in avisynth means the clip as it is returned by the line immediately before the line where you call last. Let's try with an example... say we want to do some simple antialiasing:

Code: Select all

spline36resize(last.width*2,last.height*2).nnedi3(nns=2).turnleft.nnedi3(nns=2).turnright.spline36resize(last.width,last.height)
running interpolators like that on a supersampled clip is a pretty common way to antialias, and you'll see that to do the supersampling I could just use the info from last. Since last is always the line before the one I am on, I know that doubling its width and height will supersample by 2 and if I call again with last's width and height I'll get back to the original resolution.
I made this example because it shows well that last refers always to the line before the one you're on and not just to whatever comes immediately before it. To get back to the original resolution, you'd have to halve width and height if last referred to what's on the left of the dot operator too, but it doesn't as I think I was able to explain.
Anyway, you can use last in a number of ways depending on what you have to do... I guess you'll be able to figure this on your own the more you'll write scripts based on needs.
Image

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by Mister Hatt » Mon Mar 28, 2011 3:18 am

If AA is needed, might be worth trying one of my Hyakko OVA anti-aliasers? As for the ghosting or whatever, I am unable to download your link, see what mirko or Cannonaire think of your footage. I would also try Camembert() on your haloing although it might flatten other parts of your image. Granted it won't smooth the fuck out of it like that dehalo_alpha() is bound to do, but it will certainly make aliasing more noticable. Over all I think you would have more detail via Camembert() though either way.

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by mirkosp » Mon Mar 28, 2011 5:59 am

The antialiasing there was just an example (and it's actually pretty close to what your naa does, just with nnedi3 instead of nnedi2 and without the _rpow2 upsampling). I wanted to make clear what avisynth uses as last and it was the first thing that came to my mind.
As for checking the source, I'm kind of tied up atm. I could dl and watch it, but it'd be a on a 6bpc monitor and I don't actually have avisynth at hand, so I wouldn't be able to help much right now... :(
Image

Mister Hatt
Joined: Tue Dec 25, 2007 8:26 am
Status: better than you
Contact:
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by Mister Hatt » Mon Mar 28, 2011 6:26 pm

I have 8bpc here but my internet blows and my res is tiny, so not much help either. Way to go us, cue Ryuuchin or Cannonaire? ww

User avatar
Cannonaire
Joined: Wed May 05, 2010 5:59 pm
Status: OVERLOAD
Location: Oregon
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by Cannonaire » Mon Mar 28, 2011 11:09 pm

I'll take a look at it. I can't seem to find a link for Camembert(). Anyone able to provide one?
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

User avatar
Cannonaire
Joined: Wed May 05, 2010 5:59 pm
Status: OVERLOAD
Location: Oregon
Org Profile

Re: What filter do I need? Is this artifact halo?

Post by Cannonaire » Tue Mar 29, 2011 1:08 am

This is how I would filter it:

Code: Select all

TFM(order=-1, field=-1, mode=1, PP=0, chroma=false)
TDecimate(mode=1, cycleR=1, cycle=5, rate=23.976, hybrid=0)
CanDerainE(str=255 , dstr=80, thr=2.0, radius=6, rthr=90, mask=false)
dehalo_alpha(darkstr=0,brightstr=0.6,rx=2,ry=2)
dehalo_alpha(darkstr=0,brightstr=0.2,rx=2,ry=2)
dehalo_alpha(darkstr=0,brightstr=0.8,rx=2,ry=2)
dehalo_alpha(darkstr=0,brightstr=0.8,rx=1.2,ry=0.45)
dehalo_alpha(darkstr=0,brightstr=0.4,rx=1.2,ry=0.45)
dehalo_alpha(darkstr=0,brightstr=0.6,rx=1.2,ry=0.45)
dehalo_alpha(darkstr=0,brightstr=0.4,rx=0.45,ry=2.0)
mergechroma(awarpsharp2(depth=12))
MCTemporalDenoise(settings="medium")
LSFmod(100)
NTSCSquare()
Crop(2, 4, -6, -0)
naa()
NTSCSquare: http://pastebin.com/AtDsyN1U (shamelessly linking my own script for simplicity's sake)
CanDerainE1: http://pastebin.com/X1GwkqWh (again)

You will probably want to adjust the crop() to something mod16, or at least mod8 (meaning the resolution can be divided by 16 or 8, respectively); the values given are a minimum by which you should crop. As for MCTemporalDenoise, it's a total pain to get it working and it also runs really slow, which is bad cause the script is already really slow. If you need to remove the noise, there are many other filters you can try instead. This page is a good resource for figuring out how to denoise: http://www.aquilinestudios.org/avsfilters/spatial.html

Screenshots:
Spoiler :
Group unfiltered
Image
Group filtered
Image
Spoiler :
Girl unfiltered
Image
Girl filtered
Image
Spoiler :
School unfiltered
Image
School filtered
Image
Also, thanks to mirkosp for the tip on using multiple dehalo_alpha() instead of just one. You have helped me tremendously!
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

Locked

Return to “AviSynth Help”