title: Fundamental matrix from transformation
body: <p>I have two images with known corresponding 2D points, the intrinsic parameters of the cameras and the 3D transformation between the cameras. I want to calculate the 2D reprojection error from one image to the other.</p>
  
  <p>To do so, I thought about getting a fundamental matrix from the transformation, so I can compute the point-to-line distance between the points and the corresponding epipolar lines. How can I get the fundamental matrix?</p>
  
  <p>I know that <code>E = R * [t]</code> and <code>F = K^(-t) * E * K^(-1)</code>, where <code>E</code> is the essential matrix and <code>[t]</code> is the skew-symmetric matrix of the translation vector. However, this returns a null matrix if the motion is pure rotation (<code>t = [0 0 0]</code>). I know that in this case a homography explains the motion better than the fundamental matrix, so that I can compare the norm of the translation vector with a small threshold to choose a fundamental matrix or a homogaphy. Is there a better way of doing this?</p>