Avisynth: Ads() a function using a masked denoising etc
----
---------- Splitted from Thread "MA Script for one Movie DVD" --------- ---- Well I see that Removegrain does affect details in a bad way, so I did let perform that filter on a masked area where the details are left OUT. We also do often use Temporal denoisers on clean sources but these "could" do harm on details in hairs and skins, so I did let perform a temporal work also on that masked area. And finally to get even the details a bit more sharpened I used on thats same (now inverted) mask a general sharpener. Here's the function to test: ADS - Adaptive Denoiser & Sharpener EDIT: Latest version and explanation can be found here: http://www.kvcd.net/forum/viewtopic....r=asc&start=52 .... where To is the Top border and Bo the bottom Border to get rid of (you can detect (not set!!) them using DVD2AVIs clip/resize function). Ov is the Overscan. Lb means if set to "true" then a Letteroxing from Anamorphic material to 4:3 will be performed. So ADS(72, 72, 2, true) deletes on the Top and The bottom the orig 72px and 72px borders and does apply an overscan of 16px where the right borders for matching the final output size will be added afterwards (imge will be centered). To or Bo have to be MOD8! So each border to delete has to be devidable by 8, as removegrain() only processes mod8 sources. As I do determine the filter to its parent-plugin, for instance "Masktools_Edgemask(....)" ... use latest version of Avisynth as that version only supports that. Plugins Needed: RemoveGrain() www.removegrain.de.tf RemoveDirt() www.removedirt.de.tf Masktools http://jourdan.madism.org/~manao/MaskTools-v1.5.1.zip |
Hi Inc. :),
Just tried ADS for the 1st time. I downloaded and extracted Masktools v1.5.1, RemoveDirt v0.6 and RemoveGrain v0.6.1 to my avisynth plugins directory. Then I used: Code:
mpeg2source("c:\movie\mymovie.d2s") You name it: MPC, WMP, VDMOD, etc. I even erased all the stuff I had in the plugin dir and only left these 3 that I already mentioned and mpeg2dec3.dll. Then I watched carefully your script and I decided to add unfilter.dll to the plugins dir. But no way. No way until I erased ADS.avsi which was copy pasted from this thread. Can someone else replicate this? Cheers |
Try ro use that function in your script and not via avsi, maybe that helps :?
I used it yesterday and had no problems. Are you shure you have all the latest builds (masktools avisynth!!). As some recent avisynth betas are known for these memory errors. :wink: EDIT: I found this: http://forum.doom9.org/showthread.php?s=&threadid=82435 Maybe you should try that masktools 1.49 or so, but I do hope that it gots the same commands/parameters. http://jourdan.madism.org/~manao/?M=D Maybe that one? http://jourdan.madism.org/~manao/MaskTools.dll or this http://www.avisynth.org/warpenterpri...l_20040423.zip |
@incredible
Thanks a lot! Just tried your ADS routine and it looks VERY good! :D The only "problem" I have is that the output seems to be 704x576 instead of 720x576 as I usually use. Not a big issue, I know, but if it's fixable... It's just that I feel more comfortable with using 720x576. :wink: Thanks again! PS. Since the output isn't 720 it looks as if ADS is cutting about 16 pixels from each side of the frame and then zoom in on it?! How do I fix that? @rds_correia I added a "}" to the end of the script since VDub said it was missing :wink: . And now it works for me. |
@ Audioslave
Code:
cr=(W==720) ? 8 : 0 Code:
cr=(W==720) ? 0 : 0 I just fixed the script according to the "}" |
@incredible
Quote:
However, this is not really the issue in my previous post... When comparing a simple LanczosResize with the ADS script (both with overscan 2) ADS clearly shows less of the original frame than the LanczosResize. I hope you know what I mean :oops: . If not, I'll post some screenshots when I get home from work :wink: . |
Hello :),
My thanks to both Henrik and Andrej for fixing the function. I'll let you both know how it goes when I get home. Cheers |
@incredible
I tried ADS on the Scandinavian (PAL) version of "The Passion Of The Christ". It looks like a whole new movie! :D Well, the plot is the same 8O :) but the picture is soooo much better with ADS! The original is VERY grainy and looks very "VHS" but after running the source through ADS it now looks like a DVD! :lol: However, ADS sometime is a little too tough = loss in detail, for example beards and hair... P.S. I still haven't figured out why the resizing is so wierd... :cry: |
Two notes about this ACS function :
- Removedirt seems to give problems to CCE when parameters are used. Does ACS works correctly ? - please check this thread I did on my last attempts with RemoveDirt http://www.kvcd.net/forum/viewtopic.php?t=14141 (this behaviour is perhaps reduced with usage of thresholds). |
Resizing is not wired at all! ;-)
a) Almost every DVD Source I do keep at Full PAL, just cropping from 720 to 704 as it makes sense. On long Movies like 3h ones I sometimes choose letterboxing (Anamorph :arrow: 4:3 incl. Borders) to gain from better compression. b) When Overscanning I like to choose Overlayed Overscan as many movies do come in 2.35:1 which means when using resized overscan, the moviearea even would get smaller on a regular Tv. So Overlayed is the best choice in case of DVD Movie sources. c) And for shure I do crop the orig black borders before so the filtering affects only the main movie area, means better detection for some type of filters and for shure more speed as the effective movie area in a border cropped state is cropped effectively! You can easely enter the script and add your own mods: Code:
function ADS (clip c, int "To", int "Bo", Int "Ov", Bool "Lb" ) { Code:
Ov=Ov*8 We do parse the sources ORIG width and Height and set them to W and H. Code:
cr=(W==720) ? 8 : 0 Code:
c= ScriptClip(c,"nf = YDifferenceToNext()"+chr(13)+\ (The nf=Ydiff..... line Ill delet as its useless ;-) ) Code:
"f1=removegrain(8).RemoveDirt(mthreshold=125,cthreshold=30,pthreshold=20)"+chr(13)+\ Code:
"f2=unfilter(0,80)"+chr(13)+\ Code:
"masktools_MaskedMerge (f1,last,m)"+chr(13)+\ Code:
c= (Lb == true) ? Lanczosresize(c,width(c)-cr*2,round(height(c)*0.75)) : c Code:
Addborders(c,(round(W-width(c)-cr*2)/2),(round(H-height(c))/2), \ So finally the borders will be added. END. You can for instance "f1=removegrain(8).RemoveDirt(mthreshold=125,cthre shold=30,pthreshold=20)" To "f1=SpatialFilter(.......).TemporalFilter(.......) " And "f2=unfilter(0,80)" To "f2=SharpeningFilter()" But be shure you use YV12 supporting filters, if not you need to perform colorspace changes which do let drop the color quality and for shure more cpu power is needed ;-) |
@ Phil
I do see your last post now in here. And for shure the pics in the link you pointed me to 8O (seems I lost that new "good bye" thread. Me and boulder (IMHO) haven't seen such problems, but maybe we didnt recognise them well !? So do your testings with the thresholds I used, if they dont work, do choose other thresholds. If that still wont work, we trash that one finally and change to a different PURE temporal denoiser like Tempsoften, ATC, TempCleaner etc. The place where to change you can easely see above ;-) Also in case of the Spatial denoiser/softener, maybe just Deen("a2d",x,x,x) "could" work ... BUT be careful as deen() in a conditional scripting will crash! in my cases! the result is a "access volation ....." as this filter deeply isnt correct coded IMHO. But there are also other pure spatial softeners around, but yep, Removegrain() does its Job very good. So testing temporal filters should be a real job. |
@incredible
:lol: Thanks! You're the man... 8) |
Quote:
But for me RemoveDirt suffer from a big problem : there are TOO MUCH parameters. And I'm not sure it will be easy to find values that will face to all situations. |
Quote:
Quote:
Whats about a temporal used StmedianFIlter() or even Convo3d() at temporal settings ? I havent test them for a long time 8O 8) |
Quote:
|
Quote:
EclCCE answers : not abble to load the script. (CCE 2.67) |
Phil, I do assume you did NOT your last screenshots using my masking function???
*IDEA* Because this function does avoid that details/Edges even will be touched by the spatial or temporal smoother/denoiser! So that Arc in your test screenie wouldnt suffer (just IMHO). So do use Removedirt() in that function without any parameters and do a test, as Im now at work (you probably too?!) |
Quote:
(note: I give the script in my post, there is nothing more than the 2 filters). Quote:
|
Quote:
Quote:
8) [/quote] |
Ok, just did it there :
http://www.kvcd.net/forum/viewtopic.php?p=103824#103824 Note : I used ECLCEE with no problem even with the parameters used in RemoveDirt. |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.