当前位置: 首页 > news >正文

重庆平台网站建设费用网页设计作业源码

重庆平台网站建设费用,网页设计作业源码,建设网站需要哪些,网站建设介绍会发言稿目录 准备 准备标定板 新建容器 新建usb_cam话题的ROS功能包 编写代码 编译 运行功能包 标定 安装camera_calibration标定功能包 启动发布usb_cam话题的功能包 启动camera_calibration标定功能包 准备 usb相机 标定板 一个带有ROS的docker镜像。 准备标定板 图… 目录 准备 准备标定板 新建容器 新建usb_cam话题的ROS功能包 编写代码 编译 运行功能包 标定 安装camera_calibration标定功能包 启动发布usb_cam话题的功能包 启动camera_calibration标定功能包 准备 usb相机 标定板 一个带有ROS的docker镜像。 准备标定板 图片链接 棋盘格图片 打印粘贴。或者可以使用手机平板等屏幕展示这张棋盘照片测量棋盘小格尺寸并保证标定过程中图片不被缩放。 新建容器 使用--privileged参数建立镜像。基础的代码 sudo docker run -it --privileged --namelab1 your_image_name /bin/bash 修改 your_image_name为你的docker镜像名。--privileged参数使容器与宿主机共用device设备有相同的/dev文件。但是在进入容器之前先连接相机再进入容器防止进入容器后刷新不出相机。 docker run的其他参数根据需要自行设置。 连接相机 进入容器 新建usb_cam话题的ROS功能包 新建ROS功能包用来发布usb_cam的话题。 编写代码 使用C语言编写示例如下 新建功能包而后写入核心代码 img_publisher.cpp文件 #include ros/ros.h #include image_transport/image_transport.h #include opencv2/highgui.hpp #include opencv2/calib3d.hpp #include cv_bridge/cv_bridge.h #include iostreamint main(int argc, char** argv) {ros::init(argc, argv, img_publisher);ros::NodeHandle nh;image_transport::ImageTransport it(nh);image_transport::Publisher pub it.advertise(camera/image, 1);cv::VideoCapture cap;cv::Mat frame;int deviceID 0;if (argc 1)deviceID argv[1][0] - 0;int apiID cv::CAP_ANY;cap.open(deviceID apiID);if (!cap.isOpened()) {std::cerr ERROR! Unable to open camera std::endl;return -1;}ros::Rate loop_rate(30);while (nh.ok()) {cap.read(frame);if (!frame.empty()) {sensor_msgs::ImagePtr msg cv_bridge::CvImage(std_msgs::Header(), bgr8, frame).toImageMsg();pub.publish(msg);}ros::spinOnce();loop_rate.sleep();}return 0; } CMakeLists.txt文件 cmake_minimum_required(VERSION 3.0.2) project(usb_cam)## Compile as C11, supported in ROS Kinetic and newer # add_compile_options(-stdc11)## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTScv_bridgeimage_transportroscppsensor_msgsstd_msgs ) find_package(OpenCV REQUIRED) message(${OpenCV_VERSION})################################### ## catkin specific configuration ## ################################### ## The catkin_package macro generates cmake config files for your package ## Declare things to be passed to dependent projects ## INCLUDE_DIRS: uncomment this if your package contains header files ## LIBRARIES: libraries you create in this project that dependent projects also need ## CATKIN_DEPENDS: catkin_packages dependent projects also need ## DEPENDS: system dependencies of this project that dependent projects also need catkin_package( # INCLUDE_DIRS include # LIBRARIES usb_cam # CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs # DEPENDS system_lib )########### ## Build ## ############# Specify additional locations of header files ## Your package locations should be listed before other locations include_directories( # include${catkin_INCLUDE_DIRS}${OpenCV_INCLUDE_DIRS} )add_executable(img_publisher src/img_publisher.cpp) add_executable(img_viewer src/img_viewer.cpp)target_link_libraries(img_publisher ${catkin_LIBRARIES} ${OpenCV_LIBS}) target_link_libraries(img_viewer ${catkin_LIBRARIES} ${OpenCV_LIBS}) 编译 打开终端 catkin_make 在~/.bashrc加入环境变量。 打开终端 gedit ~/.bashrc 文末写入 source ~/catkin_ws/devel/setup.bash保存文件关闭。 运行功能包 打开终端 rosrun usb_cam img_publisher 会发布一个话题 查看话题 rostopic list正常接入相机功能包才正常运行此时会出现包括/camera/image话题等一系列话题。 标定 安装camera_calibration标定功能包 查看ROS的功能包 rospack list 查看是否有“camera_calibration”功能包没有则需要安装 rosdep install camera_calibration 启动发布usb_cam话题的功能包 打开终端 rosrun usb_cam img_publisher 查看话题  rostopic list正常接入相机功能包才正常运行此时会出现包括/camera/image话题等一系列话题。  启动camera_calibration标定功能包 打开终端 rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.20 image:/camera/image 其中 --size 8x6是棋盘交点的数量9*7的格子就会有8*6个交点 --square 0.20是一个小棋盘格大小单位米。 image:/camera/imageimage:相机话题名。 正常启动后弹出标定窗口间断地调整相机位置直到右侧calibrate按钮亮起 Moving the Checkerboard In order to get a good calibration you will need to move the checkerboard around in the camera frame such that:     checkerboard on the cameras left, right, top and bottom of field of view         X bar - left/right in field of view         Y bar - top/bottom in field of view         Size bar - toward/away and tilt from the camera     checkerboard filling the whole field of view     checkerboard tilted to the left, right, top and bottom (Skew) At each step, hold the checkerboard still until the image is highlighted in the calibration window. 移动棋盘 为了获得良好的校准您需要在相机框架中移动棋盘以便 相机视野左、右、上、下的棋盘 X条-视野中的左/右 Y条-视野中的顶部/底部 尺寸条-朝向/远离相机并倾斜 棋盘填充整个视野 向左、右、上、下倾斜的棋盘倾斜 在每一步中保持棋盘静止直到图像在校准窗口中高亮显示。 点击开始计算。计算结束后save按钮亮起结果点save按钮保存 If you are satisfied with the calibration, click COMMIT to send the calibration parameters to the camera for permanent storage. The GUI exits and you should see writing calibration data to ... in the console. 如果您对校准感到满意请单击COMMIT将校准参数发送到相机以进行永久存储。GUI退出您应该在控制台中看到“正在将校准数据写入…”。 参考 标定过程及参数 相机内参标定究竟标了什么相机内参外参保姆级教程 - 知乎 camera_calibration标定功能包介绍 camera_calibration/Tutorials/MonocularCalibration - ROS Wiki
http://www.hkea.cn/news/14521981/

