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

网站做优化和推广哪个好长春网站建设方案优化

网站做优化和推广哪个好,长春网站建设方案优化,协同开发平台,免费行情软件app网站下载大全“体素”通常是指在三维空间中具有固定尺寸和位置的小立方体单元。 体素的优点包括#xff1a; 易于处理和计算#xff1a;在计算机图形学和三维建模中#xff0c;体素的结构相对简单#xff0c;计算和操作较为方便。能精确表示物体的内部结构#xff1a;对于一些需要了…“体素”通常是指在三维空间中具有固定尺寸和位置的小立方体单元。 体素的优点包括 易于处理和计算在计算机图形学和三维建模中体素的结构相对简单计算和操作较为方便。能精确表示物体的内部结构对于一些需要了解物体内部信息的应用如医学成像、地质建模等体素可以提供更详细和准确的内部描述。适合并行计算因为体素之间相对独立便于在多核或分布式计算环境中进行并行处理提高计算效率。数据结构简单存储和管理体素数据的结构相对简单降低了数据处理的复杂性。 本文主要介绍在使用体素过程中的一些快速计算的方法 1. 求重心 一般情况下并不需要求体素的重心可以用中心或随机采样来代替但是在一些特殊的应用场景还是需要重心的而这个重心却很难计算此处介绍一种快速方法。 通过cumsum函数高效计算voxel中所有Point的XYZ坐标之和/平均值为了方便理解下面对该trick的计算过程进行简单演示 # 假设我们有一组Point以及该组Point中每个点对应的voxel的index points np.array([[1, 1, 1], [2, 2, 2], [3, 3, 3], [4, 4, 4], [5, 5, 5]]) # 5x3 indexes np.array([0, 1, 2, 2, 3]) # 现在我们希望计算属于同一个voxel中的所有点的x,y,z坐标的平均值暴力方法是通过for循环来实现 # 下面给出如何利用cumsum函数来非常简单的实现上述功能# step1: 对点云的第0维进行累加求和 points_cumsum points.cumsum(0) # point_cumsum [[1, 1, 1], [3, 3, 3], [6, 6, 6], [10, 10, 10], [15, 15, 15]]# step2: 计算每个点与其前一个点是否落在同一个voxel中 kept np.ones(points.shape[0], dtypebool) kept[:-1] (indexes[1:] ! indexes[:-1]) # kept: [True, True, False, True, True]# step3: 计算并输出同一个voxel中所有Point的xyz坐标之和 points_voxel points_cumsum[kept] points_voxel np.concatenate((points_voxel[:1], points_voxel[1:] - points_voxel[:-1])) # points_voxel: [[1, 1, 1], [2, 2, 2], [7, 7, 7], [5, 5, 5]] 2. 语义投票 对体素中每个点的语义求均值是错误的方法。随机采样并不鲁棒投票是比较好的方法但投票的开销很大。此处介绍一个快速计算方法。 2.1. 开销大的方法 当体素较多时该方法速度极慢 min_values np.min(points, axis0) points_voxel_coordinates np.round((points - min_values) / voxel_size).astype(int) sample_voxel_coordinates, sampled_indices np.unique(points_voxel_coordinates, axis0, return_inverseTrue) sampled_points sample_voxel_coordinates * voxel_size voxel_size * 0.5sampled_semantics [] for i in range(len(sample_voxel_coordinates)):print(fProcessing voxel {i}/{len(sample_voxel_coordinates)})voxel_point_indices np.where(sampled_indices i)[0]voxel_semantics semantics[voxel_point_indices]voxel_semantic scipy.stats.mode(voxel_semantics)[0][0]sampled_semantics.append(voxel_semantic)sampled_semantics np.array(sampled_semantics) 2.2. 内存大的方法 该方法速度快但当语义的类别较多时其占用的内存较大。 num_points points.shape[0]min_values np.min(points, axis0) points_voxel_coordinates np.round((points - min_values) / voxel_size).astype(int) _, sampled_indices, counts np.unique(points_voxel_coordinates, axis0, return_inverseTrue, return_countsTrue)arg_indices np.argsort(sampled_indices) sampled_indices sampled_indices[arg_indices] points points[arg_indices, :] points points.cumsum(0)kept np.ones(num_points, dtypebool) kept[:-1] (sampled_indices[1:] ! sampled_indices[:-1]) counts_3d np.tile(counts, (3, 1)).Tpoints points[kept] points np.concatenate((points[:1], points[1:] - points[:-1])) points (points / counts_3d).astype(np.float32)semantics pointcloud.point.semantic.numpy().flatten() semantic_matrix np.zeros((num_points, num_semantics), dtypebool) semantic_matrix[np.arange(num_points), semantics] 1semantic_matrix semantic_matrix[arg_indices, :] semantic_cols []for i in range(num_semantics):semantic_col np.cumsum(semantic_matrix[:, i].astype(np.uint32))semantic_col semantic_col[kept]semantic_col np.concatenate((semantic_col[:1], semantic_col[1:] - semantic_col[:-1])).astype(np.uint8)semantic_cols.append(semantic_col)semantic_cols np.stack(semantic_cols, axis1) semantic_matrix np.argmax(semantic_cols, axis1).astype(np.uint8) 2.3. 两者兼顾的方法 该方法虽然速度上比上一方法略慢但解决了内存问题 num_points points.shape[0]min_values np.min(points, axis0) points_voxel_coordinates np.round((points - min_values) / voxel_size).astype(int) _, sampled_indices, counts np.unique(points_voxel_coordinates, axis0, return_inverseTrue, return_countsTrue)arg_indices np.argsort(sampled_indices) sampled_indices sampled_indices[arg_indices] points points[arg_indices, :] points points.cumsum(0)kept np.ones(num_points, dtypebool) kept[:-1] (sampled_indices[1:] ! sampled_indices[:-1]) counts_3d np.tile(counts, (3, 1)).Tpoints points[kept] points np.concatenate((points[:1], points[1:] - points[:-1])) points (points / counts_3d).astype(np.float32)semantics pointcloud.point.semantic.numpy().flatten().astype(np.uint8) semantics semantics[arg_indices]num_kept np.sum(kept) max_values np.zeros(num_kept, dtypenp.uint64) max_indices np.zeros(num_kept, dtypenp.uint8)for i in range(num_semantics):semantic_col np.where(semantics i, 1, 0).astype(np.uint64)semantic_col np.cumsum(semantic_col)semantic_col semantic_col[kept]semantic_col np.concatenate((semantic_col[:1], semantic_col[1:] - semantic_col[:-1])).astype(np.uint8)sign semantic_col max_valuesmax_values[sign] semantic_col[sign]max_indices[sign] i
http://www.w-s-a.com/news/718054/

