To do this, I found point correspondences between the two images, and set up a model of the two cameras looking at these points. The camera parameters and point positions were then optimised to minimise the reprojection error (the distance between the real positions of the points in the images and the 3D position projected through the camera models).
This was implemented using ceres, which is worth a look if you're interested in this kind of thing.
It took quite a bit of fiddling to make this work, mostly estimating the camera parameters manually by hunting around google maps for landmarks. There's not very much data to work with, so the optimisation tends to get lost quite easily without doing this.
The results are kind of similar, but it's impossible to say which is closer to the real thing. The reprojection error ended up pretty small (mostly a few pixels), but there were some errors that I was unable to reconcile --- likely due to the difficulty of manually estimating point correspondences for a 3D line in space, possible errors in my constraints, lens distortion etc.
Question...I was always told that lightning seeks the highest point on the ground. If that’s the case, this path doesn’t seem to be very efficient in getting there.
> This means the pair of images are roughly a stereo pair, but with a vertical shift instead of a horizontal. This is just like the pair of images you would see with your eyes if you had two eyes positioned vertically instead of horizontally on your head.
OK, so why can't you just rotate both images 90 deg, and view them as a stereo pair?
Like with stereoscopic glasses? People seeing the stereoscopic effect relies on the displacement between the photos being equal to the distance between human eyes.
It works with other distances, the perception of depth just scales accordingly. If you view a pair of images taken with a very wide distance, the depth will look small, and the scene will look like a model.
When I first saw this, I re-did the 3D reconstruction as a bundle-adjustment problem, which resulted in this model:
http://misc.tomn.co.uk/lightning/out.gif
To do this, I found point correspondences between the two images, and set up a model of the two cameras looking at these points. The camera parameters and point positions were then optimised to minimise the reprojection error (the distance between the real positions of the points in the images and the 3D position projected through the camera models).
This was implemented using ceres, which is worth a look if you're interested in this kind of thing.
It took quite a bit of fiddling to make this work, mostly estimating the camera parameters manually by hunting around google maps for landmarks. There's not very much data to work with, so the optimisation tends to get lost quite easily without doing this.
The results are kind of similar, but it's impossible to say which is closer to the real thing. The reprojection error ended up pretty small (mostly a few pixels), but there were some errors that I was unable to reconcile --- likely due to the difficulty of manually estimating point correspondences for a 3D line in space, possible errors in my constraints, lens distortion etc.