相关文章:

  • 重庆营销型网站制作营销型网站建设思路
  • 网站有哪些类型和它的成功案例wordpress改地址错误
  • 松江做移动网站设计400大看免费行情的软件
  • 网站后台根据前端做吗wordpress 评论表情
  • 网站建设外文参考文献潜江哪里做网站
  • 成都网站建设v芯ee8888e招商网站的建设意义
  • 做网站的什么公司最好小程序平台登陆
  • 高新区网站建设 意义网络规划设计师教材
  • 做视频卖给视频网站wordpress后台ftp
  • 直播网站开发计划书软文案例500字
  • 网站添加百度统计代码吗响应式网站解决方案
  • wordpress分享视频网站住房城乡住房和城乡建设部网站
  • 电影网站建设推广网站建设可视化工具
  • 校园网站建设可行性分析大数据抓取客户软件
  • 社交网站做强徐州网站建设方案开发
  • 政务公开网站建设管理现在装宽带多少钱
  • 阿里云网站备案入口蓝天使网站建设推广
  • 做平面vi网站网站建设自助搭配系统
  • 营销策划方案ppt模板东莞债务优化
  • 网站建设功能需求表微信网站建设报价
  • asp网站建设教程网站建设的相关技术
  • iis7部署asp网站微信公众上传wordpress
  • 建立网站步骤wordpress精简版下载地址
  • 用什么软件可以做网站动态wordpress 一键置顶
  • 凡科做的网站可以在百度搜到吗有没有免费代理项目
  • 新站如何提升网站权重网站开发的技术解决方案
  • 许昌做网站公司济南全网推广设计开发
  • 做视频网站流量费高吗域名是建网站之前申请吗
  • 自贡 网站建设wordpress案例站点
  • 购物网站开发背景及意义网站优化意见