Log in

View Full Version : need help on flicker and depan


lansing
27th October 2008, 18:21
my old anime flickers in most scene, so I added reduceflicker, but after that, I noticed in many stilled scenes there's jitter that move the frames a little up and down. I've tried Depan and MVDepan, but have difficulty with setting the parameters.

this is the farthest I can get, but didn't see to improve much on the jitter, I wanted the frame to stay still. Here's the example (http://www.mediafire.com/download.php?zwdrjwmety3) of the flickering scene.

reduceflicker(2,aggressive=true)

i = ConvertToYV12()
c= crop(i,30,30,-30,-30)
vectors = MVAnalyse(isb = false)
mdata = DePanEstimate(c)
globalmotion = c.MVDepan(vectors, pixaspect=1.094, thSCD1=400,range=5)

DePanStabilize(i, data=globalmotion, dxmax=0,dymax=30,zoommax=1.05,rotmax=1.0,cutoff=2, mirror=15, pixaspect=1.094,info=true)

g-force
28th October 2008, 16:33
Something to try:

temp = last.TemporalSoften(7,255,255,25,2)
Interleave(temp.Repair(last.TemporalSoften(1,255,255,25,2)),last)
DePan(last,data=DePanEstimate(last,trust=0,dxmax=5,dymax=5),offset=-1)
SelectEvery(2,0)

-G

videoFred
28th October 2008, 18:34
You also could try my special stabilizing script:

# stabilizing script by videoFred.
# using a special stab_reference clip for the stabilizer

result="S2" # S1= stabilized clip S2= comparison original vs stabilized clip

film="K:\flicker_sample.avi" #source, you must specify the full path

maxstab=30 #maximum values for the stabiliser (in pixels) 30 is a good start value

est_left=40 est_top=40 est_right=40 est_bottom=40 est_cont=0.6 #crop and contrast values for special Estimate clip

SetMemoryMax(1024) #set this to 1/3 of the available memory


Loadplugin("Depan.dll")
LoadPlugin("DepanEstimate.dll")
LoadPlugin("MaskTools.dll")

source= avisource(film)

stab_reference= source.crop(est_left,est_top,-est_right,-est_bottom).tweak(cont=est_cont).binarize(threshold=80).greyscale().invert()

mdata=DePanEstimate(stab_reference,trust=2.0,dxmax=maxstab,dymax=maxstab)
S1=DePanStabilize(source,data=mdata,cutoff=0.5,dxmax=maxstab,dymax=maxstab,method=1,mirror=15)
S2=DePanStabilize(source,data=mdata,cutoff=0.5,dxmax=maxstab,dymax=maxstab,method=1,info=true)

result1= overlay(source,stab_reference,x=est_left,y=est_top)
S2= stackhorizontal(subtitle(result1,"baseclip for stabiliser -only the B/W clip is used",size=24,align=2),subtitle(s2,"test stabilizer: \n dx=horizontal \n dy=vertical",size=24,align=2))


eval(result)


If you return "S2" you can see a comparison and in the left window an overlay of the "stab_reference" clip over the original clip. With "est_left" etc you can crop this clip, DepanEstimate will only "see" this cropped clip. And playing with the "est_cont" value often helps too.

Fred.

lansing
29th October 2008, 08:38
I've test and tweak around the 2 script, the scene still vibrate a little after applied.
However, it turns out an acceptable result when I added reduceflicker(2) after it, maybe it has something to do with frequencies. But it will generate artifact when it comes to motion scenes.

thetoof
29th October 2008, 09:23
Try deflick

videoFred
29th October 2008, 09:32
But it will generate artifact when it comes to motion scenes.

Have you tried cropping the estimate clip? The idea is to stabilize on a region without motion.

Fred.

lansing
29th October 2008, 16:37
Have you tried cropping the estimate clip? The idea is to stabilize on a region without motion.

Fred.

I did set cropping up to 150 on each side, but the result was nothing far from the other one. I think the issue is that the vibration start from the middle of the frame

videoFred
29th October 2008, 17:20
I think things are moving inside the frame too.
Please try VDubs temporal smoother after my script.
Now your example clip looks nearly perfect to me.... :)

Fred.

lansing
29th October 2008, 18:04
yes, the vibration seems gone when set the strength more than 8, but at the same time the ghosting of the previous frames come up...look at the mouth when its closed


EDIT: typo

videoFred
29th October 2008, 18:14
This is all I could do for you, Lansing!
Maybe others have more and better ideas about this?

Fred.

lansing
30th October 2008, 01:39
after some more tests it seems like by temporal smoother itself fixes most of the problem, only except for the over smoothing on motion scenes