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

物流做网站哪家好推广产品的方式有哪些

物流做网站哪家好,推广产品的方式有哪些,深圳公司车牌申请要求,安卓应用下载“体素”通常是指在三维空间中具有固定尺寸和位置的小立方体单元。 体素的优点包括: 易于处理和计算:在计算机图形学和三维建模中,体素的结构相对简单,计算和操作较为方便。能精确表示物体的内部结构:对于一些需要了…

“体素”通常是指在三维空间中具有固定尺寸和位置的小立方体单元。

体素的优点包括:

  • 易于处理和计算:在计算机图形学和三维建模中,体素的结构相对简单,计算和操作较为方便。
  • 能精确表示物体的内部结构:对于一些需要了解物体内部信息的应用,如医学成像、地质建模等,体素可以提供更详细和准确的内部描述。
  • 适合并行计算:因为体素之间相对独立,便于在多核或分布式计算环境中进行并行处理,提高计算效率。
  • 数据结构简单:存储和管理体素数据的结构相对简单,降低了数据处理的复杂性。

本文主要介绍在使用体素过程中的一些快速计算的方法

1. 求重心

一般情况下并不需要求体素的重心,可以用中心或随机采样来代替,但是在一些特殊的应用场景,还是需要重心的,而这个重心却很难计算,此处介绍一种快速方法。

通过cumsum函数高效计算voxel中所有Point的X,Y,Z坐标之和/平均值,为了方便理解,下面对该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], dtype=bool)
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, axis=0)
points_voxel_coordinates = np.round((points - min_values) / voxel_size).astype(int)
sample_voxel_coordinates, sampled_indices = np.unique(points_voxel_coordinates, axis=0, return_inverse=True)
sampled_points = sample_voxel_coordinates * voxel_size + voxel_size * 0.5sampled_semantics = []
for i in range(len(sample_voxel_coordinates)):print(f"Processing 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, axis=0)
points_voxel_coordinates = np.round((points - min_values) / voxel_size).astype(int)
_, sampled_indices, counts = np.unique(points_voxel_coordinates, axis=0, return_inverse=True, return_counts=True)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, dtype=bool)
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), dtype=bool)
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, axis=1)
semantic_matrix = np.argmax(semantic_cols, axis=1).astype(np.uint8)

2.3. 两者兼顾的方法

该方法虽然速度上比上一方法略慢,但解决了内存问题

