ros打开笔记本摄像头,单目标定
来源:互联网 发布:企业软件实施服务介绍 编辑:程序博客网 时间:2024/05/16 07:43
笔记本摄像头多是usb 镜头
下载包或者sudo apt-get install ros-indigo-usb-cam
git clone https://github.com/bosch-ros-pkg/usb_cam.git
打开驱动
rosrun usb_cam usb_cam_node
端口为/dev/video0, 如果你外接了usb摄像头,你应该把该端口改成video1,自行从/dev下验证
对应的话题
robot@ubuntu:/dev$ rostopic list/rosout/rosout_agg/usb_cam/camera_info/usb_cam/image_raw/usb_cam/image_raw/compressed/usb_cam/image_raw/compressed/parameter_descriptions/usb_cam/image_raw/compressed/parameter_updates/usb_cam/image_raw/compressedDepth/usb_cam/image_raw/compressedDepth/parameter_descriptions/usb_cam/image_raw/compressedDepth/parameter_updates/usb_cam/image_raw/theora/usb_cam/image_raw/theora/parameter_descriptions/usb_cam/image_raw/theora/parameter_updates
读取视频(重映射话题名)
rosrun image_view image_view image:=/usb_cam/image_raw
保存图片序列,jpg+ini
rosrun image_view image_saver image:=/usb_cam/image_raw
launch
<launch> <!-- Arguments --> <!-- Show video output (both RAW and rectified) --> <arg name="view" default="true"/> <!-- Camera driver --> <node pkg="usb_cam" type="usb_cam_node" name="camera"/> <!-- Show video output --> <group if="$(arg view)"> <!-- Image viewer (non-rectified image) --> <node pkg="image_view" type="image_view" name="image_raw"> <remap from="image" to="usb_cam/image_raw"/> </node> </group></launch>
打开rviz 来看看视频吧
add->image
设置image topic 即可
接下来摄像头的标定
ros提供了单目和双目的标定程序,使用张正友标定法。
http://wiki.ros.org/camera_calibration
下载camera_calibraiton 包
或者rosdep install camera_calibraion
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/usb_cam/image_raw camera:=/usb_cam
–size 表示所使用棋盘格内部的行列角点数量,
–square 表示单个方格的大小,单位m
标定程序使用方法:
为了得到一个好的标定结果,应该使得标定板尽量出现在摄像头视野的各个位置里:
如标定板出现在视野中的左边,右边,上边和下边,标定板既有倾斜的,也有水平的,。
界面中的x:表示标定板在视野中的左右位置。
y:表示标定板在视野中的上下位置。
size:标定板在占视野的尺寸大小,也可以理解为标定板离摄像头的远近。
skew:标定板在视野中的倾斜位置。
并还要有棋盘占住大部分视野的图片,直到calibrate点亮
点击 commit 保存标定结果,保存在~/.ros/camera_info/hea_camera.yaml
camera_calibration_parsers创建yaml参数文件
$ rosrun camera_calibration_parsers convert in-file out-file
http://blog.csdn.net/ArtistA/article/details/51125560?locationNum=15&fps=1
参数含义:
image_width、image_height代表图片的长宽
camera_name为摄像头名
camera_matrix规定了摄像头的内部参数矩阵
distortion_model指定了畸变模型
distortion_coefficients指定畸变模型的系数
rectification_matrix为矫正矩阵,一般为单位阵
projection_matrix为外部世界坐标到像平面的投影矩阵
- ros打开笔记本摄像头,单目标定
- ros 下面使用单目标定工具箱来进行标定摄像头.
- ROS打开USB摄像头
- OpenCV单目标定
- 单目标定程序
- 在ROS环境下对笔记本自带的摄像头(单目)进行标定
- 打开笔记本摄像头保存视频文件
- labview程序打开笔记本摄像头
- 使用opencv打开笔记本摄像头
- OpenCV C++ 打开笔记本摄像头出现错误
- ORB SLAM2 ROS实例 单目摄像头
- 计算机双目视觉----摄像机单目标定
- 打开自己笔记本摄像头小程序之对比
- 关于opencv无法打开win7笔记本摄像头问题
- opencv 打开笔记本摄像头 win7+VS2013 +opencv2.4.11
- ORBSLAM2初步探究-笔记本摄像头测试单目
- 复习在ROS机器人系统中打开摄像头,显示图像
- ORB SLAM2 ROS单目摄像头环境搭建
- 最大公因数
- 总结(12.11-12.21)
- Java swing实现的俄罗斯方块小游戏源码
- 删除工程中的.svn文件
- 手机连接设备的蓝牙向其发送子服务器局域网IP信息,从而esp8266与该服务器建立tcp连接
- ros打开笔记本摄像头,单目标定
- iOS开发网络篇 一一 NSURLSessionDownloadTask实现文件下载
- Date对象中追加format方法
- 在UBUNTU上开发MYSQL
- C语言操作符
- Android中多条目加载
- NAT ALG原理与应用
- centos7编译安装git
- 腾讯火力全开“吃鸡”:下一个游戏行业风口怎能错过?