1
votes

With reference to the paper I am trying to calculate the orientation of the camera with respect to a test pattern. The test pattern looks like

this when the camera is viewing it perpendicular to the test pattern plain. When viewed from an unknown orientation the test pattern looks like

this fitted with an ellipse.

I am able to calculate the angle around x (alpha) and y (beta) axis. Now i need to deskew the test pattern to get the rotation angle about z (gamma) axis (optical axis of camera) . This is to be done by rotating the test pattern image around x and y by the negative values of alpha and beta. So how to get the homography matrix only for rotation. I have gone through virtual camera rotation and the wiki link. The virtual camera rotation code produces good result but is dependent on distance of the camera from the test pattern which in my case is unknown. I tried cv::warpPerspective by passing only the rotation matrix but results were weird.

1
Amazing how these guys can publish in 2008 a paper about an unreliable/imprecise calibration technique that was already well known in 1998!!!Francesco Callari

1 Answers

1
votes

Since your pattern lacks features breaking its symmetry, the problem can obviously be solved only up to rotations by multiple of 90 degrees and symmetries about the pattern's axes and about its center.

With this caveat, you can do a straight forward homography estimation using the DLT algorithm, using the pattern's center and the 4 intersections between the axes and the boundary. You can arbitrarily assign these image points to points r*(0, 0), r*(1, 0), r*(0, 1), r*(-1, 0), r*(0, -1) of your pattern respectively, with r being its radius length.

Once you have estimated the homography matrix H, you can just decompose it in the product R*Q of a right-triangular matrix R and your required roto-translation matrix Q. See Zhang's paper on camera calibration for the details.