View Full Version : Is there a way to interpolate every frame with too much noise ?
lisztfr9
4th November 2012, 11:44
Hi all,
I'm ending up with interpolating every third frame :
http://cjoint.com/12nv/BKelKDnDyn9.htm
Is there a way to find all theses noisy frames automatically, and have a log of them ?
Also i'm too stupid to build masks, and even to handle overlay.
TIA, L
lisztfr9
4th November 2012, 14:55
SelectEvery(3, 1).BadFrames
How do i rebuild the clip ? gosh...
lisztfr9
4th November 2012, 15:20
This way :
Main = last
Good1 = SelectEvery(Main, 3, 0)
Bad = SelectEvery(Main, 3, 1).BadFrames()
Good2 = SelectEvery(Main, 3, 2)
Interleave(Good1, Bad, Good2)
I will never get used to this avisynth syntax.... think streams ;
lisztfr9
4th November 2012, 19:52
The solution involves mod (%) and scriptclip.Getting scriptvlip to operate only every 3 frames, with current frame + mod.
Because Selectevery will produce a single frame flow, while badframes operate on 3. Cf DePanInterleave.
lisztfr9
4th November 2012, 23:44
Got it :
You need the offset files from the avisynth overlay page in order to get it to work :
http://avisynth.org/mediawiki/Overlay
xoffset.txt
Type int
Default -50
R 0 100 20
I 100 200 20 250
R 200 300 250
I 300 400 250 400
yoffset.txt
Type int
Default -50
R 0 100 20
I 100 200 20 350
R 200 300 350
I 300 400 350 40
a1 = ColorBars().Trim(0,399)
a2 = ImageSource("dot.png").ConvertToRGB32
oa1 = a1
# a2.GreyScale returns a grey dot on a black background;
# Levels makes the dot white
mask_clip = Mask(a2, a2.GreyScale.Levels(0, 0.001, 75, 0, 255))
# Layer(a1, mask_clip)
# Overlay(a1, a2, mask=Showalpha(mask_clip), y=0, x=0, mode="blend", opacity=1)
Overlay(a1, a2, y=0, x=0, mask=showalpha(mask_clip), mode="blend", opacity=1)
ConditionalReader("C:\Program Files\AviSynth 2.5\Examples\xoffset.txt", "ol_x_offset", false)
ConditionalReader("C:\Program Files\AviSynth 2.5\Examples\yoffset.txt", "ol_y_offset", false)
# Info()
ScriptClip("subtitle(string(current_frame))")
# BadFrames(110, blend=true)
main = last
bad = ScriptClip("Badframes(current_frame)")
ab = SelectEvery(main, 3, 0)
bb = SelectEvery(bad, 3, 1)
cb = SelectEvery(main, 3, 2)
Interleave(ab, bb, cb)
# StackHorizontal(last, oa1)
It needs to be optimized...
TIA, L
lisztfr9
5th November 2012, 11:15
I will also try to use Despot on every third frame (which are clustered with speckles)
All theses denoiser should be used with motion compensation plugins, cf DepanInterleave, which is a brilliant idea.
But what i need the most today is a highlight reducer/recovery mask.
Thx, L
cobo
6th November 2012, 04:37
For the bad frames I suggest you try Mdegrain or this script for single frame spot removal.
Single frame spot removal - requires MVtools2 and RemoveGrain (http://avisynth.org/mediawiki/Removegrain) 1.0beta
o1=last o1x=o1.width() o1y=o1.height()
o1sup = o1.MSuper(pel=2,sharp=2)
bv1 = o1sup.MAnalyse(isb=true, delta=1,blksize=8,overlap=4,search=4)
fv1 = o1sup.MAnalyse(isb=false,delta=1,blksize=8,overlap=4,search=4)
bc1 = o1.MCompensate(o1sup,bv1)
fc1 = o1.MCompensate(o1sup,fv1)
Interleave(fc1,o1,bc1)
Clense(reduceflicker=false)
SelectEvery(3,1)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.