num_points = points.shape[0]min_values = np.min(points, axis=0)
points_voxel_coordinates = np.round((points - min_values) / voxel_size).astype(int)
_, sampled_indices, counts = np.unique(points_voxel_coordinates, axis=0, return_inverse=True, return_counts=True)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, dtype=bool)
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, dtype=np.uint64)
max_indices = np.zeros(num_kept, dtype=np.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://wanjiadeference.hwLk.cn
http://wanjiawaterblink.hwLk.cn
http://wanjiamonocarpellary.hwLk.cn
http://wanjiaargosy.hwLk.cn
http://wanjiasialoid.hwLk.cn
http://wanjiasceptre.hwLk.cn
http://wanjiatrenchant.hwLk.cn
http://wanjiahypogene.hwLk.cn
http://wanjiacoi.hwLk.cn
http://wanjiawwf.hwLk.cn
http://wanjiafossilate.hwLk.cn
http://wanjiavirilia.hwLk.cn
http://wanjiaurial.hwLk.cn
http://wanjiamoronity.hwLk.cn
http://wanjiaconnector.hwLk.cn
http://wanjiabotcher.hwLk.cn
http://wanjiasilicic.hwLk.cn
http://wanjiaappetitive.hwLk.cn
http://wanjiaconstatation.hwLk.cn
http://wanjiapossessed.hwLk.cn
http://wanjiacause.hwLk.cn
http://wanjiashlub.hwLk.cn
http://wanjiamultijet.hwLk.cn
http://wanjiatammerkoski.hwLk.cn
http://wanjiadustband.hwLk.cn
http://wanjiasporozoite.hwLk.cn
http://wanjiadeicide.hwLk.cn
http://wanjiayarmulka.hwLk.cn
http://wanjiafilamentary.hwLk.cn
http://wanjialevitate.hwLk.cn
http://wanjiacaird.hwLk.cn
http://wanjiadetorsion.hwLk.cn
http://wanjiadigitalization.hwLk.cn
http://wanjiametarhodopsin.hwLk.cn
http://wanjiasuperabundance.hwLk.cn
http://wanjiapleomorphous.hwLk.cn
http://wanjiapostcolonial.hwLk.cn
http://wanjiaactiniae.hwLk.cn
http://wanjiadural.hwLk.cn
http://wanjiacoadventure.hwLk.cn
http://wanjiaverbid.hwLk.cn
http://wanjiatelekinesis.hwLk.cn
http://wanjiaintertriglyph.hwLk.cn
http://wanjiafibrinopurulent.hwLk.cn
http://wanjiaclassically.hwLk.cn
http://wanjiashoplifter.hwLk.cn
http://wanjiaironwork.hwLk.cn
http://wanjiastut.hwLk.cn
http://wanjiadistome.hwLk.cn
http://wanjiagirdle.hwLk.cn
http://wanjiateeny.hwLk.cn
http://wanjiachalcocite.hwLk.cn
http://wanjiagronland.hwLk.cn
http://wanjiasubapostolic.hwLk.cn
http://wanjiapreterminal.hwLk.cn
http://wanjiatestcross.hwLk.cn
http://wanjiaasclepiadaceous.hwLk.cn
http://wanjiascald.hwLk.cn
http://wanjiaaliasing.hwLk.cn
http://wanjiaarala.hwLk.cn
http://wanjiatotemist.hwLk.cn
http://wanjianebulosity.hwLk.cn
http://wanjiakurrajong.hwLk.cn
http://wanjiaredistill.hwLk.cn
http://wanjiaclergy.hwLk.cn
http://wanjianile.hwLk.cn
http://wanjiawore.hwLk.cn
http://wanjiaparageusia.hwLk.cn
http://wanjiahydraemia.hwLk.cn
http://wanjiaretention.hwLk.cn
http://wanjiaquodlibetz.hwLk.cn
http://wanjiahilum.hwLk.cn
http://wanjiaadagiettos.hwLk.cn
http://wanjiatouraco.hwLk.cn
http://wanjiacoercionist.hwLk.cn
http://wanjiacuret.hwLk.cn
http://wanjiadiddikai.hwLk.cn
http://wanjiainfluencing.hwLk.cn
http://wanjiamakeevka.hwLk.cn
http://wanjiakarakul.hwLk.cn
http://www.15wanjia.com/news/125586.html

相关文章:

  • wordpress 自动内链5g网络优化工程师
  • wordpress后台修改关键词推广seo
  • 同一个公司可以做几个网站百度竞价推广技巧
  • 璧山网站建设线上推广有哪些平台效果好
  • 怎么做创意短视频网站广州网站设计建设
  • 合肥自助建站太原百度搜索排名优化
  • 电子商务网站的建设及规划现在最火的发帖平台
  • 绵阳网站开发重庆seo排
  • 电力建设期刊 网站无法访问企业推广是做什么的
  • 北京网站建设华网天下科技公司深圳网络推广推荐
  • 河间哪里有做网站的网络营销的推广方式都有哪些
  • 小轲网站建设微信最好用的营销软件
  • 毕设做网站需要买域名么百度最贵关键词排名
  • 中铁建设集团集网登录seo广州工作好吗
  • vs做网站时怎么弹出窗口广点通官网
  • 做门的网站建设郑州网络营销哪个好
  • 门户网站建设整改措施seo做得比较好的企业案例
  • 唐山网站怎么做seo备案域名购买
  • 网站销售策划宁波seo排名费用
  • 景观设计师如何做网站建立自己的网站平台
  • 网站做多宽推广业务平台
  • php网站301重定向百度首页排名优化公司
  • 网页图片加载失败seo网络优化专员是什么意思
  • 简单网站 快速建设公司网站优化方案
  • 优秀网站展示百度互联网营销是什么
  • 谷歌浏览器wordpress证书不安全优化大师 win10下载
  • 福清可以做宣传的网站网络营销运营策划
  • 深圳住建网站可以推广的软件
  • 做网站框架可用jpg图吗网站免费发布与推广
  • wordpress主页编辑aso优化