Take the 2-minute tour ×
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

I have a movie clip that pans from left to right. I've added a motion tracker to an element in the scene that is stationary. But when I apply stabilization the camera panning motion is lost. The autoscale function also crops most of the scene away. It's as if Blender thinks the panning is an error that needs smoothing out.

How can I allow for camera movement while smoothing out only small bumps and jitters?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

Here's how the stabilzation's supposed to work in Blender: the trackers included in the 2D stabilzation tab get pinned down. The image then gets repositioned to keep those tracked points in the same place, effectively countering whatever move you had made. Blender has no way to discern which movement is intentional and which isn't...

enter image description here enter image description here

A workaround for stationary shots with panning (or tilting) is recreating the move after you have stablized the shot.

To do that you need first to unclick the Autoscale button in the Movie Clip Editor. The repositioning of the clip is done on the compositor adding a "translate" or "Transform" node. Note that you will need to rescale the image a bit.

In this case you're panning from left to right, but Blender is moving your image in the opposite direction. So you need to move it back again on the x axis from left to right, so that your picture stays in the frame.

In the compositor add a Movie Clip node with with the original video footage (or image sequence) and you plug it to a Stablize 2D node.

On the Stablize 2D node select the tracked Movie clip as source, so blender can use the tracker information associated to the clip. The output of this node will be the stabilzed image.

Add a Transform Node, and that's where you'll recreate your camera move.

enter image description here

On the timeline go to the first frame of the clip.

Back on the compositor change the values on the transform node to reposition your image so that it fills the frame. Add a key frame on the transform node by pressingI. Scroll down the time line to the end frame, reposition the image again using the transform node and set another key frame.

You might need to play with the interpolation curves, or add a couple more key frames. If your image doesn't fill the frame correctly, showing the edges of the original image, then make changes on the scale. After some trial and error you should have a nice panning shot with no jitter.

enter image description here

Note that is possible that the lens distortion become more obvious. Undistorting might help for that. Also, since you are rescaling the image, know there will be some quality loss (your image might be softer). The only way to prevent that is to shoot your original video in a format that is larger than your output...

Another strange effect that might happen, is that the motion blur that is already part of the original image looks completely wrong. In that case you might want to have the stabilization be "less perfect" by playing with the "location influence" values on the 2D stabilization tab, to let the image wiggle a bit.

Blender doesn't have a one button solution like the "warp stablize" found on Adobe's "for rent" software.

share|improve this answer
    
Thank you, this was exactly what I was looking for. It works great. –  Reed G. Law Jun 15 at 9:46

Wouldn't it be easier to use a python script (a plugin?) to modify the x,y displacement information (equal to the 2D correction) that the "stabilize 2D" block inside the node Editor is using for the correction?

Additionally I see that in the Motion Tracking View the "Movie Clip Editor" panel shows a representation of x,y over time. In this panel there is a filtering window that seems to do that but I am not sure how to use it.

Maybe a python plugin could take x,y and substract a (first or second order) polynomial interpolation of x,y. In this way the image is only corrected of the value (x,y)-interpolation. This would leave panning over x and y axis untouched.

Things become a little more complicated when two or more markers are used for image stabilization.... also rotation could take advantage of the same implementation.

Well I hope some Blender expert could add a comment on this. I would be willing to try to implement the python script.

Just my 2C

EDIT. at this link: http://sonneo.blogspot.com.es/2014/08/better-video-stabilization-in-blender.html#comment-form

You can find the implementation of a high pass filter for the marker speed. It works great but I wonder if it is really optimal.

share|improve this answer
    
Well, it turned out that some guy has actually done a script to filter (high pass filter) that Vx and Vy. Here is the link sonneo.blogspot.com.es/2014/08/… if what is rappresented is actually the velocity along x and y, what is the best method to implement a 2D stabilisation method that preserve panning? there has to be a contrain on displacement and not only on velocity, right? –  Fabrizio Oct 11 at 17:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.