raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.37k stars 4.69k forks source link

calibration stereo camera for orb-slam2 #225

Open KevenLee opened 7 years ago

KevenLee commented 7 years ago

I calibrate the stereo camera with opencv2.4.10, and the calibration parameters as following:

left camera intrinsic parameters

Camera.fx: 673.0278 Camera.fy: 673.0278 Camera.cx: 314.5365 Camera.cy: 230.8863

Camera.k1: 0.0 Camera.k2: 0.0 Camera.p1: 0.0 Camera.p2: 0.0

image resolution

Camera.width: 640 Camera.height: 480

Camera frames per second

Camera.fps: 10.0

the baseline in fact is 4cm, here camera.bf = camera.fx * 0.04

Camera.bf: 26.9211

Close/Far threshold. Baseline times.

ThDepth: 100

but the output trajectory is completely wrong. straight line to get the trajectory is not a straight line.

but when I modify the intrinsic parameters as following, I can get the approximate exact trajectory:

scale down focal length in the ratio of one to ten

Camera.fx: 67.30278 Camera.fy: 67.30278

Camera.cx: 314.5365 Camera.cy: 230.8863

Camera.k1: 0.0 Camera.k2: 0.0 Camera.p1: 0.0 Camera.p2: 0.0

Camera.width: 640 Camera.height: 480

Camera.fps: 10.0

the baseline in fact is 4cm, here camera.bf = camera.fx * 0.04

Camera.bf: 2.6

Close/Far threshold. Baseline times.

ThDepth: 100

only if I do not care about other parameters like cx,cy,bf, just scaling down fx and fy, I also get approximate true trajectory.

why this happen, can anyone help me.

thank you

KevenLee

M1234Thomas commented 7 years ago

@KevenLee : I am also facing the same issue. Did you find any solution?