Search code examples
computer-visiontransformationhomographyprojective-geometry

Compute homography given rotation and translation between two cameras


I know that one can compute the homography matrix by using at least four correpondence points.

I was wondering if and how can I obtain a homography matrix if I already know the rotation and translation between two cameras, including the camera intrinsics?

I found something that looked like this

H= KRK^-1

but this assumes a pure rotation. What would be the case for a pure translation? And what if I want to warp an image with the homography matrix that is not from points purely on a plane?

I'm somewhat confused right now and would really really appreciate any explanations! Thank you in advance!


Solution

  • If there is a nonzero translation, and the image contains more than a plane (or you are not looking at very far away things) then the images are not related by a homography. You can convince yourself that this is the case by noticing that some points visible in one image may be occluded in the other one.

    If the image shows a plane among other things, and you estimate a homography using only point correspondences on that plane, than the homography will correctly transform all points on that plane, but will map incorrectly all other points.