Homography from Bundle Adjustment

asked 2014-10-07 13:48:21 -0500

manatttta gravatar image

updated 2014-10-07 14:11:54 -0500

Hi, I have a set of aerial images and I run them through Bundler (SfM) which gives me the rotation and translation matrices of all cameras relative to a random coordinate system.

I want to take two of those images, img0 and img1. The first one I assume is aligned with a reference frame and therefore H0 = eye(3). I want to compute H1, the Homography from img1 to img0 so that I can stitch them into a photo-mosaic,

warpPerspective(img1, img1_warped, H1)

I think this H1 should be given by

H1 = K1*R1*(Mat::eye(3, 3, CV_32F) + ((t1 - t0)*n.t() / t0.at<float>(2)))*R0.t()*K0.inv()

This is not working. The formula might be wrong or I am not correctly interpreting the data output from bundler. What am I missing?

edit retag flag offensive close merge delete