Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Registered User
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 51
|
Better Dirt Removal Method..?
I've recently received scans to some martial arts films. Most dirt removal methods e.g. spotless, removedirtmc, and remove spots all remove limbs and what not... I've looked into delta restore but it's just not suitable for my needs, the closest I've gotten is Despot with the adjustable max spot size but the actual cleaning part of despot isn't great. I have already figured out a motion compensation algorithm but am not versed in Avisynth enough to tackle actual dirt removal. These are my requirements:
1. A dirt removal method that has the ability to specify minimum and maximum horizontal and vertical spot size 2. Is able to fill in colored scratches with minimum splotches 3. Has minimum effect on the grain although if this is a tradeoff I can deal with it Thanks in advance |
![]() |
![]() |
![]() |
#2 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,164
|
Posted elsewhere [for Descratch]:
Quote:
Posted elsewhere [for Despot]: Quote:
Some despot stuff from long ago:- https://forum.doom9.org/showthread.p...58#post1444658 # oops fixed link Some Descratch stuff from long ago:- https://forum.doom9.org/showthread.p...42#post1688042
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 27th April 2025 at 10:21. |
||
![]() |
![]() |
![]() |
#3 | Link | |
Registered User
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 51
|
Thanks for the recommendation, another question I have is whether or not Despot can utilize more than F,O,B? Can I use more vectors? Up to 5 would be ideal...
Docs state this Quote:
|
|
![]() |
![]() |
![]() |
#4 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,164
|
Quote:
Dont think so, sorry. There is no example use of mc arg in docs, but there is example usage of motion compensated despot in despot docs :- http://avisynth.nl/index.php/DeSpot Code:
# Example script with external mask from MVTools2 (you may tune optional MAnalyse parameters): AviSource("Blah.avi") i = last prefilt = i.DeGrainMedian() # prefiltered for better motion analysis # analyse and compensate motion forward and backward (to current frame) ml = 100 # mask scale thscd1 = 400 # scene change super=i.MSuper() # super clip superprefilt = prefilt.MSuper() # super filtered clip vf = superprefilt.MAnalyse(isb=false) # forward vectors cf = i.MFlow(super, vf, thscd1 = thscd1) # previous compensated forward sadf = i.MMask(vf, ml=ml,kind=1,gamma=1, thscd1 = thscd1) # forward SAD mask msadf = sadf.MT_Binarize(20, upper=true) # binary inverted forward SAD mask vb = superprefilt.MAnalyse(isb=true) # backward vectors cb = i.MFlow(super, vb, thscd1 = thscd1) # next compensated backward sadb = i.MMask(vb, ml=ml, gamma=1, kind=1, thscd1 = thscd1) # backward SAD mask msadb = sadb.MT_Binarize(20, upper=true) # binary inverted backward SAD mask msad = MT_Logic(msadf,msadb,"or") # combined inverted SAD mask msad = msad.MT_Expand() # expanded inverted SAD mask msadi = Interleave(msad, msad, msad) # interleaved 3-frame inverted SAD mask # This mask is high (255) where at least one motion estimation is good, # so these areas will be protected Interleave(cf,i,cb) # interleave forward compensated, source, and backward compensated DeSpot(p1=30,p2=12,pwidth=800,pheight=600,mthres=20,merode=33,\ sign=0,show=0,seg=0,color=true,motpn=true, extmask=msadi) SelectEvery(3,1) # get filtered source If you do (desperately) want to try 2 forward / 2 backward vectors, then you would need achieve that yourself, and avoid the mc arg thingy, and pluck out the middle frame of every 5 on completion. Perhaps someone else knows how best to add the additional vectors into the mix. [I just dont feel up to it ![]() EDIT: Actually, I dont think that you can use 2 fwd, 2 bkwd, I dont think it makes sense, the despot thingy works by compare with adjacent frames, not by adjacent AND adjacent +/- 1 frames, so it dont make sense, (at least to me). EDIT: Sounds to me like the mc arg just does the equivalent of the SelectEvery(3,1) above in CODE block in BLUE.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 28th April 2025 at 09:17. |
|
![]() |
![]() |
![]() |
#5 | Link |
Registered User
Join Date: Oct 2024
Location: Nebula 71 Star
Posts: 51
|
Does removedirt (restore motion blocks) only have access to first and last or is it static? If this is the case then if it can work with more than backw/forw then shouldn't despot with mc=false work the same? If not knowing your skill would it not be pretty easy to modify it to do so?
|
![]() |
![]() |
![]() |
#6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,164
|
Sorry, no can do, perhaps others with more experience of "removedirt (restore motion blocks)" and such can help,
I dont spend that much time with Avisynth or D9 nowadays.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|