相关文章:

  • 机关门户网站 建设 方案个人怎么申请注册商标
  • 梧州网站建设有哪些九江网站建设优化
  • APP网站建设开发企业发展英文seo招聘
  • 临海市住房和城乡建设规划局网站高校图书馆网站的建设方案
  • 建立门户网站张店易宝网站建设
  • wordpress中英文站点厦门seo顾问屈兴东
  • 邯郸网站建设项目重庆网站备案系统
  • 网站导航容易做黄冈网站建设报价
  • 美橙互联建站网站被截止徐州网站建站
  • 网站班级文化建设视频深圳企业网页设计公司
  • 钦州网站建设公司做宣传网站买什么云服务器
  • 58同城有做网站wordpress怎么改标题和meta
  • 安通建设有限公司网站东莞地铁app
  • 群晖nas做网站滨州教育平台 网站建设
  • 住房城市乡建设部网站装修平台有哪些
  • 小米网站 用什么做的深圳广告公司前十强
  • 勤哲网站开发视频瑞安 网站建设培训
  • 有个蓝色章鱼做标志的网站高端的网站建设怎么做
  • 建站网址导航hao123html网页设计实验总结
  • 西宁市网站建设价格丽水集团网站建设
  • 长宁怎么做网站优化好本机怎么放自己做的网站
  • 诚信网站备案中心网站字体怎么设置
  • 企业网站建设费是无形资产吗佛山网站建设哪个好点
  • 网站建设就业方向国开行网站毕业申请怎么做
  • 创建一个网站的费用wordpress 4.0 安装
  • 会员登录系统网站建设dw软件是做什么用的
  • 手机网站被做跳转长沙网上购物超市
  • 网站建设中网站需求分析设计网站推荐html代码
  • 容易收录的网站台州汇客网站建设
  • 企业网站源码百度网盘下载网站备案号如何查询密码