View Single Post
Old 27th November 2006, 07:22   #202  |  Link
oddball
Registered User
 
Join Date: Jan 2002
Posts: 1,264
Hey guys I need some help. I really cannot understand why it's so difficult to fix this problem. I have a movie clip that moves up and down by a few pixels every few frames (Something like every 15 frames but not always). I just need to stablize the up down motion. I thought it would be simple but it appears not.

The depan command I tried was

Code:
i = ConvertToYV12()
mdata = DePanEstimate(i)
DePanStabilize(i, data=mdata, dxmax=0)
But the frame moves up and down by mad amounts every few frames.

In another thread someone suggested I use a cropped clip for motion estimation and apply that to the second clip or somesuch. Damned if I know what he means. The clip has a logo on it that I could use as a guide to help with the motion detection. Since that logo is the same all the way through the clip and it too moves up and down every few frames I thought it would be a matter of applying a filter that detects that area when it moves up and down.

I don't know very much about all these Avisynth commands apart from the basics. The Depan manual seems rather cryptic to someone who does not do much Avisynth work.

Can someone lead me to a solution?

Thanks.

EDIT: OK I tried something from some earlier postings. It seems to work a lot better. No wild motion with big frames appearing this time. Is this OK?

Code:
i=ConvertToYV12()
r=1
mdata=DePanEstimate(i,trust=4,range=r)
DePanInterleave(i,data=mdata,prev=r,next=r,mirror=15)
SelectEvery(r+r+1,r)
i=last
mdata=DePanEstimate(i,trust=4,range=r)
DePanStabilize(i,data=mdata,cutoff=1,prev=1,next=1,mirror=15,dxmax=0,dymax=0)
Awwww crap. Just realised it did nothing to stop the up and down motion. Back to square one.

Nope. I think I nailed it. It needs a few frames to figure out the motion then it stabilizes it rock solid. I removed what looks like a repeat line from that code too.

EDIT: Well it does not seem to stop the very slight up and down motion every few frames at all. Very frustrating.

Last edited by oddball; 27th November 2006 at 08:02.
oddball is offline   Reply With Quote