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.
mikansei
Joined: Mon Mar 21, 2011 2:50 pm
Org Profile

What filter do I need? Is this artifact halo?

Postby mikansei » Mon Mar 21, 2011 6:17 pm

So I have this DVD with an artifact I haven't worked with yet. I've marked with red circles for you to see the artifact I mean: there's this colored shadow around the characters...
I guess this may be a halo artifact but would really appreciate if anyone could confirm and recommend me a filter for it. Do you recommend dehalo or something else?

Image

Image

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

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

Postby Scintilla » Mon Mar 21, 2011 9:36 pm

I think most of those are just crappy chroma bleeding (possibly chroma ghosting?) rather than actual haloing, in which case I'm not sure there's really all that much you can do about it.

I've seen filters that (in the process of trying to correct some other problem) can make chroma bleeding worse, but I don't remember ever seeing a filter that corrected the bleeding.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

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?

Postby mirkosp » Tue Mar 22, 2011 3:39 am

Yeah, there's haloing and chroma bleeding. For haloing you can try something like dehalo_alpha(darkstr=0,brightstr=0.8), whereas for the chroma bleeding your best bet is oversharpening only on the chroma (possibly warpsharpening could help in such a case), so using some strong sharpener within a mergechroma(), since, like scintilla said, there is no filter exactly thought out for chroma bleeding, afaik.
Image

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

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

Postby mikansei » Wed Mar 23, 2011 7:27 am

Thank you for your replies! I tried both dehalo_alpha and mergechroma (warpsharp) with only a slight improvement, barely noticable... :S

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Location: Concord, NC
Contact:
Org Profile

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

Postby Zarxrax » Wed Mar 23, 2011 10:52 am

The Chromashift filter might be able to help some.
I used to use it all the time on tv captures back in the day, as the chroma was almost always shifted a bit on them. I very rarely found a use for it on dvd sources though, as they rarely had such problems.

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?

Postby mirkosp » Thu Mar 24, 2011 3:56 am

It's not shifted chroma in this case, tho... just bleeding.
Image

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

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

Postby mikansei » Thu Mar 24, 2011 6:17 am

These are the different tests I've done:

In each picture I've written which filter I've used.

Image

Image


I haven't appreciate any change in the image using dehalo, mergechroma or both together. With Chromashift I've appreciate that the chroma bleeding moves from right to left but doesn't disappear :roll:

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?

Postby mirkosp » Thu Mar 24, 2011 3:13 pm

I had just given some basic parameters as a start, you were supposed to tweak them depending on the needs, you know...
Since I have more time now, here's something I put together. Please note that there are more instances of dehalo_alpha at a low strength and with different radii values because they are targeted at different halos and because different strength parameters give different results, so it is often better to call it more times at a lower strength than it is to just increase the strength.

Code: Select all

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=48))


Source Frame:
Image
Filtered Frame:
Image

Values are possibly overdone, especially for the warpsharpening. I suggest you tweak them further.
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?

Postby Mister Hatt » Thu Mar 24, 2011 5:07 pm

Either that dehalo setting is off or there is some luma floating going on. I'm thinking the former as the latter is ridiculously uncommon on a DVD or TV or pretty much anything other than remastered analog B&W conversions with a separate chroma clip, and as far as I am aware there are only like 4 films where people were dumb enough to do that. Maybe try camembert for autohax and pray for lack of jaggies? Tweaking dehalo_alpha is super annoying. Could also be some luma ghosting from the previous frame or field, a bit hard to tell with only the one shot.

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

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

Postby mikansei » Fri Mar 25, 2011 8:05 am

>mirkosp

Oh! Much better indeed! Thank you!
I didn't know I had to tweak it. Filter's syntax is difficult to understand for me. Now I'm reading the filter's tweak options but don't understand what each is for. Anyway, I will start tweaking the options to see which is best.

I have a couple of doubts:
- about dehalo:
mirkosp wrote:

Code: Select all

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=48))

do i have to put all the options you have written down for tweaking the video? or i have to choose just one? In case I need all of them, why is that?

