3
$\begingroup$

I have a video clip filmed on a GoPro in wide angle format. I've figured out how to apply the Lens Distortion K1, K2, and K3 values which will cancel out the fisheye look of the video. I drew polylines on the video in the Motion Tracking tab of Blender, and edited the lens distortion K values to match the contour of the polylines to features in the video.

However, the polylines do not match up properly because the video needs to be rotated slightly before changing the lens distortion. I can rotate the video after applying the distortion just fine. But I cannot figure out how to apply the rotation transform to the video before applying the distortion, viewing the rotated video in the motion tracker, in order to be able to draw polylines on the already rotated video. Is there a way to do this besides rendering out a rotated video and loading it back into the motion tracker?

$\endgroup$
4
  • 2
    $\begingroup$ Can you post an image of your footage?. I can't really undestand why the lens distrtion would not work without rotating. $\endgroup$
    – user1853
    Jul 18, 2015 at 4:24
  • $\begingroup$ It's not that it doesn't work, it's that it's hard to decide which K values are appropriate when comparing against a polyline which is already crooked to begin with. I can determine the correct rotation angle easily before the lens distortion since the fisheye effect is symmetric across the Y-axis of the image. It is not symmetric after applying K values. i.imgur.com/2bPE70b.png $\endgroup$ Jul 18, 2015 at 20:01
  • $\begingroup$ Find lines that should be straight (like the edges of the pool table imgur.com/S2TfErd,UgbORbn#0 ) and make a straight line with the grease pencil imgur.com/S2TfErd,UgbORbn#1 ). For extreme wide angle distortion use the Dividion model for lens distortion. to see how your image is distorted turn on the grid: imgur.com/IJGu4z4 see: blender.stackexchange.com/questions/15620/… $\endgroup$
    – user1853
    Jul 19, 2015 at 1:54
  • $\begingroup$ Besides using division instead of polynomial, that's what I was doing. Drawing a few polylines with the grease pencil, with some help from the grid. Unfortunately, using the trackers to rotate the video also rotates the grid. I was hoping to have the grid remain static while the video rotated underneath the grid so that I could determine the correct rotation angle. Either way, I gave up on blender and wound up using OpenShot to defisheye the video because I got stuck. Thank you for your help though. I'm marking your answer as correct. $\endgroup$ Jul 19, 2015 at 2:09

2 Answers 2

4
$\begingroup$

Though I don't think is necessary to rotate your image, here's how to do it:

Add two trackers on opposite ends of the frame that don't track anything in the footage, with a a weight of 0 (so they don't add anything to the camera solver) and use those to control the rotation.

On the Display tab enable Display Stabilization.

enter image description here

Enable 2D stabilization. Select both trackers and add them to the stabilization box.

Do not enable autoscale, enable Stabilize Rotation and select one of the trackers to control the rotation of the image.

enter image description here

You can rotate the image now by moving any of the trackers up or down.

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you for your help. I got all the way to moving the tracker up and down. My tracker doesn't wobble back and forth like yours does in the bottom image, the whole thing physically moves up and down with my mouse, and the image doesn't rotate. EDIT: I don't know what I did, but it rotates now. Unfortunately, the grid rotates along with it. I was hoping to be able to rotate the video underneath the grid. That way, I could keep the grid to use as perfectly vertical and horizontal reference lines. $\endgroup$ Jul 18, 2015 at 20:57
1
$\begingroup$

Blender 2.78 now has the ability to rotate videos in Movie Clip Editor in 2 steps.

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .