4
votes

I'm using OpenCV to calibrate a stereo camera pair. I've taken various calibration photos and I have a satisfactory fit for the intrinsic parameters using cv2.calibrateCamera. However, it's not clear how to get the extrinsic parameters out.

The function just returns the cameraMatrix, which while useful is only half the story, as it were. I'd like to be able to obtain the rotation/translation shown in the top of the documentation - i.e. a vector from the world origin to the camera perspective centre and a rotation.

I'm guessing cv2.solvePnP is something like what I need, but it's unclear exactly what R/T are - are they [R|t] in the projection formula or something else?

I realise that it's also possible to use cv2.stereoCalibrate, but I don't see why it's necessary to have two cameras. In principle the projection matrix is obtainable for each camera individually.

1
R and T are 3x1 vectors describing the rotation and translation of your camera - Hammer
Yep thanks, realised I asked a rather daft question here. - Josh
it happens to everyone. If that is all you needed I will just put it as an answer - Hammer
Well, it occurred to me that for a single camera asking what the translation/rotation is doesn't make much sense - may as well define the coordinates centred on the camera. - Josh

1 Answers

2
votes

R and T are 3x1 vectors describing the rotation and translation of your camera