- about mergechroma: here it gives a few examples of how to use it: http://avisynth.org/mediawiki/MergeChroma
I used this example for the sample images I posted yesterday:

Code: Select all

Chromavid = SpatialSmoother(2,3)
MergeChroma(chromavid,0.5)

but I see you have used just mergechroma(awarpsharp2(depth=48)) without using the "Chromavid". Is there any difference?

Frequently, when checking the help information for some filters, I find that the information about how to use the filter is not enough for me to understand since I don't know anything about programming language. Dehalo_alpha or Mergechroma would be an example... By just checking at http://avisynth.org/mediawiki/MergeChroma I may learn the tweaking options posted there but... how can I find out new ones like the one you posted? Do I need to be an expert or how do you guys learn tweaking options not posted there?

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?

Postby mirkosp » Fri Mar 25, 2011 9:01 am

For the dehalo_alpha, it's all of them, though you might want to adjust them a bit. I wrote the explanation in my earlier post:
mirkosp wrote:Please note that there are more instances of dehalo_alpha at a low strength and with different radii values because they are targeted at different halos and because different strength parameters give different results, so it is often better to call it more times at a lower strength than it is to just increase the strength.

This is in my experience, at least.
About the mergechroma... basically, a rule of thumb in avisynth is that if there's a clip parameter, it's going to be assumed as being "last" (if not specified) in most cases, this being one of such. Last in avisynth is often implied. For instance, when you write a script like

Code: Select all

avisource("my file.avi")
spline36resize(640,480)

What avisynth is reading is prolly along the lines of:

Code: Select all

last = avisource("my file.avi")
last = last.spline36resize(640,480)
return last

Or something like that.
So in the case of mergechroma that I used, what avisynth is seeing is pretty much:

Code: Select all

mergechroma(last.awarpsharp2(depth=48),last)

Thus why it works just fine.
Personally if I don't find enough info on the avisynth wiki (could happen with some external filters), I first check the filter's documentation itself and, if absent or not comprehensive, try to toy around with the filter as a last resort. I didn't really use any parameters that weren't listed on the wiki though, in this case.
At most, what I can suggest you is to follow niiyan's blog's RSS. It's a pretty good way to keep up to date with new filters and related stuff without having to check a lot of places on your own. :dino:
Image

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

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

Postby Scintilla » Fri Mar 25, 2011 8:07 pm

mirkosp wrote:last.spline36resize(last,640,480)

Pedantic note: using "last" both as the left side of the dot operator and as the first argument to the function is redundant, and I'd be a little surprised if it even ran without an error.

But everything else Mirkosp said is on target.
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

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?

Postby Mister Hatt » Sat Mar 26, 2011 6:22 am

That isn't redundant at all really. 99% of the time when you do that you are giving it an actual var name and if you left it out, you would be applying on a different clip. Mirko's usage of last there was to show what avs does internally, not how you'd actually write your code, but if you WERE writing something like that, you do need to have your clip objects called correctly.

User avatar
Scintilla
(for EXTREME)
Joined: Mon Mar 31, 2003 8:47 pm
Status: Quo
Location: New Jersey
Contact:
Org Profile

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

Postby Scintilla » Sat Mar 26, 2011 9:54 am

I didn't have any issue with the "last =" part of it; I understood why he was writing it out explicitly. My point was that, after that part, using "last" on the left side of the dot operator is just shorthand for using it as the first argument to whatever function comes on the right side. It would have been more correct to say just last = spline36resize(last,640,480).

In fact, I just confirmed that last.Undot(last) throws "Invalid arguments to function UnDot". It seems that if you use a clip plus dot operator before a function, AVISynth will no longer be expecting a clip as the first argument to the function and balk if you try to give it one (unless, of course, it also can accept a clip as its second argument).
ImageImage
:pizza: :pizza: Image :pizza: :pizza:

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?

Postby mirkosp » Sat Mar 26, 2011 1:37 pm

that's something I wasn't quite sure of, yeah. Fixed in the post, thanks for pointing it out, Scintilla. :)
Image


Return to “AviSynth Help”

Who is online

Users browsing this forum: No registered users and 4 guests