Rosanswers logo

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.

Originally posted by Athria on ROS Answers with karma: 78 on 2014-11-21

Post score: 2


1 Answer 1


Rosanswers logo

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!

Originally posted by Pedro_85 with karma: 182 on 2014-11-24

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Athria on 2014-11-26:
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!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.