Ask Your Question

Camera calibration parameters not appropriate for SVO package

asked 2014-11-21 08:36:31 -0500

Athria gravatar image

Hello, I have been trying to use the SVO package using Ubuntu 12.04 and ROS Hydro, but I ran into trouble with the calibration file. In the SVO calibration guidelines says that the camera_calibration package can be used to obtain a calibration file that works with SVO, but the format of the calibration file expected by the SVO looks like this:

cam_model: Pinhole cam_width: 752

cam_height: 480 cam_fx: 414.536145

cam_fy: 414.284429 cam_cx: 348.804988

cam_cy: 240.076451 cam_d0: -0.283076

cam_d1: 0.066674 cam_d2: 0.000896

cam_d3: 0.000778

And the one obtained with the camera_calibration, after convertir to yaml using the camera_calibration_parsers looks like this:

image_width: 1024 image_height: 768 camera_name: narrow_stereo camera_matrix: rows: 3 cols: 3
data: [1114.338842, 0, 488.044082, 0, 1483.616573, 384.580052, 0, 0, 1] distortion_model: plumb_bob distortion_coefficients: rows: 1
cols: 5 data: [0.089323, -0.327338, -0.003856, -0.002099, 0] rectification_matrix: rows: 3
cols: 3 data: [1, 0, 0, 0, 1, 0, 0, 0, 1] projection_matrix: rows: 3
cols: 4 data: [1117.866699, 0, 485.532623, 0, 0, 1492.567993, 382.458084, 0, 0, 0, 1, 0]

I do not see how to make SVO work with the calibration file I'm getting and I have also not found a way to convert said file to the format that works.

I found another forum question where a person with my same problem got to the conclusion that the camera_calibration file didn't work with SVO and that the ATAN format file from ethzasl_ptam had to be used instead. But when I try to implement the ptam package I get a missing header error that I haven't been able to solve either (it's this error, but the solutions found in that thread haven't worked for me neither in Hydro nor in Groovy). Which is why I need to make the camera_calibration file work.

Thank you very much in advance for any ideas or suggestions.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-24 14:00:51 -0500

Pedro_85 gravatar image

updated 2014-11-24 14:01:16 -0500

As you can see in OpenCV Camera Calibration your file will end up being:

cam_model: Pinhole
cam_width: 1024
cam_height: 768
cam_fx: 1114.338842
cam_fy: 1483.616573
cam_cx: 488.044082
cam_cy: 384.580052
cam_d0: 0.089323
cam_d1: -0.327338
cam_d2: -0.003856
cam_d3: -0.002099

The values of fx, fy, cx, and cy are located in the 3x3 camera_matrix and the d0, d1, d2, and d3 in the 1x5 distortion_coefficients array.

Modify your camera parameters file manually and see if this works.

Good luck!

edit flag offensive delete link more


Thank you very much! It never occurred to me that I already had all the information I needed for the file, I should have read the documentation better.

Thank you!

Athria gravatar image Athria  ( 2014-11-26 11:49:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-11-21 08:36:31 -0500

Seen: 2,171 times

Last updated: Nov 24 '14