Log in

View Full Version : [film transfer] Remove dirt but keep grain?


Pages : [1] 2 3 4

chmars
10th May 2021, 22:55
Edit--------------------------------------------------------------------------
Thread Summary:
Brilliant results thanks to StainlessS, Zorr and real.finder.
Super well working version here (https://forum.doom9.org/showthread.php?p=1946030#post1946030)

1. We have footage with dirt to be removed. Some tools remove dirt but also grain.
2. Spotless (https://forum.doom9.org/showthread.php?t=181777) compares prev. , current and next frames. If a group of pixels is new AND not nearby in prev and next frames, replaces this grop by the pixels in surrounding frames. To maintain grain and details, sharpness is applied before Spotless. For more grain: HBD mRD_RestoreGrain (https://forum.doom9.org/showthread.php?p=1943371#post1943371).
-> Dirt: solved. Problem: moving objects that are not dirt are removed.
3. pre-Delta Restore (https://forum.doom9.org/showthread.php?p=1943871#post1943871) (brightness): looks at all removed pixels by Spotless and restores pixels groups that are brighter than a certain limit and big enough.
-> Disappeared bright moving objects: solved. Problem: dark moving objects are still away.
4. Delta Restore (https://forum.doom9.org/showthread.php?p=1944267#post1944267) now looks for colors too. It can now bring chromatic dark objects back.
-> Chromatic dark moving objects are back. Problem: some highly chromatic dirt come back.
5.A New Delta Restore (https://forum.doom9.org/showthread.php?p=1944360#post1944360) Looks at the edge sharpness difference to determine whether a px group is a dirt or an object.
-> Chromatic dirt: solved.
6.Zorr rewrote some masks. Working great! (first link of this post)

/Edit end-------------------------------------------------------------------------


Hello,

I am setting up a real-time frame accurate (EDIT:frame accurate in resulting clip, after removing mixed and duplicate frames) 8mm/super8 footage transfer system. (here (https://forum.doom9.org/showthread.php?t=182809)). This became real thank to the great help I got here.

As I like NLE grading very much, the part I am very interested in is the ability of removing dirt.
But I personally like grain very much. For my taste it is as an important part of the footages. (I know, dirt too :D)
In my attempts to remove the dirt from the footages, it always removed some grain too.

New to Avisynth, I read here + wiki during days. But my knowledge is still mixed enough.

I am experimenting with the RemoveDirtMC part of Fred's scripts versions, skipping RemoveGrain.

Is that a good approach or should I look for more adapted tools that couldbetter discriminate between grain and dirt?

doctorkhv
11th May 2021, 00:07
Make it look like DasGrain in NUKE?)
http://www.nukepedia.com/gizmos/other/dasgrain

kedautinh12
11th May 2021, 00:52
If you have source code, i think professional in forum can do it

Ghitulescu
11th May 2021, 08:04
I think there is already a thread of converting these movies into digital for further processing.

I am not sure what "real time frame accurate" can possibly mean, as, the way I understand it, it is imppossible to achive since no fps of any digital media for consumers I know can do 16 or 18fps. Indeed, one can have whatever fps wants on a computer, but even there it can only be displayed "frame accurate" only if the monitor and the video card support those fps or multiple thereof. In my view there is either real time or frame accurate with such films.

As for dirt and grain, well, naturally, dirt is larger than grain, but also this depends on the film. And what happen if you filmed rain or snow or a sand storm? Yeap, you have to decide by yourself.

Arx1meD
11th May 2021, 12:22
chmars,
Try SpotLess (https://forum.doom9.org/showthread.php?t=181777) or SpotRemover (https://forum.doom9.org/showthread.php?t=182407) scripts or DeSpot (http://avisynth.nl/index.php/DeSpot) filter. Be careful, they can remove snowflakes or raindrops.

johnmeyer
11th May 2021, 14:53
I am not sure what "real time frame accurate" can possibly mean, as, the way I understand it, it is imppossible to achive since no fps of any digital media for consumers I know can do 16 or 18fps. Indeed, one can have whatever fps wants on a computer, but even there it can only be displayed "frame accurate" only if the monitor and the video card support those fps or multiple thereof. While it is true that DVD and BD don't support all frame rates, all modern TV sets can play any frame rate from media connected to the USB ports. I play 16 fps material from a thumb drive all the time. What's more, because BD was only moderately successful, very few of my clients have such equipment. As a result, I deliver all of my projects on thumb drives.

chmars
11th May 2021, 21:20
Make it look like DasGrain in NUKE?)
http://www.nukepedia.com/gizmos/other/dasgrain
Ok. However, regraining will not be my first option. Will try to balance between grain and dirt first.
I think there is already a thread of converting these movies into digital for further processing.

Yes, but more specific to one whole script and versions. Didn't want to slip off topic.

I am not sure what "real time frame accurate" can possibly mean...

Yes, true, post corrected. I meant one footage frame to one video frame (after software sorting) + captured in real-time.

As for dirt and grain, well, naturally, dirt is larger than grain, but also this depends on the film. And what happen if you filmed rain or snow or a sand storm? Yeap, you have to decide by yourself.
Studying how to determine the size of the dirt to remove. Found max size but confused with min size.
If you have source code, i think professional in forum can do it
Have to clean it and know more what I am doing. But I will.
chmars,
Try SpotLess (https://forum.doom9.org/showthread.php?t=181777) or SpotRemover (https://forum.doom9.org/showthread.php?t=182407) scripts or DeSpot (http://avisynth.nl/index.php/DeSpot) filter. Be careful, they can remove snowflakes or raindrops.
Great, thanks.

@John, IIRC, you don't like too clinic captures. What is your nowadays filter choice to remove dirt? Still like in the 2017 script?

johnmeyer
12th May 2021, 04:36
I have used Spotless and it shows great promise.

I was the one who introduced RemoveDirt and RemoveDirtMC to the film restoration threads. The earlier attempts at dirt removal were not cutting it IMHO. The problem however, is no one (and I mean NO ONE) understands the innards of RemoveDirt. As a result, we've never really figured out how to explicitly specify the size of the dirt blob to remove. I'm not even sure you can specify the color. This is not true of other spot removal tools. For instance, Despot lets you specify whether you want to remove only white spots, only black spots, or both. You can also specify contrast, the spot size, etc. So it is better in that sense, but tuning it is a nightmare.

Spotless has the potential to do better than any of them

No matter what you use, you need to go through a LOT of footage after you've removed dirt in order to look for things that disappear from frame to frame. As one example, I do a lot of work for a sports collector, and I always have to do two restorations, one with RemoveDirt and one without. The reason is that, even at low settings, RemoveDirt will make the football disappear during a pass or kick. I've also seen shirt buttons disappear, along with many other small moving objects.

My solution is to line up, in my NLE, the restoration without RemoveDirt below the fully restored version, and whenever something disappears I have a one button macro that cuts out a few frames and replaces them with the dirty version. Dirt is much nicer than disappearing/reappearing objects.

I have many revisions to my script, but don't share them because it is too much work to support. My old versions will work just fine, I'm sure. Remember, my versions use less sharpening than Fred's because he is usually dealing with pristine film and I deal with client footage that's been stored in the basement outside a box or can for sixty years. You don't want to sharpen old, grungy film too much. I also made the script much faster, through MT, the DLLs I chose, and also by using the two step estimation process with MVTools2.

Fred has done more work with auto color correction, although I have posted a version that uses GamMac. Personally, I have found auto color to be unreliable and therefore still do most of my color correction by hand.

joka
12th May 2021, 06:21
You can try to restore the grain. It is not perfect (in the areas where the dirt is removed is no useable grain). The function adds the grain up to a difference of str1 and reduce the difference to 0 for big differences (0 for difference > str2).

rd .. clip from Remove dirt
ori .. original

out = rd.mRD_RestoreGrain(ori)


Function mRD_RestoreGrain (clip rd, clip o, float "str1", float "str2") {

str1 = string(default(str1, 10.0))
str2 = string(default(str2, 20.0))

expr = " x 128 - abs "+str1+" min "+str2+" x 128 - abs - min 0 max x 128 - x 128 - abs 1 max / * 128 + "

Return mt_makediff(o, rd).mt_lut(expr).mt_adddiff(rd, chroma="copy second")
}

chmars
12th May 2021, 23:36
I have used Spotless and it shows great promise.
...
No matter what you use, you need to go through a LOT of footage after you've removed dirt in order to look for things that disappear from frame to frame.
...
I have found auto color to be unreliable and therefore still do most of my color correction by hand.

Ok, thank you for the answers if I dare say it once again!
I'll try Spotless. Getting addicted to avisynth, I 'm affraid.
Yes, color, even gamma/light seem difficult to adjust fast and precisely in avisynth.

Thanks joka, I'll try that too.

chmars
22nd May 2021, 15:08
As many recommanded, I tried Spotless. Impressing!
Here is a part of dozen of old and dirty 8MM reels I have to transfer.
As you can see, lot to tweak not to loose too many details, in the sea, for example.
But promising.

Click on the picture to download the video:

https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/MnyhRNfkoDukWpb/download (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/TUZCy6e2ANtyVqj/download)

But something went wrong with Koka's RestoreGrain trick.

What do I have to adapt not to loose brightness?

source1= AviSource("D:\458_graded-trim_for_tests-v210.avi")

BlkSz = 8
OLap = 2
Pel = 1
Tm=true

spotless_source1=SpotLess(source1,blksz=BlkSz,OLap=Olap,pel=pel,Tm=Tm)

rd = spotless_source1
ori = source1
out = rd.mRD_RestoreGrain(ori)

StackVertical(subtitle(source1,"original",size=68,align=2),subtitle(spotless_source1,"spotless",size=68,align=2)\
,subtitle(out,"spotless+restoregrain",size=68,align=2))

#------------------------------------------Koka,s RestoreGrain

Function mRD_RestoreGrain (clip rd, clip o, float "str1", float "str2") {

str1 = string(default(str1, 10.0))
str2 = string(default(str2, 20.0))

expr = " x 128 - abs "+str1+" min "+str2+" x 128 - abs - min 0 max x 128 - x 128 - abs 1 max / * 128 + "

Return mt_makediff(o, rd).mt_lut(expr).mt_adddiff(rd, chroma="copy second")
}


#-------------------------------------------StainlessS Spotless



Function SpotLess(clip c,int "RadT",int "ThSAD",int "ThSAD2",int "pel",bool "chroma", int "BlkSz",Int "Olap",bool "tm",Bool "glob",Float "bBlur") {
myName = "SpotLess: "
RadT = Default(RadT,1) # Temporal radius. (MCompensate arg)
ThSAD = Default(ThSAD,10000) # SAD threshold at radius 1 (Default Nearly OFF).
ThSAD2 = Default(ThSAD2,ThSAD) # SAD threshold at radius RadT.
Pel = Default(pel,2) # Default 2. 1, 2, or 4. Maybe set 1 for HD+. (1=precision to pixel, 2=precision to half pixel, 4=quarter pixel)
Chroma = Default(chroma,True) # MAnalyse chroma arg. If set to true, use chroma in block matching.
BlkSz = Default(BlkSz,8) # Default 8. MAnalyse BlkSize. Bigger blksz quicker and perhaps better, esp for HD clips.
Maybe also better where BIG noise.
OLap = Default(OLap, BlkSz/2) # Default half of BlkSz.
Tm = Default(tm,True) # TrueMotion, Some folk swear MAnalyse(truemotion=false) is better.
Glob = Default(glob,True) # Default True, Allow set MAnalyse(global) independently of TrueMotion.
Bblur = Default(bblur,0.0) # Default OFF
Assert(1 <= RadT,myName + " 1 <= RadT")
Assert(0.0 <= bblur <= 1.58, myName + "0.0 <= bblur <= 1.58")
Assert(pel==1 || pel==2 || pel==4, myName + "pel==1 || pel==2 || pel==4")
pad = max(BlkSz,8)
sup = (bBlur<=0.0 ? c : c.blur(bblur)).MSuper(hpad=pad,vpad=pad,pel=pel,sharp=2)
sup_rend = (bBlur<=0.0) ? sup : c.MSuper(hpad=pad,vpad=pad,pel=pel,sharp=2,levels=1) # Only 1 Level required where not MAnalyse-ing.
MultiVec = sup.MAnalyse(multi=true, delta=RadT,blksize=BlkSz,overlap=OLap,chroma=Chroma,truemotion=Tm,global=Glob)
c.MCompensate(sup_rend, MultiVec, tr=RadT, thSad=ThSAD, thSad2=ThSAD2)
MedianBlurTemporal(radiusY=0,radiusU=0,radiusV=0,temporalradius=RadT) # Temporal median blur only [not spatial]
SelectEvery(RadT*2+1,RadT) # Return middle frame
}

StainlessS
22nd May 2021, 15:35
Suggest

tm = False # many think its better option
pel = 2 # or 4, 1 is least accurate, maybe 1 for TRUE HD content.

Also add Bblur=0.6 to spotless, or use the beta [about last post in Spotless thread].
I suspect that kolak restore grain thing is 8 bit only.
Maybe DogWay added some HBD restore grain thing to his recent library [or real.finder].

chmars
22nd May 2021, 22:22
Thanks
Suggest

tm = False # many think its better option
pel = 2 # or 4, 1 is least accurate, maybe 1 for TRUE HD content.

Also add Bblur=0.6 to spotless, or use the beta [about last post in Spotless thread].
ok

I suspect that kolak restore grain thing is 8 bit only.

True

Maybe DogWay added some HBD restore grain thing to his recent library [or real.finder].
Found this:
https://github.com/Dogway/Avisynth-Scripts/blob/master/Mods/GrainFactory3mod.avsi
I'll try it.

StainlessS
22nd May 2021, 23:54
I think that Grainfactory thingy is just for adding grain, rather than recovering filtered out grain [I could be wrong].

I dont like grain, and so never have the urge to add any back.

Perhaps someone could advise if any HBD version of mRD_RestoreGrain() exists.

kedautinh12
23rd May 2021, 00:23
Can ask @Dogway or @real.finder for HBD ver

real.finder
23rd May 2021, 04:43
HBD mRD_RestoreGrain
Function mRD_RestoreGrain (clip rd, clip o, float "str1", float "str2") {
sisavs26 = !(VersionNumber() < 2.60)

str1 = string(default(str1, 10.0))
str2 = string(default(str2, 20.0))

expr = sisavs26 ? " x range_half - abs "+str1+" scalef min "+str2+" scalef x range_half - abs - min 0 max x range_half - x range_half - abs 1 max / * range_half + " : " x 128 - abs "+str1+" min "+str2+" x 128 - abs - min 0 max x 128 - x 128 - abs 1 max / * 128 + "

Return sisavs26 ? mt_makediff(o, rd).mt_lut(expr, use_expr=2).mt_adddiff(rd, chroma="copy second") : mt_makediff(o, rd).mt_lut(expr).mt_adddiff(rd, chroma="copy second")
}

kedautinh12
23rd May 2021, 05:21
Thank real.finder

kedautinh12
23rd May 2021, 05:34
I wonder can use mRD_RestoreGrain with another plugins/scripts ex: despot().mRD_RestoreGrain()??

chmars
23rd May 2021, 09:56
Thank you real.finder, great.
On first look, outputs a compromise between source and Spotless. Grains greatly comes back, some dirt also do, of course.
Have to play with parameters though.

kedautinh12
23rd May 2021, 11:09
If you find out better results, can you give me scripts and pictures??

chmars
24th May 2021, 12:02
These tools are impressing!
Here, a test.

https://nmldqjct.preview.infomaniak.website/shared_files/index.php/apps/files_sharing/ajax/publicpreview.php?x=1881&y=571&a=true&file=458_graded_spotless_restoregrain_8bit.00.jpeg&t=9vqEYjKdLB3Kuzq&scalingup=0 (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/BcvtxV9PEwGrVIu/download)

0. Original
1. Comparison of Spotless, RemoveDirtMC,
2. Combination of both,
3. Sharpen,
4. Grain restored.
5. Original

I wasn't able to decide between Spotless and RemoveDirtMC, because one is removing dirts that the other one wouldn't remove.
So I tried to concatenate both, just to see.
Still a bit of dirt back with grain restoration but for me, the compromise is very acceptable.

Here, the avi file used to build this test (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/citK3NKEazfcsr4/download)
Here, the resulting compressed file (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/BcvtxV9PEwGrVIu/download) (same as picture click)
Here, the resulting lossless compressed file (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/EzGGOAVgKn77Xty/download)

Script in the next post

EDIT: I didn't try yet to play with RestoreGrain parameters.

Strange practice but it's not so bad, what do you think?
Is there a way to stay in 4:2:2 10 bit with unsharpmask or what is the best conversion to feed it?
.

chmars
24th May 2021, 12:03
/*
24/05/2021 - Experiment by Chmars, thank to solutions given by doom9 forum users, to remove dirt but keep grain.
Discussion here: https://forum.doom9.org/showthread.php?p=1943385#post1943385

Much more experimented people made scripts for footge restoring, please read them here: https://forum.doom9.org/showthread.php?t=144271
! Multithread, memory and other stuff as used here might be totally wrong !

Tools used:
StainlessS Spotless 1.06, please find and use original and updated version here: https://forum.doom9.org/showthread.php?t=181777
Real.finder Restoregrain, same page
RemoveDirtMC and unsharpmask usages borrowed from VideoFred /Johnmeyer found on the above footage restoring thread.

#~ Artifacts when sharpening after restoring grain, hence sharpening before restoring grain.

As this script will be used at the end of the workflow, I thought it was not a problem to convert all to 8bits 4:2:0 as I didn't find other way with unsharpmask.
...But if you know a way to keep 10bit 4:2:2, please share.
*/


SetMemoryMax(2000)
threads = 16
SetFilterMTMode("DEFAULT_MT_MODE", 2)
Loadplugin("D:\somepath\RemoveDirt.dll")
Loadplugin("D:\somepath\RgTools.dll")
Loadplugin("D:\somepath\warpsharp.dll")


source1= AviSource("D:\davinci_eric_folder\rushes_cathy_new_system\458_graded-trim-crop_for_tests.avi")
source1= KillAudio(source1)
source1 = ConvertTo8bit(source1)
source1 = ConvertToYV12(source1)

BlkSz = 12
OLap = 4
Pel = 2
Tm=false
Bblur = 0.6
ThSAD = 5000
ThSAD2 = 5000
RadT = 2

Mytext="BlkSz=12,Olap=4,Pel=2,Tm=False,Bblur=0.6,Thsad2=Thsad=5000,RadT=2,Dirt_str=60,Us_str=120, Us_rad=5, Us_th=1, Rest_gr_str2=20"

dirt_strength=60

Usharp_strength= 120
Usharp_radius= 5
Usharp_th = 1 #too high = too many dark pixel packs (ex trees)

#~ Sharp_Strength = 0.9

txt_sz = 40

spotless_out=SpotLess(source1,blksz=BlkSz,OLap=Olap,pel=pel,Tm=Tm,Bblur=Bblur,thsad=thsad,thsad2=thsad2,RadT=RadT)
rd_out = RemoveDirtMC(source1,dirt_strength,false)
spotless_Rd = RemoveDirtMC(spotless_out,dirt_strength,false)

#Sharpen----------------------------------------------------------------------
spotless_Rd_Sh=spotless_Rd.unsharpmask(Usharp_strength,Usharp_radius,Usharp_th)
#~ spotless_Rd_Sh =spotless_Rd_Sh.sharpen(Sharp_Strength)

# Restore grain -------------------------------------------------------------
rd = spotless_Rd_Sh
orig = source1
spotless_Rd_Sh_Rg = mRD_RestoreGrain(rd, orig)
#----------------------------------------------------------------------------------

group = StackHorizontal(\
subtitle(source1,"Original",size = txt_sz,align=2),\
subtitle(spotless_out,"SpotlesS",size= txt_sz,align=2),\
subtitle(rd_out,"RemoveDirtMC",size= txt_sz,align=2),\
subtitle(spotless_Rd,"SpotlesS+RDMC",size = txt_sz,align=2),\
subtitle(spotless_Rd_Sh,"SlesS+RDMC+Sharp",size = txt_sz,align=2),\
subtitle(spotless_Rd_Sh_Rg,"Sl+RDMC+Sh+RGrain",size = txt_sz,align=2),\
subtitle(source1,"Original",size = txt_sz,align=2))

subtitle(group,Mytext,size = txt_sz,spc=4,align=7)


#~ ------------------------------------------------------------------------------------------------------------------
#~ ------------------------------------------------------------------------------------------------------------------
#~ ------------------------------------------------------------------------------------------------------------------



Function mRD_RestoreGrain (clip rd, clip o, float "str1", float "str2") {
sisavs26 = !(VersionNumber() < 2.60)

str1 = string(default(str1, 10.0))
str2 = string(default(str2, 20.0))

expr = sisavs26 ? " x range_half - abs "+str1+" scalef min "+str2+" scalef x range_half - abs - min 0 max x range_half - x range_half - abs 1 max / * range_half + " : " x 128 - abs "+str1+" min "+str2+" x 128 - abs - min 0 max x 128 - x 128 - abs 1 max / * 128 + "

Return sisavs26 ? mt_makediff(o, rd).mt_lut(expr, use_expr=2).mt_adddiff(rd, chroma="copy second") : mt_makediff(o, rd).mt_lut(expr).mt_adddiff(rd, chroma="copy second")
}

/*
SpotLess v1.06. temporal spot/noise remover, by StainlessS @ Doom9. https://forum.doom9.org/showthread.php?t=181777
Original idea from Didée post :- https://forum.doom9.org/showthread.php?p=1402690#post1402690
Req:- Pinterf MvTools2(), Pinterf Medianblur2() with MedianBlurTemporal rather than the MedianBlurT() from Didée post.
With appropriate plugins, will be AVS+ colorspace and x64 compatible.
Fine using Avs+ Prefetch() so long as current Pinterf plugins, and Frame Accurate source. RequestLinear() following the source filter might suffice as frame accurate source filter.

NOT FOR cartoon/anime, live video only, sorry.

v1.01, Remove RadT Max check. Add MSuper(hpad=16,vpad=16). Add BlkSz arg.
v1.02, Add some stuff.
v1.03, Frame size auto config of args removed (found instances where caused problems). Added Glob and bBlur args.
v1.04, Script breaking changes, I guess is more flexible if can also set ThSAD, inserted ThSAD 3rd arg. RadT now default 1, was 2, dont over denoise unless requested.
v1.05, Additional checks on args.
v1.06, Glob Default true, Almost always better.

SpotLess(clip c,int "RadT"=1,int "ThSAD"=10000,int "ThSAD2"=ThSAD,int "pel"=2,bool "chroma"=true, int "BlkSz"=8,Int "Olap"=BlkSz/2,
\ bool "tm"=true,Bool "glob"=True,Float "bBlur"=0.0)

RadT, 1 or more, Default 1. Removes Spots on up to RadT [Temporal Radius] consecutive frames.
RadT > 2 will usually be overkill. Setting too high could possibly result in blurring.
Each pixel in result frame is median pixel value of (2*RadT+1) motion compensated frames (including source, ie current_frame-RadT to current_frame+RadT).

ThSAD, Default 10000=NEARLY OFF(ie ignore hardly any bad blocks), 0 < ThSAD < 16320(8*8*255). 8x8 block SAD threshold at radius 1 (ie at current_frame +- 1) [SAD, Sum of Absolute (pixelwise) Differences].
ThSAD and ThSAD2 suggested absolute minimum of maybe about 400.
ThSAD and ThSAD2 thresholds are based on 8 bit 8x8 block, irrespective of colorspace depth or BlkSz, max=8x8x255=16320, use same thresholds where High Bit Depth.
In mvTools MCompensate(), when creating a compensated block the SAD between compensated block and the same original block in current_frame, the 8 bit SAD is measured and if
greater than SAD threshold then that block is ignored and uses original block from current frame instead. [The compensated block is judged too different, so ignored & original block used instead
in the result MCompensated frame].
Where eg ThSAD=64, AVERAGE absolute single pixel difference threshold would be 64/(8*8)=1, so AVERAGE absolute pixel difference greater than 1 would ignore that mcompensated block and use the
block from current frame in the resulting mcompensated frame instead. This example allows for all pixels in a 8x8 block to be different by 1, or a single pixel in 8x8 block to be different by 64,
or some other mixture.
A problem with above is, if a low ThSAD and current_frame block is mostly noise, so compensated blocks could be judged bad because they are too different to the bad noisey block, and the result
block may/will be just as bad as the noisy source block. A possible solution to this problem is to have a higher SAD threshold and/or have a bigger BlkSize so that the number of bad source pixels
after converting/scaling to as if an 8x8 block, will contain fewer bad noise pixels. So, SpotLess BlkSz arg would ideally maybe 4 or more times the area of the largest spots that you have, and a SAD
threshold big enough so as to not ignore the block [ wild guess minimum SAD threshold for big spot sizes of (8x8x255)/4 = 4080 ].
Where a complete source frame is bad, then maybe should have very high (eg 10000) SAD threshold, and BlkSz may not really matter too much.
It is not the end of the world if some of the compensated blocks are ignored and swapped for the original current_frame block. Nor is it the end of the world if
no blocks were ignored because of high SAD threshold. The final result pixel is median pixel value of (2*RadT+1) motion compensated blocks, so allowing for some mistakes by choosing the
middle pixel value.
I've just tested real bad double frame, full frame luma and chroma corruption, with below line:
SpotLess(RadT=5,ThSAD=1000000,ThSAD2=1000000,pel=2,chroma=false,BlkSz=8,Olap=4,tm=false,glob=false,bBlur=0.0)
And although both SAD thresholds of 1 million, are totally impossible and so no blocks could possibly be ignored and yet we still got pretty good results, all frames were fixed
as we still had the temporal median filter to fall back on and pick the middle pixel value.

From mvtools2 docs:
ThSAD is SAD threshold for safe (dummy) compensation.
If block SAD is above the thSAD, the block is bad, and we use source block instead of the compensated block. Default is 10000 (practically disabled).

ThSAD2, Default ThSAD, 0 < ThSAD2 < 16320(8*8*255), Lower removes fewer spots, but less chance of blurring.
ThSAD2 sets the SAD [Sum of Absolute Differences] threshold for most distant frame from current_frame at distance RadT, with those frames that are distances in-between 1 and RadT
acquiring a SAD threshold linearly interpolated between the two.
From mvtools2 docs:
ThSAD2:
Defines the SAD soft threshold for the furthest frames at current_frame +- RadT.
The actual SAD threshold for each reference frame is a smooth interpolation between the original thSAD (close to the current frame)
and thSAD2. Setting thSAD2 lower than thSAD allows large temporal radii and good compensation for low SAD blocks while reducing the global error and the
risk of bluring when the result of MCompensate is passed to a temporal denoising filter.
EDIT: Although I have said that SAD threshold being too high could result in blurred frames, that is really taken from above "risk of bluring" line from mvtools docs,
however, that warning says "temporal denoising filter", which might suggest pixel averaging, whereas we are using pixel median. I'm not sure that blurring would be the result
of having too high a SAD threshold.

Pel, Default 2. 1, 2, or 4. Maybe set 1 for HD+. (1=precision to pixel, 2=half pixel, 4=quarter pixel)

Chroma, Default True. MAnalyse chroma arg. If true, use chroma in block matching when creating vectors. Maybe use False if source B&W or color noise.

BlkSz, Default 8. MAnalyse BlkSize. Bigger blksz quicker and perhaps better for HD clips. [Info: current Pinterf MvTools allows for BlkSize=12, and overlap=6]

OLap, Default half BlkSz, Block overlap.

Tm, TrueMotion Default True. Some folk swear truemotion=false is better.

Glob, Default True (True v1.06, was same as Tm, true almost always better), Allow set MAnalyse(global) independently of TrueMotion.
From MvTools2 docs for MAnalyse,
global
Estimate global motion (at every level) and use it as an additional predictor.
Only pan shift is estimated (no zoom and rotation).
Use false to disable, use true to enable.

bBlur, Default 0.0 [OFF]. If used, Suggest about 0.6, where MAnalyse create vectors is performed on denoised (blurred) super clip.
*/

Function SpotLess(clip c,int "RadT",int "ThSAD",int "ThSAD2",int "pel",bool "chroma", int "BlkSz",Int "Olap",bool "tm",Bool "glob",Float "bBlur") {
myName = "SpotLess: "
RadT = Default(RadT,1) # Temporal radius. (MCompensate arg)
ThSAD = Default(ThSAD,10000) # SAD threshold at radius 1 (Default Nearly OFF).
ThSAD2 = Default(ThSAD2,ThSAD) # SAD threshold at radius RadT.
Pel = Default(pel,2) # Default 2. 1, 2, or 4. Maybe set 1 for HD+. (1=precision to pixel, 2=precision to half pixel, 4=quarter pixel)
Chroma = Default(chroma,True) # MAnalyse chroma arg. If set to true, use chroma in block matching.
BlkSz = Default(BlkSz,8) # Default 8. MAnalyse BlkSize. Bigger blksz quicker and perhaps better, esp for HD clips. Maybe also better where BIG noise.
OLap = Default(OLap, BlkSz/2) # Default half of BlkSz.
Tm = Default(tm,False) # TrueMotion, Some folk swear MAnalyse(truemotion=false) is better.
Glob = Default(glob,True) # Default True, Allow set MAnalyse(global) independently of TrueMotion.
Bblur = Default(bblur,0.0) # Default OFF
Assert(1 <= RadT,myName + " 1 <= RadT")
Assert(0.0 <= bblur <= 1.58, myName + "0.0 <= bblur <= 1.58")
Assert(pel==1 || pel==2 || pel==4, myName + "pel==1 || pel==2 || pel==4")
pad = max(BlkSz,8)
sup = (bBlur<=0.0 ? c : c.blur(bblur)).MSuper(hpad=pad,vpad=pad,pel=pel,sharp=2)
sup_rend = (bBlur<=0.0) ? sup : c.MSuper(hpad=pad,vpad=pad,pel=pel,sharp=2,levels=1) # Only 1 Level required where not MAnalyse-ing.
MultiVec = sup.MAnalyse(multi=true, delta=RadT,blksize=BlkSz,overlap=OLap,chroma=Chroma,truemotion=Tm,global=Glob)
c.MCompensate(sup_rend, MultiVec, tr=RadT, thSad=ThSAD, thSad2=ThSAD2)
MedianBlurTemporal(radiusY=0,radiusU=0,radiusV=0,temporalradius=RadT) # Temporal median blur only [not spatial]
SelectEvery(RadT*2+1,RadT) # Return middle frame
}
function RemoveDirtMC(clip,int "limit", bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)

# Alternative way to do pre-filtering.
# prefiltered = fft3dfilter(clip,sigma=1,sigma2=2,sigma3=3,sigma4=5,bw=64,bh=64)

prefiltered = RemoveGrain(clip,2)
superfilt = MSuper(prefiltered, hpad=32, vpad=32,pel=2)

super=MSuper(clip, hpad=32, vpad=32,pel=2)

bvec = MAnalyse(superfilt,isb=true, blksize=16, overlap=2,delta=1, truemotion=true)
fvec = MAnalyse(superfilt,isb=false, blksize=16, overlap=2,delta=1, truemotion=true)

# Increase thSAD if moving objects are being removed
bvec_re = Mrecalculate(super,bvec,blksize=8, overlap=0,thSAD=100)
fvec_re = Mrecalculate(super,fvec,blksize=8, overlap=0,thSAD=100)

backw = MFlow(clip,super,bvec_re)
forw = MFlow(clip,super,fvec_re)

clp=interleave(forw,clip,backw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
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=6,cthreshold=8, gmthreshold=40,dist=3,dmode=2,debug=false,noise=limit,noisy=4, grey=_grey)

# Alternative settings
# return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=true)
# return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=6,cthreshold=8, gmthreshold=40,dist=3,tolerance= 12,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey,show=false)
}
Prefetch(threads)

real.finder
24th May 2021, 14:12
Is there a way to stay in 4:2:2 10 bit with unsharpmask or what is the best conversion to feed it?
.

https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/UnsharpMask_avsi.avsi (there are dogway edit of it too if you like)

also you may like RemoveDirtMC_SE instead of RemoveDirtMC https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/RemoveDirtMC_SE.avsi

chmars
24th May 2021, 15:43
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/UnsharpMask_avsi.avsi (there are dogway edit of it too if you like)

also you may like RemoveDirtMC_SE instead of RemoveDirtMC https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/RemoveDirtMC_SE.avsi
Thanks.
Trying UnsharpMask_avsi.avsi. Txt file in plugins... ok.
But Avspmod says "no function spasses". Google, doom search, wiki...no track of something called spasses.

real.finder
24th May 2021, 15:45
Thanks.
Trying UnsharpMask_avsi.avsi. Txt file in plugins... ok.
But Avspmod says "no function spasses". Google, doom search, wiki...no track of something called spasses.

https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

StainlessS
24th May 2021, 15:51
Must be called "Zs_RF_Shared.avsi" in plugins, ie not a *.txt file.

EDIT: I mean, "UnsharpMask.avsi"
and not "UnsharpMask_avsi.avsi"

EDIT: And also, turn off that brain dead Windows Explorer (file manager) Folder options,
"Hide Extensions for known file Types".

Maybe you created a text file, and changed extensions to .avsi, but it is still really a .txt file
due to that crazy option being selected.
(Right click and select Properties to see real extension, even with that messed up option selected)

real.finder
24th May 2021, 16:00
EDIT: And also, turn off that brain dead Windows Explorer (file manager) Folder options,
"Hide Extensions for known file Types".

Maybe you created a text file, and changed extensions to .avsi, but it is still really a .txt file
due to that crazy option being selected.
(Right click and select Properties to see real extension, even with that messed up option selected)

or, just right click on "Raw"

https://i.postimg.cc/ryNBGF85/Untitled.png (https://postimages.org/)

then save as :D

chmars
24th May 2021, 16:12
Tanks, no, no worry, I meant "text type avsi file (actually text file with avsi ext)"
I desactivate all pseudo-simplifying assisting options, even Windows if It wouldn't have avisynth!
I never tried right click in Github. Cool.
RemoveDirtMC_SE working with 4:2:2/10b so far :cool:
EDIT: RemoveDirtMC_SE too.

StainlessS
24th May 2021, 16:36
or, just right click on "Raw"
then save as :D
Damn, I knew there must be an easier method than copy/paste filename from page into new text file name, and then
Go RAW, and then CTRL A, copy all, and paste into text file.

Thats why R.F. gets the big bucks :)

EDIT: SomeScript.avsi.txt problems have happened before on-site.

real.finder
24th May 2021, 17:01
EDIT: SomeScript.avsi.txt problems have happened before on-site.

yes, in pastebin

kedautinh12
24th May 2021, 17:14
Thanks for your script chmars

chmars
24th May 2021, 20:48
Thanks for your script chmars

Verify by yourself though. I noticed my OLap = 4 ( with Blksz 12 ) was too low. It is making stairs in some shadowed 45° diagonals.
Very rarely however. Only when something appears from one frame to the next one. Like the cigarette thing maybe, in the Spotless thread.
One might think it is a detail but I saw it from far, without searching.
As I have big dirt spots, I believe I have to keep Blksz high. So, a better value for OLap is 6.

https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/hGUUXVRghJXH7mj/download

RemoveDirtMC_SE is efficient but seems to me "eating more grain" than Spotless even when changing repmode and clmode.
I might keep Spotless only, without restoring grain (and some dirt neither).

I also notice how uggly-noisy can grain be (1st pic, right leg)

StainlessS
24th May 2021, 21:08
Ideally BlkSz should be a fair bit bigger than spots, spot=8x8 then blksz=16x16, or bigger.
You want blocks to be able to match good [non spot] pixels in a block, and to outnumber the spot pixels.
and maybe Olap at about half blksz.

chmars
24th May 2021, 22:22
Hmm, ok, so if I go higher with BlkSz, I will not necessarily increase the stair effect.
You want blocks to be able to match good [non spot] pixels in a block
Are there a defined blocks of pixels in images, blocks that BlkSz has to override/match to?:o

johnmeyer
24th May 2021, 23:34
chmars,

Those are really useful, and very well-done comparisons. I guess I need to roll up my sleeves and try substituting SpotlessS (my spelling) for RemoveDirtMC in my various film restoration scripts.

I have backed away from using too much remove grain, mostly because I often end up with "gooey" video where everything looks one frame is melting into another, like a Salivdor Dali film. You can see this in my attempt to restore Polavision film. Because of the massive chemical stains that can only be removed digitally, I had the RemoveDirtMC settings turned up to five times the normal values. At roughly the thirty second mark (the toy wagon on the sidewalk) you'll see it in the street behind the boy. The results at the 1:10 mark are even worse. Look at the wall behind the boy pushing the toy car.

https://www.youtube.com/watch?v=ud1XNIoh1P8

Therefore, the other test you need to do before to compare SpotlessS with RemoveDirtMC is to look at the results in motion. Individual frames are useful, but with temporal filters you often don't spot filter artifacts until you put everything in motion.

StainlessS
25th May 2021, 00:09
If your spots are on only single frames (and as film, I'm guessin' that is true) then suggest RadT=1.
(Use RadT= number of consecutive frames spots can 'infect').

Also, as HD frames, maybe at least blkSz=16, Olap=16/2, or
BlkSz=32, OLap=32/2.

Also, I suggest the beta Spotless, about last post in the Spotless Thread.
[bBlur =0.6 by default, or can use dc=MyPrefilteredDenoisedClip)
Also, I may change default TM=false, many peoples favorite.

https://forum.doom9.org/showthread.php?p=1939724#post1939724

GMJCZP
25th May 2021, 04:07
I would not want to cause a headache to chmars but it would be interesting to test Killerspots to see what its performance is here, it is not a competition because SpotLess is working wonderfully, what happens is that I have only exhaustively tested KillerSpots in anime.

StainlessS
25th May 2021, 04:18
Cant hurt to try out KillerSpots.
[see GMJCZP Flea Market, in his sig above]

chmars
25th May 2021, 08:25
chmars,

Those are really useful, and very well-done comparisons. I guess I need to roll up my sleeves and try substituting SpotlessS (my spelling) for RemoveDirtMC in my various film restoration scripts.

I have backed away from using too much remove grain, mostly because I often end up with "gooey" video where everything looks one frame is melting into another, like a Salivdor Dali film.
...

Thaank you, yes, I noticed Spotlesss seems to be more adapted to restoration as the result is effective in dirt removing but still, the output is sensibly less "digital" than RdMC.

...
You can see this in my attempt to restore Polavision film. Because of the massive chemical stains that can only be removed digitally, I had the RemoveDirtMC settings turned up to five times the normal values. At roughly the thirty second mark (the toy wagon on the sidewalk) you'll see it in the street behind the boy. The results at the 1:10 mark are even worse. Look at the wall behind the boy pushing the toy car.
https://www.youtube.com/watch?v=ud1XNIoh1P8

I remember this video from "the long long thread". Very headache footage!
Nevertheless, considering the source, result is good. The phenomenon you describe is also very noticeable in the last scene, like fixed steady grain.
I sometimes note the sharpening. Did you use more sharpen than unsharpmask?
Or maybe it is because of youtube compression.

Therefore, the other test you need to do before to compare SpotlessS with RemoveDirtMC is to look at the results in motion. Individual frames are useful, but with temporal filters you often don't spot filter artifacts until you put everything in motion.
Sure, I did take count of motion in the previous post with Spotless, RDMC compared (https://forum.doom9.org/showthread.php?p=1943433#post1943433).
The pant image triple comparison was taken from the same footage and, effectively, the phenomenon is barely noticeable when the video is running.

If your spots are on only single frames (and as film, I'm guessin' that is true) then suggest RadT=1.
(Use RadT= number of consecutive frames spots can 'infect').

Oh Yes, thanks, forgot to put it back. I tried RadT=2 for these long spots that seemed to be like liquid/chemical, during maybe more than one frame.

Also, as HD frames, maybe at least blkSz=16, Olap=16/2, or
BlkSz=32, OLap=32/2.
Also, I suggest the beta Spotless, about last post in the Spotless Thread.
https://forum.doom9.org/showthread.php?p=1939724#post1939724[/url]
Ok, excellent, I'll try.
I would not want to cause a headache to chmars but it would be interesting to test Killerspots to see what its performance is here, it is not a competition because SpotLess is working wonderfully, what happens is that I have only exhaustively tested KillerSpots in anime.Cant hurt to try out KillerSpots.
[see GMJCZP [B]Flea Market, in his sig above]
Thank you for the suggestion. If I may contradict: headache hurts. :)
I maybe keep it for later but wanna tweak Spotless some more before to test something else.
It is for me very very difficult to pull an objective opinion from such comparisons.
I mean, if you want to know the "truth", it is a lot of work, notes taking with rigor and severity. Hard to get a reliable result. Each filter has lots of params. I am afraid to get lost finally.
Also, I'll assume some irrational reason to stay with Spotless ;)

StainlessS
25th May 2021, 14:45
If I may contradict: headache hurts. :)
Yes indeed :)

KillerSpots is near to Spotless(RadT=1), but also has an Advanced mode, which limits pixel changes. [but that may also prevent total spot removal - might be ok on 'transparent spots'].

RadT=1, does median on 3 frames [2 * RadT + 1], so if 1 frame spots, then 2 frames without spots outnumber spot frames.
So, RadT=ConsecutiveSpotFrames is easy to remember.

chmars
25th May 2021, 21:33
Compared Spotless 1.06 and 1.07, same parameters, including Bblur 0.6.
No differences.
I decided to search for code differences.
I should have done before, not after!
The difference is the ability toprovide a prefiltered clip (HasDC).

Some weeks ago, I didn't know Avisynth exists. (and believed my life was fullfilled).
Diving one more step deeper to discover what is a prefiltered clip is becoming dangerous :p

But I noticed other things:

If your spots are on only single frames (and as film, I'm guessin' that is true) then suggest RadT=1.
Yesno. Few spots (liquid/chem traces alike) last longer than 1 frame. Helps in that case. But RadT increased is slower I guess. Up to one decide if it's worth it.

Spotless is perfect and I am totally happy with its use and can live with it as it is and enjoy all others aspects of life.

But, as professional in perfectionism-maniacism:
I am trying to find a way to get details back. Like background moving water, trees.
I tried to reduce ThSAD until these details came back. But spots came back far before details. Didn't find the use of reducing it, keepin'it at 10000 ATM.
Then, BlkSz. As details are small, smaller than hairs, spots, there is no use of reducing BlkSz, I believe.

Some ideas to conserve details into water, trees, grass...:
-Ability to set a limit in the amount of removed spots by certain surface (eg: max 3 spots each 100x100 pixel), or (eg: 5 small spots, 2 medium spots, 1 big spot)
-ability to define a minimum color difference between spots and near environment, difference underneath which, spot is not removed (eg: don't remove a dark-blue wave in blue water)
and/or
-ability to select colors where the spot removal is less active (ex: don't remove somuch spots into blue-green water, green trees...)

Also, I finally found a ball in the footage, to see how it disappears while flying.
-We could tell Spotless "simply" to not remove light objects (grey, white...). After all, 90% of dirt is dark.

Well...Maybe these ideas have been discussed 1000 times in dirt removal threads, I apologize if none of them are new, because me, I am (new)

EDIT: Or, we could try to restore more or less grain, depending on the color. Not bad, maybe, as remove grain doesn't bring so much dirt back.

johnmeyer
25th May 2021, 23:23
... We could tell Spotless "simply" to not remove light objects (grey, white...). After all, 90% of dirt is dark.The "only white" or "only dark" setting in Despot were quite useful, back when that was all that was available. Video dropouts tend to be near-white and lacking color and, as chmars says, print film dirt tends to be near-black, and also lacking in any color. Adding chroma and luma threshold settings could make a big difference in reducing false positives such as removing buttons on shirts, something that happens quite often with most spot removal algorithms.

joka
26th May 2021, 07:27
It is always a compromise between removing dirt and keeping moving object / removing grain and keeping details+sharpness.

What are the relevant characteristics to decide (remove vs. keep)?

- black / white dirt
- size of dirt

StainlessS
26th May 2021, 13:16
DeSpot detects spots, and can selectively choose color of spot to remove.
Indeed, with blur=false [or whatever the blur arg is], it only affects those pixels where spots
are identified, does not do frame global changes [only does (TEMPORAL I think) blur if blur arg is true].
So, if multiple passes to remove different size/color spots, then dont ever use the blur arg=true as it will
spread spots temporally, for the next pass, making impossible to detect/remove next color/size spots.
Only blur [if absolutely sure] on final pass.

Spotless does not detect spots at all, and so white/black spot detect aint ever gonna happen.
Spotless creates mutliple candidate frames via MC, and for each pixel finds the median corresponding pixel
of those candidate frames, thats it. Spotless frame has global changes, not just where there are spots.

EDIT: If a block from a candidate frame is too diiferent to the source frame block (by ThSAD,ThSAD2), then it uses the source frame pixels instead <in the median thing>, (which could be good if source pixel is a good pixel, or bad if source pixel is a bad pixel. [So setting ThSAD/ThSAD2 too low would slant towards
using the source pixel <good or bad>, and if set high, then relies more on median getting it right.]
I would tend towards having ThSAD,ThSAD2 a bit high, and BlkSz sufficiently big so that spot pixels are outnumbered by good pixel matches in SAD, and let the median thing do its stuff.

EDIT: Despot arg might be tblur, or blurt [or similar].

chmars
27th May 2021, 09:54
Too bad. I was very satisfied with this grain/spots/sharpness compromise:

https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/rM8k1niecdzpZ7z/download (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/AaXChavgYw6Mql4/download)
Video (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/AaXChavgYw6Mql4/download)

But I had some balloons and fast moving people on a new old footage and some ended throwing nothing in the air with no hands -not very convenient. (I knew it was the risk though)

So I am gonna follow these advices:
The "only white" or "only dark" setting in Despot were quite useful, back when that was all that was available.
...
... interesting to test Killerspots...
Cant hurt to try out KillerSpots.
DeSpot detects spots, and can selectively choose color of spot to remove.

...


Maybe I begin with Despot as there is a possibility to restrict color or darkness of the spot.

EDIT: @John, what do you mean by: " back when that was all that was available"?

Sharc
27th May 2021, 10:17
But I had some balloons and fast moving people on a new old footage and some ended throwing nothing in the air with no hands -not very convenient. (I knew it was the risk though)

Was it persistent (i.e. spanning a couple of frames) or only a single frame? Would people notice when watching real-time?

chmars
27th May 2021, 11:09
-not very convenient.
(Ment: playing ball with no ball, not the filter)

Was it persistent (i.e. spanning a couple of frames) or only a single frame? Would people notice when watching real-time?

(bad graded, sorry: )
https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/j4kJnzXQADSCKpx/download (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/UYnpov4jMtHG1va/download)
Video (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/UYnpov4jMtHG1va/download)

I guess it is subjective. Of course 80% will not notice it. But for one who does it for job, it is delicate, I guess.
.

johnmeyer
28th May 2021, 01:39
EDIT: @John, what do you mean by: " back when that was all that was available"?It was first released eighteen years ago, before most of the other transient removal plugins developed.

kedautinh12
28th May 2021, 02:13
(Ment: playing ball with no ball, not the filter)



(bad graded, sorry: )
https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/j4kJnzXQADSCKpx/download (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/UYnpov4jMtHG1va/download)
Video (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/UYnpov4jMtHG1va/download)

I guess it is subjective. Of course 80% will not notice it. But for one who does it for job, it is delicate, I guess.
.

If spotless detroy many details, you can use SpotRemover with less detail detroyed

chmars
28th May 2021, 21:35
Hi,

@kedautinh12, thanks, here it is.
@John ok, I misunderstood, thought color option wasn't available anymore.

This is my new game of 7 differences :)
This is a new test I made, still to find the good path to:
->remove dirt, sharpen, keep some grain.

This time, as kindly advised by members, I tried SpotRemover:
-Original
-Spotless + sharpening + restore grain
-Spotremover (alone, to not distort results)

Spotless works still as good as before.

For SpotRemover, I think I didn't find the good settings to remove dirt as good. No moving objects were removed though.

One difference, where?
https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/J0d5I6NfKs37dG5/download (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/3uHbifQDt0Ma3RA)
The bottom left ballon.

Spotless likes to eat balloons, hands but not so much trains, neither moving logos:
https://nmldqjct.preview.infomaniak.website/shared_files/index.php/apps/files_sharing/ajax/publicpreview.php?x=1920&y=465&a=true&file=459_s2_002-XAVCI-4K-BLD_5_0-trim_crop-spotless_sharp_restoregrain-SpotRemover_comp.pic2.jpeg&t=ZJG5sgEHBvPNAVA&scalingup=0 (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/lCk8EI9iTENqaWN/download)

Rarely tough, trains logos and train chimneys are too temptating:
https://nmldqjct.preview.infomaniak.website/shared_files/index.php/apps/files_sharing/ajax/publicpreview.php?x=1920&y=465&a=true&file=459_s2_002-XAVCI-4K-BLD_5_0-trim_crop-spotless_sharp_restoregrain-SpotRemover_comp.pic3.jpeg&t=SjSDR0GgbIZB6K3&scalingup=0
(https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/FrCbs938lQI8N5D/download)

Test video here (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/luESRWEyUSbB7bm/download)
Source video here (EDIT: original, avi, huge) (https://nmldqjct.preview.infomaniak.website/shared_files/index.php/s/U2MK5Q1woX7NF5f/download)


I was very interested to look at the test frame by frame.
I noticed that Spotless is really eating only really fast moving objects. Some disappear, some become squared. (baloons, people in the train, chimneys, road signal behind the train)

But in terms of spots removing , I couldn't get good results as easily with the others cleaners I tested. (RemoveDirtMC, Despot).
I don't say I made extensive tests neither I understood all the parameters but I however read, tried and spend time to change parameters. Perhaps, they might work better for experienced users but for noobs like me, more cryptic.
Killerspots, I didn't try. The temporal dimension of Spotless makes me prefer it.

If no one has a suggestion I will not resist to test, atm, my conclusion is that Spotless is the easiest + more efficient solution. Its output combined to unsharpmask and restoring grain gives a result which is, in my taste, a perfect compromise between digital cleaning and analogic feeling, just splendid (when i'll be able to grade it correctly...)!

About eaten objects: It does not happen so often. So I will put both unfiltered and filtered videos on the timeline and apply transparency to bring back moving objects when necessary.

I want to thank members for the plenty of suggestions, and time taken for explanations, which permit to make my way a bit and learn.