View Full Version : RemoveDirt
nanoflower
29th May 2005, 06:48
Ugh.. I'm sure the new form is much more powerful, but the old RemoveDirt() is so much easier to work with. Perhaps it's just because I'm tired, but after working with new RestoreMotionBlock function I had to give up because I couldn't get it to work. I'm sure it's something simple that I'm not setting correctly, but the old RemoveDirt function is easy to setup.
Fizick
5th June 2005, 14:57
kassandro,
can you consider the some renaming of your new Removedirt to prevent user confusing?
For example, we recently made russian translation of it, and do not understand, what is the right.
(I think both versions are exellent an will be used)
So, what about renaming to RemoveDirt2 for example?
Sorry for disturb.
FredThompson
5th June 2005, 17:56
It would be nice if the filters didn't force VirtualDubMod to crash, too. Happens with all of them, RemoveGrain, etc.
zilog jones
5th June 2005, 20:39
I think that's an issue with AviSynth filters in general...
FredThompson
5th June 2005, 20:44
Possibly. Every filter in the RemoveDirt/RemoveGrain packages makes it choke on my machines. So does TDeint. I'm guessing there's something common to K's filters which causes this to happen, hence, the reason I bring it up.
Calca_P
22nd June 2005, 09:15
I use Removedirt v9 with MPEG2 cleanup (mostely old VHS to DVD releases)
and I like the end product.
I have spent time adjusting parameters but am unable to get past the blur,
(end product is not as defined as the original though much cleaner to the eye)
Is it possible to get a blurless setting with this filter, or is it not possible yet?
I understand that a certain amount of blur is usually an effect though none
of course would be nice. I want too much? possibly.
Thanks
Didée
22nd June 2005, 10:14
@ Calca_P
First off, I've never seriously worked with RemoveDirt, so I know almost nothing about its parameters, and almost nothing about its side-effects.
However, what ~might~ be useful is a lowpass filter. The noise you want to filter by RemoveDirt probably is of high spatial frequency, and unwanted blurriness often is caused by changes in lower spatial frequencies.
Try this: (needs MaskTools (http://manao4.free.fr/MaskTools-v1.5.6.zip))
[...]
#------------------------------------------
function m4(float x) {return( x<16?16:int(round(x/4.0)*4) ) }
#------------------------------------------
before = last
RemoveDirt( [..parameters..] )
after = last
radius = 2.0 # Try 1.25 to 3.0
diff = yv12lutxy(before,after,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
diff2= diff.bicubicresize( m4(diff.width/radius), m4(diff.height/radius) )
\ .RemoveGrain(4).bicubicresize( diff.width, diff.height, 1,0 )
diff = yv12lutxy(diff,diff2,"x y 128 - -","x y 128 - -","x y 128 - -",U=3,V=3)
lowpassed = yv12lutxy( before, diff, "x y 128 - -","x y 128 - -","x y 128 - -",U=3,V=3)
lowpassed
Might work in your case, or might not. You'll see.
Calca_P
22nd June 2005, 10:50
Thanks Didee, much apreciation.
Ill give it a go. Yes, I do like Kasandro's your scripts, they do a good job for my likes.
Thanks
EDIT:
Didee, would you please explain to me this, "[...]"
also, Avisynth doesnt accept the function, "m4" on the "diff2=" line
Didée
22nd June 2005, 14:09
Ooops! I didn't notice your edit ... but right now I suddenly remembered that I better should include that tiny "m4" modulo-4 function if I make use of it ...
Corrected the scriptlet above. Sorry.
The [...] means: any avisynth code you have in your original script before calling RemoveDirt().
Calca_P
23rd June 2005, 08:34
Didee,
The script works now and tried it out.
To the eyes, it doesnt seem to change the blur, just moves it a little in places
and creates a darker grainyness throughout the picture.
Ill keep testing, thanks
@didée
i see u're a big fun of yv12lutxy, so maybe u can explain what's in your script :Dyv12lutxy(diff,diff2,"x y 128 - -","x y 128 - -","x y 128 - -",U=3,V=3) can u tell me what does this function exactly do ?
it's a kinda polish notation, isn't it ? so, i'd rather put ..."x y - 128 -" ... instead. or am i completely wrong here ?
thx
y
Didée
23rd June 2005, 14:13
@yaz
You're completely right. It's inverse polish notation, and instead of "x y 128 - -" one could write "x y - 128 +" just as well.
Personally, I use both terms, in places. The alternative use of both terms just deals to indicate myself what kind of operation I'm actually doing - either creating an offset plane, or applying an offsetted plane. Personal habit, nothing else.
BTW, this (simple) kind of lowpass protection deals pretty good with temporal smoothers. Try the aboveposted scriptlet with e.g. temporalsoften:
before = last
# make a temporalsoften /w big thresholds, limit result to +-3 ...
LIM = "x 3 + y < x 3 + x 3 - y > x 3 - x 49 * y 51 * + 100 / ? ?"
ts = before.temporalsoften(2,23,23,23,2)
yv12lutxy(before,ts,LIM,LIM,LIM,U=3,V=3)
after = last
radius = 2.0 # Try 1.25 to 3.0
# ... and apply a lowpass to "the effect" to avoid smearing
diff = yv12lutxy(before,after,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
diff2= diff.bicubicresize( m4(diff.width/radius), m4(diff.height/radius) )
\ .RemoveGrain(4).bicubicresize( diff.width, diff.height, 1,0 )
diff = yv12lutxy(diff,diff2,"x y 128 - -","x y 128 - -","x y 128 - -",U=3,V=3)
lowpassed = yv12lutxy( before, diff, "x y 128 - -","x y 128 - -","x y 128 - -",U=3,V=3)
lowpassed
Should work well with any filter that does sort of temporal smoothing. I've tested with (limited) TemporalSoften, (limited) Clense, and LRemoveDust.
whoa, man, u gave me the feeling of 'lutting' :p i've made such lowpass protection several times w/a very complicated multifold masking. your script is not simply more elegant but much quicker. i see i should sentence some time to this 'lutting' business. i wish i had :(
LIM = "x 3 + y < x 3 + x 3 - y > x 3 - x 49 * y 51 * + 100 / ? ?" i luv it. decryption took some time but now i get it (i guess)
thx
y
Didée
24th June 2005, 10:57
Well, the term simply reads
If: difference(original,filtered) <= 3
then: apply 49% of it
else: limit the change to +- 3
An alternative term doing the very same could have been:
LIM = "x y - abs 3 > x 3 x y - x y - abs / * - x 49 * y 51 * + 100 / ?"
[read: abs(x-y) > 3 ? x - 3*sign(x-y) : (49*x + 51*y) / 100 ]
When starting out, the inverse polish notation might be hard to get used to. (I can tell you, I've been there before) ;)
But once you got grip to it, you can write terms "several meters long" , and it doesn't even require much thinking. :)
When starting out, the inverse polish notation might be hard to get used to. (I can tell you, I've been there before) ;)
But once you got grip to it, you can write terms "several meters long" , and it doesn't even require much thinking. :)yeah. i'd been there too. in the golden age (i.e. right before m$ ;) ) i made device controll, data collection and evalution in 'forth' (does this name tell anything to anyone still?) and then we did write terms approaching 1 meter. that language allowed direct, invers (reverse?) and advanced 'polishing'. that'd been the days, man (deeeep sigh :) )
LIM = "x y - abs 3 > x 3 x y - x y - abs / * - x 49 * y 51 * + 100 / ?"no, i luv the former more. that's more hard to read :D (just think of the double-conditional)
anyway, what really did amaze me is the potential of 'lut'. i've never thought of the way u use it. it prompted me a lot of ideas. (completing, maybe, when retired ;) )
thx again
y
elwoodps
14th September 2005, 16:24
I'm doing an old black & white movie (12 O'clock High) using DVD-RB Pro (avisynth 2.5, CCE Basic 2.70, RemoveDirt 0.61) . This movie has a lot of dirt and scratches, so I'd think it would be substantialy improved by the proper use of RemoveDirt.
I've tried using it with settings similar to those kassandro and Major discussed for this type of movie earlier in this thread: RemoveDirt(grey=true, pthreshold=10, mthreshold=150)
But when I ran it with these settings the output video just displayed a black screen with the following message on it in big red letters: Script error:RemoveDirt does not have a named argument "grey"
So I tried it again without the grey=true argument so the line just read: RemoveDirt(pthreshold=10, mthreshold=150)
The result was the same except the message now reads:Script error:RemoveDirt does not have a named argument "pthreshold"
This kind of makes it look like RemoveDirt isn't accepting any variables. The filter seems to work when I use RemoveDirt() with no variables, but I don't suppose the defaults are optimal for this type of movie.
Any idea why this is happening and what I can do to fix it?
Elwood
Boulder
14th September 2005, 16:29
This is an old problem. You can avoid it by using a preset.
mg262
14th September 2005, 17:16
Also: the place to get support from the author is http://videoprocessing.11.forumer.com/index.php
elwoodps
14th September 2005, 19:17
@ mg262: Thanks! I didn't know that he had moved. The guide that was in the zip with the filter said to post questions in this thread.
@ Boulder: Thanks for your response. I'm not sure I understand what you mean when you say to use a "preset". Is that where you setup the desired variables under a name in the RemoveDirt.ini file and then access them using RemoveDirt(default=name)?
Elwood
Boulder
14th September 2005, 19:28
@ Boulder: Thanks for your response. I'm not sure I understand what you mean when you say to use a "preset". Is that where you setup the desired variables under a name in the RemoveDirt.ini file and then access them using RemoveDirt(default=name)?
Yes, that's right. The presets just work in a funny way in which the one that's later in the ini file will take over if it alters the same parameters as some preset before it - at least that's how I recall it.
That is,
some preset
pthreshold=20
mthreshold=100
some other preset
pthreshold=40
(note that I don't remember the exact syntax of the ini file, but you should get the idea)
When you call "some preset" in RemoveDirt, the parameters will actually be pthreshold=40,mthreshold=100.
There is a newer version of RemoveDirt at www.removedirt.de.tf but I don't know how well it works. Apparently it has a completely new design.
elwoodps
14th September 2005, 19:45
Many thanks Boulder! There's an example of how to setup the RemoveDirt.ini file in the guide that came with the filter.
Elwood
Boulder
14th September 2005, 19:47
If you create just one preset, there won't be any problems, of course:) The latest RemoveDirt version should tackle the jerky motion problem so it might be worth updating.
Heini011
26th February 2006, 19:12
hi folks,
i'am very satisfied with this quite simple RemoveDirtMC function. it is quite fast, does good denoising and yields very good compressibility. it is optimized for slight denoising of dvd-sources and avoiding block-artefacts.
you need: RemoveDirt, RemoveGrain, MVTools 1.1.1
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey)
}
function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
isb=false/true is in opposite to the mvtools-readme, but the results are correct this way
MVFlow in MVTools 1.1.1 is buggy for idx=1 at pel=2
Boulder
26th February 2006, 19:18
isb=false/true is in opposite to the mvtools-readme, but the results are correct this way
MVFlow in MVTools 1.1.1 is buggy for idx=1 at pel=2
Have you notified Fizick about this? If it's true, all the MC stuff is screwed up.
Did you try v1.2.1?
Fizick
26th February 2006, 22:50
Heini011,
1) isb works as always.
2) Are you "very satisfied" with "buggy" MVTools? :)
(but please post bug report in MVTools thread http://forum.doom9.org/showthread.php?t=102071&page=7)
Heini011
26th February 2006, 23:49
i have MVTools 1.1.1 and older versions only. so i can't say something to the newer ones.
idx=1 can't be used for MVFlow @ pel=2 -> bug!
if i remove SelectEvery(3,1) i get unexpected results at a scenechange with the isb setting according to the readme. same behavior in mvtools 0.985.
Fizick
27th February 2006, 00:46
please, post your bug report to MVTools thread with shortest script and more info.
Mug Funky
27th February 2006, 10:10
@ Heini011:
you might want to add some kind of highpass protection to that. i tried the exact same script a while ago and it behaved somewhat oddly on flicker and fades. if you subtract (or mt_makediff) a blurred clip from the original, grab motion on the result, then apply the compensation to the original, you can avoid strangenesses a bit. but they still will show up in a few cases. i have yet to find a good solution to this, but fizick's overlapped block mvanalyze looks to be part of it (thanks fizick!).
Didée
27th February 2006, 10:46
isb=false/true is in opposite to the mvtools-readme, but the results are correct this way
---
if i remove SelectEvery(3,1) i get unexpected results at a scenechange with the isb setting according to the readme. same behavior in mvtools 0.985.
Usually I stumble over this every time, too. :)
However, the behaviour IS like stated in the docu:
isb : allows to choose between a forward search ( between the current frame and the previous one ) [...]
isb = false means forward search
"is backward" means: search for backward-directed vectors. Making a compensation [n]<--[n+1] means that the [forward] frame n+1 is compensated to fit the [current] frame n, by means of backwards directed vectors.
So all is fine. Have
[n-1] --> [n] <-- [n+1]
in mind, and think of the vector directions, not of the frame ordering.
Heini011
2nd March 2006, 03:00
what you get and what you lose...
anton_foy
2nd March 2006, 23:22
Strange...I was just watching ""The Fearless Vampire Killers on DVD and a few minutes after I read this topic:)
I would really like to know what script you applied on these pics, it looks almost too good to be true. Im having the same noise/grain pattern in my footage so I would like to try that.
Thanks!
Heini011
3rd March 2006, 02:20
Hi anton_foy,
give this hq_filter a try, it is still a bit better ;-)
function RemoveTempGrain(clip input, int _mode)
{
rg = RemoveGrain(input, mode=_mode)
return TemporalRepair(rg, input)
}
function RemoveDirt(clip input, int limit, bool "_grey")
{
_grey=default(_grey, false)
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=16,grey=_grey)
}
function SRemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
dnc=clp.RemoveTempGrain(1)
clp=clp.SelectEvery(3,1)
dnc=dnc.SelectEvery(3,1)
clp=clp.SeeSaw(dnc,Sstr=0.26,Szp=12,SdampHi=20,bias=40)
return clp
}
function hq_filter(clip c)
{
c=c.SRemoveDirtMC(6)
c=c.YlevelsS(0,1.05,255,0,255)
c=c.LimitedSharpenFaster(Smode=4,strength=18,overshoot=1,wide=false)
return c
}
SBaT
21st March 2006, 11:33
Thankyou for the nice script example, really usefull when I'm trying to grasp the use of MvTools and RemoveDirt with avs. However I'm quite confused atm after reading the end of RemoDirt manual as far if croping should be done before or after with a script like yours. As I'm encoding my 1080i.ts to 720p I have to crop atleast 2, 0, -4, -8 to get rid of black sides.
canuckerfan
12th September 2006, 03:06
Heini011, will your script wortk with mvtools 1.4.11?
superuser
7th November 2006, 05:44
Edited
dnaxx
6th April 2007, 17:24
Heini011, thanks for the script. But I don't get it running because "SeeSaw" is missing. Can you help me please?
Boulder
6th April 2007, 17:56
Why not use the search, it would give you the answer in no time.
rkalwaitis
14th November 2008, 17:35
Anyone a simple question.
So this script
function RemoveTempGrain(clip input, int _mode)
{
rg = RemoveGrain(input, mode=_mode)
return TemporalRepair(rg, input)
}
function RemoveDirt(clip input, int limit, bool "_grey")
{
_grey=default(_grey, false)
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=16,grey=_grey)
}
function SRemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
dnc=clp.RemoveTempGrain(1)
clp=clp.SelectEvery(3,1)
dnc=dnc.SelectEvery(3,1)
clp=clp.SeeSaw(dnc,Sstr=0.26,Szp=12,SdampHi=20,bias=40)
return clp
}
function RMBDenoise(clip input, bool "_grey", int "repmode")
{
clmode=17
clensed=Clense(input, grey=_grey)
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode )
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, neighbour2=clensed, gmthreshold=70, dist=0, debug=true, noise=12, noisy=12, grey=_grey)
return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
}
function hq_filter(clip c)
{
c=c.SRemoveDirtMC(6)
c=c.YlevelsS(0,1.05,255,0,255)
c=c.LimitedSharpenFaster(Smode=4,strength=18,overshoot=1,wide=false)
return c
}
and the one above are simple place as they are into the avs file? Correct? Of course I have to have the appropriate plugins.
R3Z
17th November 2008, 04:03
Anyone a simple question.
and the one above are simple place as they are into the avs file? Correct? Of course I have to have the appropriate plugins.
It will work that way and you can rename the .avs file to .avsi and it will autoload into memory without being needed to be Loaded manually.
rkalwaitis
17th November 2008, 07:51
R3Z
So I import the avsi file that I made. How do I call the function to do the work . RemoveDirt()? Like this?
Adub
17th November 2008, 19:52
So I import the avsi file that I made.
What do you mean? The whole point of the avsi file is that you just drop it into your plugins directory and you don't have to import anything.
Basically, save those functions above in a text file with ".avsi" as the extension. Drag this to your Avisynth plugins folder.
If you ever want to use those functions, just add something like "hq_filter()" or "RMBDenoise(_grey=false)" to the script that you are currently working on.
There is no need to import anything, you just call the functions like you would any normal plugin.
rkalwaitis
18th November 2008, 19:33
Merlin,
Thanks, that is what I meant. Now I get it. Thanks again.
Lyris
28th June 2009, 01:14
Heini011: thank you so much for this function. The accuracy is INCREDIBLE compared to other dirt and scratch removal plugins I've used!
The only issue I'm having is that it's difficult to keep film grain AND get rid of the dirt/scratches. I've resorted to degraining, using your function, and then re-graining the output to keep the original look.
Once again, thank you.
turnipzoink
18th September 2009, 19:27
Damn I'm jealous.
This is the only plugin I can't get to work? I tried email the author at gmx.de, not replying.
I tried each dll and none of them work. Avisynth is obviously loading them, but can't find the function. What am I doing wrong?
10298
videoFred
21st September 2009, 08:03
I tried each dll and none of them work. Avisynth is obviously loading them, but can't find the function. What am I doing wrong?
If you are using the Heini011 function, you must use HQ_filter() instead of RemoveDirt().
Off cource all dll's must be there, and Heini's function also.
PS: you need RemoveDirt.avs too.
Fred.
Paazabel
1st November 2009, 14:54
To the author: Thanks for this filter. I tried a bunch of different stuff that did not work on this clip. I'm sure many people have used it, but I wanted to make sure you got a "thanks" from me.
Sampling, stacked before-and-after (Lagarith, YV12, ~100M): http://www.sgt.cc/vid/Less-spotty.avi
(side note: Software rights can be a pain in the backside; would be nice if a great script could be "packaged" with all the other plugins that make it work. I know, I'm just lazy, but I spent about 2 hours debugging differences in plugin versions. It was worth it, but for an AVIsynth newb, it would have been improbable for them to stick with it.)
Sample frames:
I was particularly impressed with the second one since there are "real" dark spots in that frame and nothing else came remotely close to finding them. The first frame shows smoke rising over the hill which is in each frame and not processed as "noise." Very cool.
http://www.sgt.cc/pix/d/49030-1/despots-1.jpg
http://www.sgt.cc/pix/d/49033-1/despots-2.jpg
Not as interesting, but ... getting my money's worth out of the ol' computer!
http://www.sgt.cc/pix/d/49036-1/cpu-pegged.jpg
http://www.sgt.cc/pix/d/49038-1/vdub.jpg
Lyris
7th November 2009, 00:57
Question: is it possible to limit RemoveDirt to be colour-specific? That is, to only have it detect black (or nearly black) and white (or nearly white) areas as spots? It would improve accuracy...
LaTo
7th November 2009, 09:09
Question: is it possible to limit RemoveDirt to be colour-specific? That is, to only have it detect black (or nearly black) and white (or nearly white) areas as spots? It would improve accuracy...
Yes it is possible, without testing:
source = last
filtered = source.RemoveDirt()
dark = 32
bright = 196
mask = mt_lut(source,"x "+string(dark)+" < 255 x "+string(bright)+" > 255 0 ? ?",U=1,V=1).removegrain(19,-1,-1)
mt_merge(source,filtered,mask,luma=true)
Adjust dark (0 = do nothing in black areas) & bright (255 = do nothing in bright areas) to your taste...
Another way is to limit RemoveDirt where changes are really big:
source = last
filtered = source.RemoveDirt()
min = 16
max = 255
mask = mt_lutxy(source,filtered,"x y - abs "+string(min)+" < 0 x y - abs "+string(max)+" > 0 255 ? ?",U=1,V=1).removegrain(19,-1,-1)
mt_merge(source,filtered,mask,luma=true)
"min" is the minimum required and "max" is the maximum allowed
If you want to merge the two method:
source = last
filtered = source.RemoveDirt()
dark = 32
bright = 196
mask1 = mt_lut(source,"x "+string(dark)+" < 255 x "+string(bright)+" > 255 0 ? ?",U=1,V=1).removegrain(19,-1,-1)
min = 16
max = 255
mask2 = mt_lutxy(source,filtered,"x y - abs "+string(min)+" < 0 x y - abs "+string(max)+" > 0 255 ? ?",U=1,V=1).removegrain(19,-1,-1)
mt_merge(source,filtered,mt_logic(mask1,mask2,"min"),luma=true)
This one should be the best after tweaking the 4 parameters ;)
Paazabel
7th November 2009, 17:48
Given the temporal nature of the filter (comparing one frame vs another), I'm not sure this would "improve performance" on most dirt. The comparison is the same frame-by-frame and it even removes blue dirt, from what I can tell, as well as grain and noise that are not near those thresholds.
Which is to say - academically, yes, I think you can do that, but I'm not sure it will have any meaningful "improvement" in either accuracy or speed.
LaTo
8th November 2009, 14:50
Given the temporal nature of the filter (comparing one frame vs another), I'm not sure this would "improve performance" on most dirt. The comparison is the same frame-by-frame and it even removes blue dirt, from what I can tell, as well as grain and noise that are not near those thresholds.
Which is to say - academically, yes, I think you can do that, but I'm not sure it will have any meaningful "improvement" in either accuracy or speed.
Hum, your method remove spots... but also grain & details : oversmoothed effect! (artificial look)
It isn't really good to me :p
Some screenshots of my purpose:
Screenshot 1:
Original frame (http://img525.imageshack.us/img525/9092/1orig.jpg)
The filtered clip (Your) (http://img204.imageshack.us/img204/8137/1your.jpg)
The code above (Mine) (http://img204.imageshack.us/img204/5212/1mine.jpg)
Screenshot 2:
Original frame (http://img94.imageshack.us/img94/6134/2orig.jpg)
The filtered clip (Your) (http://img43.imageshack.us/img43/6799/2your.jpg)
The code above (Mine) (http://img517.imageshack.us/img517/2975/2mine.jpg)
The code:
DirectShowSource("Less-spotty.avi")
ConvertToYV12()
source = last.crop(0,0,-720,0)
filtered = last.crop(720,0,0,0)
str = 20
mt_merge(source,filtered,mt_lutxy(source,filtered,"x y - abs "+string(str)+" *",U=1,V=1).mt_expand(U=1,V=1).removegrain(19,-1,-1),luma=true,U=3,V=3)
str=20 give very good result...
No spot, but still detailled :)
After, you can use a more robust denoiser to remove the little noise while preserving details:
MCTemporalDenoise(chroma=true,flat=true,stabilize=true,sigma=2,strength=200,Tovershoot=2)
Screenshot 1 (http://img52.imageshack.us/img52/5632/1last.jpg) & Screenshot 2 (http://img43.imageshack.us/img43/1705/2last.jpg)
So, in conclusion, compare:
Before (your) (http://img204.imageshack.us/img204/8137/1your.jpg) - After (mine) (http://img52.imageshack.us/img52/5632/1last.jpg)
Before (your) (http://img43.imageshack.us/img43/6799/2your.jpg) - After (mine) (http://img43.imageshack.us/img43/1705/2last.jpg)
The choice is easy :devil:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.