Log in

View Full Version : DePanStabilize - scene change handling?


2Bdecided
10th November 2009, 13:28
Does this filter take account of scene changes? I know it can tell you when it thinks there's a scene change - but does it, by default, "break" the motion compensation at scene changes, or carry it over (giving strange results)?

My usage is...

spline36resize(1024,576)

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

est_left=20 est_top=20 est_right=20 est_bottom=20 est_cont=0.8 #crop values for special Estimate clip

CLeft=32 CTop=16 CRight=32 CBottom=16 #crop values after Depan and before final resizing (40,30,40,30)

stab_reference=last.tweak(cont=est_cont).levels(79,1.0,81,255,0,coring=false).greyscale().invert()

mdata=DePanEstimate(stab_reference,trust=1.0,dxmax=maxstab,dymax=maxstab)
stab=DePanStabilize(last,data=mdata,cutoff=0.5,dxmax=maxstab,dymax=maxstab,method=1,mirror=15)
stab2= stab.crop(CLeft,CTop,-CRight,-CBottom)
#stab3=DePanStabilize(last,data=mdata,cutoff=0.5,dxmax=maxstab,dymax=maxstab,method=1,info=true)

stab2


etc.

Many thanks.

Cheers,
David.

Fizick
10th November 2009, 17:54
Yes, it restart stabilization at scenechanges

2Bdecided
11th November 2009, 14:51
Yes, it restart stabilization at scenechangesHow does it determine scene changes?

I wonder if the "levels(79,1.0,81,255,0,coring=false).greyscale().invert()" part, which does seem to help motion tracking, also breaks the scene change algorithm? Or if (because it's also based on motion) it still works OK?

Thanks!

David.

videoFred
11th November 2009, 15:48
Hi David,

I see you are using my stabilizing code, but you have changed my stab_reference clip a little bit. :p

Anyhow, to check if scene change detection works, just set 'info=true' in DepanStabilize. You will see that 'base' changes to 'BASE!' at scene change. If not, you must tweak the gamma of the 'stab_reference' clip.

To make life easy, there is an option in my original script to show the original vs the stabilized clip, with all the info you need.

Fred.

egrimisu
12th November 2009, 11:21
Hi Fred, i checked out your site with the restoration you've done, congratulations i like your job. I have a old 8mm tape of my fathers 50years birthday, do you think you can help to restore a bit. My experience in restoring real video lacks, i haven't worked only wih anime till now.
I'm not familiar with stabilization, shadow improving and lever correction.

Hi David,

I see you are using my stabilizing code, but you have changed my stab_reference clip a little bit. :p

Anyhow, to check if scene change detection works, just set 'info=true' in DepanStabilize. You will see that 'base' changes to 'BASE!' at scene change. If not, you must tweak the gamma of the 'stab_reference' clip.

To make life easy, there is an option in my original script to show the original vs the stabilized clip, with all the info you need.

Fred.

2Bdecided
12th November 2009, 12:55
Thank you Fred - it is indeed your code, and I didn't know that I'd changed it(!). I hadn't read about base/BASE so will take a look. Many thanks!

Cheers,
David.

videoFred
12th November 2009, 13:30
I have a old 8mm tape of my fathers 50years birthday

8mm tape is not the same as 8mm film!

Fred.

videoFred
12th November 2009, 13:32
I didn't know that I'd changed it(!).

Perhaps it's an older version you have? My newest script is available in the film restoring thread.

Fred.