双目相机标定

双目相机标定

标定板下载

#安装标定软件
sudo apt install ros-kinetic-camera-calibration

#查看话题
rostopic list
#运行/改成自己的话题
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.025 right:=/mynteye/right/image_color left:=/mynteye/left/image_color right_camera:=/mynteye/right left_camera:=/mynteye/left  --approximate=0.1

若不能打开窗口,运行以下语句(加上–no-service-check):

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.025 right:=/mynteye/right/image_color left:=/mynteye/left/image_color right_camera:=/mynteye/right left_camera:=/mynteye/left --no-service-check --approximate=0.1

接下来就是慢慢移动标定板,确保图像清晰一点,直到“X”, “Y”, “Size”, “Skew” 底下的长条都变绿了,就可以点击“CALIBRATE”了。

然后就可以点“SAVE”了, 会在这个路径下生成一个yaml文件: ~/.ros/camera_info

所用到的图片SAVE之后会保存到这里: /tmp/calibrationdata.tar.gz

然后点击 “COMMIT”。

最后重启一次launch文件,就可以自动加载

Left:
('D = ', [0.22900305905164284, 0.1996695880377751, 0.06055069112109537, -0.028099179412161314, 0.0])
('K = ', [959.6007440012269, 0.0, 547.575253994228, 0.0, 959.6099160071514, 456.84207687923515, 0.0, 0.0, 1.0])
('R = ', [0.9906135330337045, -0.023940285797326565, 0.13457968229426104, 0.0197066651932521, 0.9992708194734359, 0.03270285455199579, -0.13526446509502404, -0.029743773547252685, 0.990362980132904])
('P = ', [1217.41632962326, 0.0, 396.5917663574219, 0.0, 0.0, 1217.41632962326, 434.37548828125, 0.0, 0.0, 0.0, 1.0, 0.0])

Right:
('D = ', [0.284574043090791, -0.05058030485677456, 0.01980506554411534, -0.08837470956577144, 0.0])
('K = ', [952.1003791639667, 0.0, 459.8576487393621, 0.0, 918.7369653436833, 396.07269999508276, 0.0, 0.0, 1.0])
('R = ', [0.99997897440505, -0.006085945583433268, 0.002238752817937381, 0.006153030552086344, 0.999491404434999, -0.03129013703355099, -0.0020471841268986796, 0.03130325425429112, 0.9995078365426866])
('P = ', [1217.41632962326, 0.0, 396.5917663574219, -180.26650675207264, 0.0, 1217.41632962326, 434.37548828125, 0.0, 0.0, 0.0, 1.0, 0.0])
('self.T ', [-0.1480699019351108, 0.0009011643132372325, -0.0003314988801701715])
('self.R ', [0.9909908717736964, -0.017730347575466238, 0.13275061896677656, 0.009433604472037931, 0.9979772171371993, 0.06286876157326753, -0.13359677828403752, -0.06105005200607426, 0.9891535735072594])
None

# oST version 5.0 parameters

[image]

width
1280

height
720

[narrow_stereo/left]

camera matrix
959.600744 0.000000 547.575254
0.000000 959.609916 456.842077
0.000000 0.000000 1.000000

distortion
0.229003 0.199670 0.060551 -0.028099 0.000000

rectification
0.990614 -0.023940 0.134580
0.019707 0.999271 0.032703
-0.135264 -0.029744 0.990363

projection
1217.416330 0.000000 396.591766 0.000000
0.000000 1217.416330 434.375488 0.000000
0.000000 0.000000 1.000000 0.000000

# oST version 5.0 parameters

[image]

width
1280

height
720

[narrow_stereo/right]

camera matrix
952.100379 0.000000 459.857649
0.000000 918.736965 396.072700
0.000000 0.000000 1.000000

distortion
0.284574 -0.050580 0.019805 -0.088375 0.000000

rectification
0.999979 -0.006086 0.002239
0.006153 0.999491 -0.031290
-0.002047 0.031303 0.999508

projection
1217.416330 0.000000 396.591766 -180.266507
0.000000 1217.416330 434.375488 0.000000
0.000000 0.000000 1.000000 0.000000

('Wrote calibration data to', '/tmp/calibrationdata.tar.gz')

参考:
内参、外参、畸变参数三种参数与相机的标定方法与相机坐标系的理解
http://wiki.ros.org/camera_calibration/Tutorials/StereoCalibration

你可能感兴趣的:(linux,计算机视觉,SLAM)