calibrate kinnect v1 on ubuntu

本文介绍如何卸载Kinect传感器驱动,并通过ROS安装OpenNI相机和启动程序。此外,还详细说明了使用ROS进行Kinect RGB及深度摄像头的校准过程,包括所需参数的获取。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. remove libfreenect kinnectsensor driver

seamanj@seamanj-Blade:~/Software/SensorKinect/Platform/Linux/Redist/Sensor-Bin-Linux-x64-v5.1.2.1$ sudo ./install.sh -u
[sudo] password for seamanj: 
Uninstalling PrimeSense Sensor
******************************

unregistering module 'libXnDeviceSensorV2KM.so' from OpenNI...OK
unregistering module 'libXnDeviceFile.so' from OpenNI...OK
removing shared libraries...OK
removing executables...OK
removing config dir...OK
removing usb rules...OK
removing modprobe blacklist...OK

*** DONE ***

再次运行NiViewer确定驱动已卸载

seamanj@seamanj-Blade:~/Software/OpenNI/Platform/Linux/Bin/x64-Release$ ./NiViewer 
Open failed: Bad Parameter sent to the device!
Press any key to continue . . .
^C

 

 

download check image from:

http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration?action=AttachFile&do=view&target=check-108.pdf

 

2

sudo apt-get install ros-kinetic-openni-camera
sudo apt-get install ros-kinetic-openni-launch

https://answers.ros.org/question/207642/freenect_launch-with-kinect/

2.

roslaunch openni_launch openni.launch 

to open server

 

3. open another terminal

 

rosrun camera_calibration cameracalibrator.py image:=/camera/rgb/image_raw camera:=/camera/rgb --size 8x6 --square 0.108

click calibrate when it is enabled.

after a while

 

click save and commit.

('D = ', [0.25635013336442597, -0.2984876596963141, 0.0009734146169052192, -0.03244694037216558, 0.0])
('K = ', [553.5744369056831, 0.0, 302.6957080579083, 0.0, 550.0423080886541, 265.22392609849635, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [580.197998046875, 0.0, 284.542819663453, 0.0, 0.0, 597.4571533203125, 265.5130111590879, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters


[image]

width
640

height
480

[narrow_stereo]

camera matrix
553.574437 0.000000 302.695708
0.000000 550.042308 265.223926
0.000000 0.000000 1.000000

distortion
0.256350 -0.298488 0.000973 -0.032447 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
580.197998 0.000000 284.542820 0.000000
0.000000 597.457153 265.513011 0.000000
0.000000 0.000000 1.000000 0.000000


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

 

same process for  depth

rosrun camera_calibration cameracalibrator.py image:=/camera/ir/image_raw camera:=/camera/ir --size 8x6 --square 0.108

 

('D = ', [0.07461283337631101, -0.05140216584982599, -0.01283327736638255, -0.022223551078988033, 0.0])
('K = ', [616.9181589642653, 0.0, 282.06293869836986, 0.0, 618.6876986838676, 231.94223956859452, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [629.367919921875, 0.0, 270.8282119673022, 0.0, 0.0, 641.358642578125, 227.3242873304116, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters


[image]

width
640

height
480

[narrow_stereo]

camera matrix
616.918159 0.000000 282.062939
0.000000 618.687699 231.942240
0.000000 0.000000 1.000000

distortion
0.074613 -0.051402 -0.012833 -0.022224 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
629.367920 0.000000 270.828212 0.000000
0.000000 641.358643 227.324287 0.000000
0.000000 0.000000 1.000000 0.000000


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

 

 

reference:

http://wiki.ros.org/camera_calibration/Tutorials/MonocularCalibration

http://wiki.ros.org/openni_launch/Tutorials/IntrinsicCalibration

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值