0

Camera calibration in Opencv provides a 3x3 camera matrix, distortion coefficients, and more than one rotation and translation vectors. One can convert the rotation and translation vector into matrix. The question is how to get one translation and rotation vector from more than one rotation and translation vectors. Or one should take simply the average rotation and translation vector?

Kainth
  • 1
  • 1

1 Answers1

0

The rotations and translations you get back are the poses of the calibration target in the images you used to calibrate. They define the coordinate transform matrices (Ri, t) such that, given a point 3D point P whose coordinates are expressed in the frame of the target at image i, then the coordinates Pc of the same point in camera frame are Pc = Ri * P + t.

So the answer is: pick one of them as defining your world coordinate frame.

Francesco Callari
  • 11,300
  • 2
  • 25
  • 40
  • The transformation from image to world coordinates using the projection matrix (obtained from Rotation and Translation matrix) does not give even good results. The size of the square is given 28 mm (one side of the square, printed on paper) in the xml file provided with the opencv camera Calibration code. Please guide. – Kainth Feb 23 '18 at 07:30
  • Please guide if I should use other than opencv to get accurate results – Kainth Feb 23 '18 at 08:23
  • Hard to give any advice without more details on what exactly you are doing. All I can say is that the OpenCV code works quite well, provided you give it good inputs. See this other answer of mine for some advice on procedure: https://stackoverflow.com/a/12821056/1435240 (and please upvote if you find this and/or that answer useful) – Francesco Callari Feb 23 '18 at 17:41
  • Thanks for the answers. Last set of questions. – Kainth Feb 23 '18 at 18:00
  • Q.1: I want to confirm that in the given XML file (where the size of square is asked / required along with other data like board size, input delay, etc) need to give only length of one side rather than giving 4 x one side length. Q.2: I was using online camera streaming for calibration. The camera is mounted in a overhead setting, looking straight down on work-space as it is in most of the experimental Labs. I am rotating and translating the chessboard pattern flat on the surface without doing any tilt of the pattern (i.e. no variation in the z). – Kainth Feb 23 '18 at 18:09