做移动网站优化网站建设过程中要怎么打开速度

news/2025/9/25 16:37:52/文章来源:
做移动网站优化,网站建设过程中要怎么打开速度,网站空间ftp连接失败,长沙建设信息中心网站这次我们将学着怎么从一个深度图里面导出边界。我们对3种不同种类的点很感兴趣:物体的边框的点#xff0c;阴影边框点#xff0c;和面纱点(在障碍物边界和阴影边界)#xff0c;这是一个很典型的现象在通过雷达获取的3D深度。 下面是代码 /* \author Bastian Steder */#incl…这次我们将学着怎么从一个深度图里面导出边界。我们对3种不同种类的点很感兴趣:物体的边框的点阴影边框点和面纱点(在障碍物边界和阴影边界)这是一个很典型的现象在通过雷达获取的3D深度。 下面是代码 /* \author Bastian Steder */ #include iostream #include boost/thread/thread.hpp #include pcl/range_image/range_image.h #include pcl/io/pcd_io.h #include pcl/visualization/range_image_visualizer.h #include pcl/visualization/pcl_visualizer.h #include pcl/features/range_image_border_extractor.h #include pcl/console/parse.h typedef pcl::PointXYZ PointType; // -------------------- // -----Parameters----- // -------------------- float angular_resolution 0.5f; pcl::RangeImage::CoordinateFrame coordinate_frame pcl::RangeImage::CAMERA_FRAME; bool setUnseenToMaxRange false; // -------------- // -----Help----- // -------------- void printUsage (const char* progName) { std::cout \n\nUsage: progName [options] scene.pcd\n\n Options:\n -------------------------------------------\n -r float angular resolution in degrees (default angular_resolution)\n -c int coordinate frame (default (int)coordinate_frame)\n -m Treat all unseen points to max range\n -h this help\n \n\n; } // -------------- // -----Main----- // -------------- int main (int argc, char** argv) { // -------------------------------------- // -----Parse Command Line Arguments----- // -------------------------------------- if (pcl::console::find_argument (argc, argv, -h) 0) { printUsage (argv[0]); return 0; } if (pcl::console::find_argument (argc, argv, -m) 0) { setUnseenToMaxRange true; cout Setting unseen values in range image to maximum range readings.\n; } int tmp_coordinate_frame; if (pcl::console::parse (argc, argv, -c, tmp_coordinate_frame) 0) { coordinate_frame pcl::RangeImage::CoordinateFrame (tmp_coordinate_frame); cout Using coordinate frame (int)coordinate_frame.\n; } if (pcl::console::parse (argc, argv, -r, angular_resolution) 0) cout Setting angular resolution to angular_resolutiondeg.\n; angular_resolution pcl::deg2rad (angular_resolution); // ------------------------------------------------------------------ // -----Read pcd file or create example point cloud if not given----- // ------------------------------------------------------------------ pcl::PointCloudPointType::Ptr point_cloud_ptr (new pcl::PointCloudPointType); pcl::PointCloudPointType point_cloud *point_cloud_ptr; pcl::PointCloudpcl::PointWithViewpoint far_ranges; Eigen::Affine3f scene_sensor_pose (Eigen::Affine3f::Identity ()); std::vectorint pcd_filename_indices pcl::console::parse_file_extension_argument (argc, argv, pcd); if (!pcd_filename_indices.empty ()) { std::string filename argv[pcd_filename_indices[0]]; if (pcl::io::loadPCDFile (filename, point_cloud) -1) { cout Was not able to open file \filename\.\n; printUsage (argv[0]); return 0; } scene_sensor_pose Eigen::Affine3f (Eigen::Translation3f (point_cloud.sensor_origin_[0], point_cloud.sensor_origin_[1], point_cloud.sensor_origin_[2])) * Eigen::Affine3f (point_cloud.sensor_orientation_); std::string far_ranges_filename pcl::getFilenameWithoutExtension (filename)_far_ranges.pcd; if (pcl::io::loadPCDFile(far_ranges_filename.c_str(), far_ranges) -1) std::cout Far ranges file \far_ranges_filename\ does not exists.\n; } else { cout \nNo *.pcd file given Genarating example point cloud.\n\n; for (float x-0.5f; x0.5f; x0.01f) { for (float y-0.5f; y0.5f; y0.01f) { PointType point; point.x x; point.y y; point.z 2.0f - y; point_cloud.points.push_back (point); } } point_cloud.width (int) point_cloud.points.size (); point_cloud.height 1; } // ----------------------------------------------- // -----Create RangeImage from the PointCloud----- // ----------------------------------------------- float noise_level 0.0; float min_range 0.0f; int border_size 1; boost::shared_ptrpcl::RangeImage range_image_ptr (new pcl::RangeImage); pcl::RangeImage range_image *range_image_ptr; range_image.createFromPointCloud (point_cloud, angular_resolution, pcl::deg2rad (360.0f), pcl::deg2rad (180.0f), scene_sensor_pose, coordinate_frame, noise_level, min_range, border_size); range_image.integrateFarRanges (far_ranges); if (setUnseenToMaxRange) range_image.setUnseenToMaxRange (); // -------------------------------------------- // -----Open 3D viewer and add point cloud----- // -------------------------------------------- pcl::visualization::PCLVisualizer viewer (3D Viewer); viewer.setBackgroundColor (1, 1, 1); viewer.addCoordinateSystem (1.0f, global); pcl::visualization::PointCloudColorHandlerCustomPointType point_cloud_color_handler (point_cloud_ptr, 0, 0, 0); viewer.addPointCloud (point_cloud_ptr, point_cloud_color_handler, original point cloud); //PointCloudColorHandlerCustompcl::PointWithRange range_image_color_handler (range_image_ptr, 150, 150, 150); //viewer.addPointCloud (range_image_ptr, range_image_color_handler, range image); //viewer.setPointCloudRenderingProperties (PCL_VISUALIZER_POINT_SIZE, 2, range image); // ------------------------- // -----Extract borders----- // ------------------------- pcl::RangeImageBorderExtractor border_extractor (range_image); pcl::PointCloudpcl::BorderDescription border_descriptions; border_extractor.compute (border_descriptions); // ---------------------------------- // -----Show points in 3D viewer----- // ---------------------------------- pcl::PointCloudpcl::PointWithRange::Ptr border_points_ptr(new pcl::PointCloudpcl::PointWithRange), veil_points_ptr(new pcl::PointCloudpcl::PointWithRange), shadow_points_ptr(new pcl::PointCloudpcl::PointWithRange); pcl::PointCloudpcl::PointWithRange border_points *border_points_ptr, veil_points * veil_points_ptr, shadow_points *shadow_points_ptr; for (int y0; y (int)range_image.height; y) { for (int x0; x (int)range_image.width; x) { if (border_descriptions.points[y*range_image.width x].traits[pcl::BORDER_TRAIT__OBSTACLE_BORDER]) border_points.points.push_back (range_image.points[y*range_image.width x]); if (border_descriptions.points[y*range_image.width x].traits[pcl::BORDER_TRAIT__VEIL_POINT]) veil_points.points.push_back (range_image.points[y*range_image.width x]); if (border_descriptions.points[y*range_image.width x].traits[pcl::BORDER_TRAIT__SHADOW_BORDER]) shadow_points.points.push_back (range_image.points[y*range_image.width x]); } } pcl::visualization::PointCloudColorHandlerCustompcl::PointWithRange border_points_color_handler (border_points_ptr, 0, 255, 0); viewer.addPointCloudpcl::PointWithRange (border_points_ptr, border_points_color_handler, border points); viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 7, border points); pcl::visualization::PointCloudColorHandlerCustompcl::PointWithRange veil_points_color_handler (veil_points_ptr, 255, 0, 0); viewer.addPointCloudpcl::PointWithRange (veil_points_ptr, veil_points_color_handler, veil points); viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 7, veil points); pcl::visualization::PointCloudColorHandlerCustompcl::PointWithRange shadow_points_color_handler (shadow_points_ptr, 0, 255, 255); viewer.addPointCloudpcl::PointWithRange (shadow_points_ptr, shadow_points_color_handler, shadow points); viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 7, shadow points); //------------------------------------- // -----Show points on range image----- // ------------------------------------ pcl::visualization::RangeImageVisualizer* range_image_borders_widget NULL; range_image_borders_widget pcl::visualization::RangeImageVisualizer::getRangeImageBordersWidget (range_image, -std::numeric_limitsfloat::infinity (), std::numeric_limitsfloat::infinity (), false, border_descriptions, Range image with borders); // ------------------------------------- //-------------------- // -----Main loop----- //-------------------- while (!viewer.wasStopped ()) { range_image_borders_widget-spinOnce (); viewer.spinOnce (); pcl_sleep(0.01); } } 代码解释 在刚开始我们做命令行解析从一个磁盘里面读取点云我们创造了一个深度图并把它进行可视化。所有的这些步骤在Range Image Visualization里面有讲。 这里只有一小点偏差。为了导出边缘信息我们要区别出无法到的深度点和超出观察范围之外的深度点。接着我们标记一个边框观察不到的点不用标记。因此提供一些测量参数是很重要的。我们将找到一个额外的pcd文件包含如下的值。 std::string far_ranges_filename pcl::getFilenameWithoutExtension (filename)_far_ranges.pcd; if (pcl::io::loadPCDFile(far_ranges_filename.c_str(), far_ranges) -1) std::cout Far ranges file \far_ranges_filename\ does not exists.\n; 他们等一下将融入深度图里面 range_image.integrateFarRanges (far_ranges); 如果这些值没有提供命令行参数-m将被用来赋值所有不能观测到地点都被认为很远距离的点。 if (setUnseenToMaxRange) range_image.setUnseenToMaxRange (); 接下去我们将来到与边缘导出相关的部分 pcl::RangeImageBorderExtractor border_extractor (range_image); pcl::PointCloudpcl::BorderDescription border_descriptions; border_extractor.compute (border_descriptions); 上面将会创建RangeImageBorderExtractor这个类给一个深度图计算边缘信息并把它存在border_descriptions里面。 最后 viewer.addCoordinateSystem (1.0f, global);可能会出现错误把代码改成viewer.addCoordinateSystem (1.0f); 直接运行它 /range_image_border_extraction -m 使用一个点云文件 ./range_image_border_extraction point_cloud.pcd

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/917236.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

