Basic Question: Obtaining Camera Extrinsics

896 views
Skip to first unread message

joanac...@gmail.com

unread,
Jun 2, 2018, 5:48:31 PM6/2/18
to COLMAP
Hi,

I apologize for my basic question, but I am using Sfm for the first time to get camera calibration parameters and something is not right.
I was hoping that someone could help.
COLMAP does, what I think it is, a great job in reconstructing the scene and the position of the cameras are where they suppose to be.

However when I use the calibration parameters in opencv for point triangulation, I am getting a very large reprojection error.
I am wondering if I am calculating something wrong.
This is COLMAP output:

fx=879.544
fy=908.766
cx=959.03
cy=535.747
k1=-0.0859365
k2=0.245244
k3=-0.199789
k4=0.0703465
QW=-0.0963985
QX=-0.0165644
QY=0.960941
QZ=0.258893
TX=0.85698
TY=-2.57258
TZ=4.47233

Which results is the following extrinsic matrix:
[-0.98086638  0.01807897 -0.19384336 -0.15993675
 -0.08174862  0.86540007  0.49436823 -0.02872564
 0.17668973  0.50075536 -0.84736397  5.227613]

The last column of the matrix is given by: -R^t * T
Also, my distortion vector according to opencv format is: [-0.0859365 0.245244 0 0 -0.199789 0.0703465]

Is this correct?
Is it the case that the problem might be in the intrinsic parameters of the camera, which were estimated using the model + bundle adjustment?
Should I calibrate the cameras individually (to get the intrinsics) and then re-run the SfM?
(Note: the images were captured using gopro hero3 black and I used opencv_fisheye camera model for the reconstruction)

Thank you very much

Johannes Schönberger

unread,
Jun 14, 2018, 9:08:08 AM6/14/18
to COLMAP
If you use the Python script here to read the model (https://github.com/colmap/colmap/blob/dev/scripts/python/read_model.py), then you can get the projection center of the camera as ``np.dot(-image.qvec2rotmat().T, image.tvec)``
Reply all
Reply to author
Forward
0 new messages