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

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

Post by mikansei » Sat Apr 02, 2011 2:50 pm

@What happens the other way round?: If you crop a lot before resizing and then you resize using Spline36Resize(648, 480) the geometry remains?

I meant 640x480.

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 » Sat Apr 02, 2011 4:12 pm

http://ps-auxw.de/cgi-bin/ar-calc.pl

In order to keep the geometry you'll need to make sure you're doing a good cropping and keep in mind the active area etc... there's quite a bit of stuff behind it, so doing it by hand can be a bit tricky. I suggest you use that site to do the math.
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 » Sat Apr 02, 2011 4:49 pm

Actually that string was only a suggestion rather than an actual recommendation. I meant for you to tweak it. As I wrote it, it'd only be good for de-ringing rather than dehaloing.

@Cannonaire: colour is coming from same frame so I doubt temporal, I think it's more a spatial chroma blur as Scintilla mentioned. Also something to note is that ttempsmoof is actually just a faster less tweakable version of ttempsmooth, so you might want to do your testing on that and then see if it applies to ttempsmoothf as well.

Another hand up for ar-calc.pl here too, probably the second best AR calculator I can think of.

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 » Sun Apr 03, 2011 12:03 am

>Mister Hatt
The chroma bleeding is definitely temporal. I specifically picked a scene where the girl was laughing and every two or three frames she moves slightly up or down. The color bleeding you see closely follows the outline of where it is in the previous frame. Going to the frame after that the color is mostly back to how it should be because the new frame is flanked by two exactly like it.
mikansei wrote:@What happens the other way round?: If you crop a lot before resizing and then you resize using Spline36Resize(648, 480) the geometry remains?
I think you're confusing image geometry with aspect ratio. Geometry refers to whether the objects within the frame are correct or stretched - like my previous example of a circle being oval. Aspect ratio can refer to a few different things, but in this case your aspect ratio at 640x480 would be 4:3 exactly. If you use the script I gave you, it will give you correct geometry, and the geometry will not change even if you crop it again, thereby changing the aspect ratio.

I chose those odd-looking numbers because doing so gives you exactly the active picture area on an NTSC DVD. You can get a more thorough and pedantic explanation why those numbers are correct at this thread if you care: http://www.animemusicvideos.org/forum/v ... 5&t=101854

Also, maybe I should stop caring about this so much. All it does is give me grief and confuse people. It's not even the best way to handle stuff unless you mix a lot of sources. :oops:
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

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 » Sun Apr 03, 2011 7:24 pm

Is it just misplaced chroma or is it actually blurred outside original boundaries? From what I could tell, it was the latter, which would indicate it's a spatial blur temporally displaced. Not that it's important.

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

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

Post by mikansei » Mon Apr 04, 2011 1:04 pm

>Cannonaire
Cannonaire wrote:I think you're confusing image geometry with aspect ratio. Geometry refers to whether the objects within the frame are correct or stretched - like my previous example of a circle being oval. Aspect ratio can refer to a few different things, but in this case your aspect ratio at 640x480 would be 4:3 exactly. If you use the script I gave you, it will give you correct geometry, and the geometry will not change even if you crop it again, thereby changing the aspect ratio.
I may be confusing these 2 terms and even resolution too XD
I've read your link and several other sources on aspect ratios and resolution but still, there's something I'm not getting about all this stuff which makes me get confused about geometry, cropping and resolution. Thanks to your link and few other links I looked at now a part of the doubt is solved but still there's still something I don't understand. From my understading, giving the output video the same resolution (e.g. 640x480), depending on how much you crop the output is going to keep the original aspect ratio of the input video or you are going to deform more and more the image in order to keep a specific resolution. If you crop a little (8px let's say), then people won't notice, but if you cut 50px in width and only 2px in hight, then the picture's aspect ratio (?) is going to get deformed... or not? This is what I was trying to ask w
Cannonaire wrote:Maybe I should stop caring about this so much. All it does is give me grief and confuse people. It's not even the best way to handle stuff unless you mix a lot of sources. :oops:
If it's a yes/no answer the one to my question above I'd be happy 'cause is something that is causing me a lot of confusion. If it requires a lot of explanation nevermind :) I've asked a lot already :sweat:
Anyway, thank you a lot for all the help you have given me with the script and my doubts, sensei :D


>mirkosp
mirkosp wrote:http://ps-auxw.de/cgi-bin/ar-calc.pl

In order to keep the geometry you'll need to make sure you're doing a good cropping and keep in mind the active area etc... there's quite a bit of stuff behind it, so doing it by hand can be a bit tricky. I suggest you use that site to do the math.
Thank you for the link! I already checked it out.
I've learnt how to use the calculator. Now there's just understanding the concepts behind it left ~_~
Mister Hatt wrote: camembert().naa().ttempsmoothf(maxr=2)
Actually that string was only a suggestion rather than an actual recommendation. I meant for you to tweak it. As I wrote it, it'd only be good for de-ringing rather than dehaloing.
Oh, ok! I had no clue about that. I don't know how to tweak that to get dehalo instead of deringing. I'm just getting started with learning avisynth's filters in depth. Until now I just followed guidelines. Can you give me a tip, please?


Ok, and now, the result of the script as of now (using dehalo_alpha):
Ta-da! It looks lovely IMO ^^
Image

Image

Now here's the question... When played at full screen i get this aliasing even though I've put antialiasing in the script. I just want to know if it's natural for the video to get alising when played at full screen, or if there's something I can add to the script to soften the aliasing.

Here are the full screen images of the samples above:
ImageImage

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

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

Post by mikansei » Mon Apr 04, 2011 1:06 pm

The script of the images posted above is this one:

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.8,rx=2,ry=2)
mergechroma(awarpsharp2(depth=32))
MCTemporalDenoise(settings="low")  
LSFmod(100)
Crop(6, 2, -8, -2)
spline36resize(640, 480)
maa()

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 Apr 04, 2011 6:58 pm

Any particular reason for that TFM line btw? I assume someone has suggested it to you but it is awfully strange. The rest looks sane enough.

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 Apr 04, 2011 11:23 pm

Mister Hatt wrote:Any particular reason for that TFM line btw? I assume someone has suggested it to you but it is awfully strange. The rest looks sane enough.
Blame me for that one. I copied it from another script I wrote many months ago and it worked on the sample, so I decided not to tweak it.
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 » Mon Apr 04, 2011 11:39 pm

mikansei wrote:

Code: Select all

Crop(6, 2, -8, -2)
spline36resize(640, 480)
Sorry for another double post, but the cropping and resize lines you have chosen are really odd. The final resolution isn't as important as preservation of detail and image geometry, and by resizing back to 480 vertical pixels you're unnecessarily hurting the detail and raising the final file size of your video. If you are using the AR calc, you can still have correct image geometry assuming you use the correct DAR when you mux, but that kind of ruins the point of using the AR calc to begin with.

If you are using the AR calc and you want to preserve as much detail as possible, it would be best to simply crop and enter the DAR on mux without resizing in avisynth. If you're trying to save space/bitrate by resizing beforehand, it would be best to resize precisely to square pixels and forgo the AR calc and DAR altogether. At least, that is how I see things. Mostly it just seems odd to me to resize back to 480 after cropping 4 pixels.
Image Think millionaire, but with cannons. || Resident Maaya Sakamoto fan.

Locked

Return to “AviSynth Help”