Search code examples
graphicscomputer-visionhomography3d-reconstruction

Camera orientation(for volume carving) using Ground Plane Homography and Height


I am trying to implement 3D reconstruction technique used in this paper i.e. Volume Carving

I am using the terrace dataset which has videos from four different views. I have extracted foreground from these videos. For using volume carving now I need to know the relative positions of the cameras. I am facing difficulty in finding this. In the callibiration file I have been given 3*3 ground plane homography matrix and height of each camera.

Camera 0

Ground plane homography

-1.6688907435 -6.9502305710 940.69592392565

1.1984806153 -10.7495778320 868.29873467315

0.0004069210 -0.0209324057 0.42949125235

Head plane height in camera view 10.590278

Camera 1

Ground plane homography

0.6174778372 -0.4836875683 147.00510919005

0.5798503075 3.8204849039 -386.096405131

0.0000000001 0.0077222239 -0.01593391935

Head plane height in camera view 9.722222

Camera 2

Ground plane homography

-0.2717592338 1.0286363982 -17.6643219215

-0.1373600672 -0.3326731339 161.0109069274

0.0000600052 0.0030858398 -0.04195162855

Head plane height in camera view 6.423611

Camera 3

Ground plane homography

-0.3286861858 0.1142963200 130.25528281945

0.1809954834 -0.2059386455 125.0260427323

0.0000693641 0.0040168154 -0.08284534995

Head plane height in camera view 6.423611


Solution

  • I don't think you really need the relative camera poses (although you can easily compute them) from what you have. You only need the absolute pose of each camera w.r.t. the reference plane, as the plane defines the "world" coordinate system onto which you place the volume to carve. You can get the absolute poses by RQ-decomposing the homograpies.

    H = s * R * Q
    

    s is a scalar, R a right triangular matrix (the camera matrix) and Q is the orthonormal pose matrix. I assume the "head plane height" is there to give you the absolute scale.

    See the very old Szelisky and Kutulakos/Seitz paper on space carving:

    http://research-srv.microsoft.com/pubs/75650/Szeliski-CVGIPIU93.pdf http://www.cs.toronto.edu/~kyros/pubs/00.ijcv.carve.pdf