注册 网站开发 公司重庆招聘网

作者 | 轩辕之风O来源 | 编程技术宇宙相信大家这两天应该被这么一条新闻刷屏了:这个漏洞到底是怎么回事?核弹级,真的有那么厉害吗?怎么利用这个漏洞呢?我看了很多技术分析文章,都太过专业,很多非…

创建网站怎么创电子商务网站有哪些类型

项目介绍: 使用javaspringbootmysql开发的法律咨询网(文书),系统包含管理员、用户角色,功能如下: 管理员:登录系统;用户管理;文章管理(法律知识&#xff09…

网站建设公司业务在哪里来百度网站的总结

I老师就职于双非二本院校,希望通过出国研修以提升科研背景,在公派访学和申请导师出资的博士后之间,其选择了后者。最终我们落实了美国耶鲁大学的职位,头衔为Associate Research Scientist(副研究科学家)&am…

企业网站 联系我们电商培训机构有哪些?哪家比较好

常用示例 入门 Hello CMake CMake 是一个用于配置跨平台源代码项目应该如何配置的工具建立在给定的平台上。 ├── CMakeLists.txt # 希望运行的 CMake命令 ├── main.cpp # 带有main 的源文件 ├── include # 头文件目录 │ └── header.h └── src # 源代码目录 ├…

深入解析:李宏毅2023机器学习作业 HW01实操

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

基于Java+SpringBoot+SSM,Flask福聚苑社区团购体系(源码+LW+调试文档+讲解等)/福聚苑社区/团购系统/社区团购/福聚苑/团购/社区/环境/福聚苑小区/在线团购/社区购物

基于Java+SpringBoot+SSM,Flask福聚苑社区团购体系(源码+LW+调试文档+讲解等)/福聚苑社区/团购系统/社区团购/福聚苑/团购/社区/环境/福聚苑小区/在线团购/社区购物pre { white-space: pre !important; word-wrap: nor…

按需引入echarts

--// echarts-config.js // ECharts按需引入配置文件 import * as echarts from echarts/core; import {BarChart,LineChart,PieChart,ScatterChart,RadarChart } from echarts/charts; import {TitleComponent,Toolti…

软件构造的用户交互设计 4章

交互设计的原则 1.尽量保持一致 2.满足普遍可用性 3.提供信息反馈 4.设计对话框以产生结束信息 5.预防并成立错误 6.允许撤销操作 7.支持内部控制点 8.减轻短时记忆负担 交互设计的基本过程 标识和建立用户需求 提出满…

自定义制作docker容器自动自愈容器镜像

包括:完整的 autoheal.sh(支持每分钟检查一次、连续 5 次 unhealthy 才重启) Dockerfile docker-compose.yml 详细文档,包含参数说明、用法1️⃣ autoheal.sh #!/usr/bin/env sh set -e set -o pipefailDOCKER_SOC…

阀门公司网站建设广州动漫制作公司

1 mpl_toolkits.mplot3d 功能介绍 mpl_toolkits.mplot3d 是 Matplotlib 库中的一个子模块,用于绘制和可视化三维图形,包括三维散点图、曲面图、线图等。它提供了丰富的功能来创建和定制三维图形。以下是 mpl_toolkits.mplot3d 的主要功能和功能简介&am…

如何利用海外 NetNut 网络代理与 AICoding 实战获取 iPhone 17 新品用户评论数据?

如何利用海外 NetNut 网络代理与 AICoding 实战获取 iPhone 17 新品用户评论数据?如何利用海外 NetNut 网络代理与 AICoding 实战获取 iPhone 17 新品用户评论数据? 一、引言 在数据驱动时代,开发者与研究者越来越依…

第一次编码器测试

共1055圈 平均2047.974408 平均每张丢失距离 0.00001132 mm可以忽略 不丢帧

04-FreeRTOS的概述及编程规范

概述 本文对FreeRTOS源码进行概述,包括其核心文件作用,及其编程规范,有助于阅读rtos的内核源码,更好的帮助理解。 一、FreeRTOS 源码核心结构概述 FreeRTOS 是轻量级实时操作系统,核心功能围绕 “任务调度” 和 “…

10_ select/poll/epoll实现服务端的io多路复用

一、io多路复用 在现有模型中,似乎每一个线程都做了同样的事情,1、监听客户端消息;2、业务消息处理。 “一消息一线程”的缺点究其根本,在于让每个线程都做了同样重复、且消耗资源巨大的事情——单独持有fd、监听客…

模拟实战配置实验

vlan之间的互通 要实现 VLAN 10(192.168.150.0/24)、VLAN 100(192.168.100.0/24)、VLAN 200(192.168.200.0/24) 之间的互联互通,核心原理是:二层交换机仅负责 VLAN 内流量转发,跨 VLAN 流量需通过三层设备(核…

微网站建设的现状设计吧

首先要理解double的存储方式,具体可查找相关的博客本文实现的是将8个字节(存储为16进制的字符串)转化为对应的double类型double MainWindow::qByteArraytodouble(QString qstr){QByteArray byte;StringToHex(qstr,byte);double result;memcpy(&result, byte.dat…

聚力赋能|竹云受邀出席2025华为全联接大会 - 详解

聚力赋能|竹云受邀出席2025华为全联接大会 - 详解2025-09-25 16:21 tlnshuju 阅读(0) 评论(0) 收藏 举报pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; displ…

Linux安装Kafka(无Zookeeper模式)保姆级教程,云服务器安装部署,Windows内存不够允许看看

pre { white-space: pre !important; word-wrap: normal !important; overflow-x: auto !important; display: block !important; font-family: "Consolas", "Monaco", "Courier New", …

国标GB28181公网直播EasyGBS如何构建全域覆盖的应急管理与安全生产解决方案?

在当今社会,安全生产和应急管理已经成为各行各业不可或缺的重要部分。全面提高安全生产管理水平、构建责任全覆盖、监管全过程、监管全方位的综合治理体系已成为社会发展的必然趋势。国标GB28181网页直播平台EasyGBS作…

Serilog.AspNetCore与Serilog的区别

一直以为用的是Serilog,深入了解后,用的是Serilog.AspNetCore,具体来了解下区别,与使用方法: Serilog 是“核心引擎”,只负责把日志事件生成出来; Serilog.AspNetCore 是“ASP.NET Core 专用适配器”,在 Seril…