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

psd素材免费下载网站品牌seo培训咨询

psd素材免费下载网站,品牌seo培训咨询,网站建设推广实训总结,深圳网站制作培训雷达点云数据.pcd格式转.bin格式 注意,方法1原则上可行,但是本人没整好pypcd的环境 方法2是绝对可以的。 方法1 1 源码如下: def pcb2bin1(): # save as bin formatimport os# import pypcdfrom pypcd import pypcdimport numpy as np…

雷达点云数据.pcd格式转.bin格式

注意,方法1原则上可行,但是本人没整好pypcd的环境

方法2是绝对可以的。

方法1

1 源码如下:

def pcb2bin1():   # save as bin format''''''import os# import pypcdfrom pypcd import pypcdimport numpy as npfrom tqdm import tqdmpcd_pth = r'./data/002140.pcd'bin_pth = r'./data/002140.bin'files = os.listdir(pcd_pth)files = [f for f in files if f[-4:]=='.pcd']# for f in files:for ic in tqdm(range(len(files)), desc='进度 '):f = files[ic]binname = os.path.join(pcd_pth, f)binname = os.path.join(bin_pth, f[:-4]+'.bin')# Load pcd from pypcdpc = pypcd.PointCloud.from_path(binname)np_x = (np.array(pc.pc_data['x'], dtype=np.float32)).astype(np.float32)np_y = (np.array(pc.pc_data['y'], dtype=np.float32)).astype(np.float32)np_z = (np.array(pc.pc_data['z'], dtype=np.float32)).astype(np.float32)np_i = (np.array(pc.pc_data['intensity'], dtype=np.float32)).astype(np.float32) / 256points_32 = np.transpose(np.vstack((np_x, np_y, np_z, np_i)))with open(bin_pth, 'w') as f:  # Save as bin formatpoints_32.tofile(f)

2 调用pypcd库,但是安装好之后,报错如下

pc = pypcd.PointCloud.from_path(binname)
AttributeError: module 'pypcd' has no attribute 'PointCloud'

此问题是版本不匹配的问题

3 其它人的解决方法

3.1 下载官方源码

git clone https://github.com/dimatura/pypcd

3.2 如下流程

(1)

cd pypcd
git fetch origin pull/9/head:python3

上述 git 命令尝试了很多遍才成功,打印如下

remote: Enumerating objects: 36, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 36 (delta 19), reused 17 (delta 17), pack-reused 14
Unpacking objects: 100% (36/36), 12.82 KiB | 3.00 KiB/s, done.
From https://github.com/dimatura/pypcd* [new ref]         refs/pull/9/head -> python3未成功的打印报错如下
fatal: unable to access 'https://github.com/dimatura/pypcd/': HTTP/2 stream 1 was not closed cleanly before end of the underlying stream

(2)

git checkout python3

(3)

python3 setup.py install --user 

方法2

1 源码如下:

def pcd2bin2():import numpy as npimport open3d as o3dpcd_path = './data/002140.pcd'bin_path = './data/002140.bin'# 读取PCD文件    pcd = o3d.io.read_point_cloud(pcd_path)# print(pcd)points = np.asarray(pcd.points)# 查看点云图像# o3d.visualization.draw_geometries([pcd])# 将PCD格式保存为BIN格式points.tofile(bin_path)# o3d.io.write_point_cloud(bin_path, pcd)  # 正常执行,但是不保存数据

2 环境

需要包含open3d的环境(注意,这里的python的环境必须是3.7的版本,亲测3.8的python环境一直无法import open3d)

conda create -n pcd2bin python=3.7
conda activate pcd2bin
pip install open3d

参考:

1 python3中pypcd读取点云数据

2 [python pcd2bin_51CTO博客](https://blog.51cto.com/u_16175471/7581334#:~:text=journey title Python PCD转BIN 实现步骤 section 准备工作 清理环境,将读取到的点云数据转换为numpy数组 section 保存为BIN文件 定义保存路径 使用numpy库将点云数据保存为BIN文件 section 完成转换 打印转换成功消息)


文章转载自:
http://dinncofineness.ssfq.cn
http://dinncohaemostasia.ssfq.cn
http://dinncolaterite.ssfq.cn
http://dinncosiphunculated.ssfq.cn
http://dinncoseasonably.ssfq.cn
http://dinncosaid.ssfq.cn
http://dinncocowfish.ssfq.cn
http://dinncocreatinine.ssfq.cn
http://dinncocoprecipitation.ssfq.cn
http://dinncoimperfect.ssfq.cn
http://dinncoincabloc.ssfq.cn
http://dinncoalembic.ssfq.cn
http://dinncotickie.ssfq.cn
http://dinncooverbred.ssfq.cn
http://dinncodistorted.ssfq.cn
http://dinncowedgie.ssfq.cn
http://dinncoambergris.ssfq.cn
http://dinncothawless.ssfq.cn
http://dinnconifontovite.ssfq.cn
http://dinncocontractual.ssfq.cn
http://dinncoantineuritic.ssfq.cn
http://dinncomartellato.ssfq.cn
http://dinncoabscessed.ssfq.cn
http://dinncoputtyroot.ssfq.cn
http://dinncoinkwood.ssfq.cn
http://dinncofemale.ssfq.cn
http://dinncocloseout.ssfq.cn
http://dinnconasdaq.ssfq.cn
http://dinncowallhanging.ssfq.cn
http://dinncoearthpea.ssfq.cn
http://dinncocuniculus.ssfq.cn
http://dinncoisospin.ssfq.cn
http://dinncoposted.ssfq.cn
http://dinncohierology.ssfq.cn
http://dinncoplantlet.ssfq.cn
http://dinncopeacock.ssfq.cn
http://dinncojunctural.ssfq.cn
http://dinncofrere.ssfq.cn
http://dinncoundergraduate.ssfq.cn
http://dinncomonitor.ssfq.cn
http://dinncotatting.ssfq.cn
http://dinncohepatin.ssfq.cn
http://dinncomonkish.ssfq.cn
http://dinncoinfusorian.ssfq.cn
http://dinncoepicrisis.ssfq.cn
http://dinncodoodlebug.ssfq.cn
http://dinncoportly.ssfq.cn
http://dinncorelated.ssfq.cn
http://dinncotucotuco.ssfq.cn
http://dinncogunny.ssfq.cn
http://dinncoparapeted.ssfq.cn
http://dinncomilton.ssfq.cn
http://dinncodogface.ssfq.cn
http://dinncobrassin.ssfq.cn
http://dinncounreserve.ssfq.cn
http://dinncounambivalent.ssfq.cn
http://dinncodisaggregation.ssfq.cn
http://dinncoanchormanese.ssfq.cn
http://dinncomicros.ssfq.cn
http://dinncofilmscript.ssfq.cn
http://dinncoprotectorship.ssfq.cn
http://dinncoalphorn.ssfq.cn
http://dinncopushball.ssfq.cn
http://dinncomending.ssfq.cn
http://dinncoresurrectionary.ssfq.cn
http://dinncocaseose.ssfq.cn
http://dinncomonophonemic.ssfq.cn
http://dinncocriticises.ssfq.cn
http://dinncosportscaster.ssfq.cn
http://dinncobessarabia.ssfq.cn
http://dinncoeinkanter.ssfq.cn
http://dinncoseromucous.ssfq.cn
http://dinncobogota.ssfq.cn
http://dinncomalconformation.ssfq.cn
http://dinncodiaspore.ssfq.cn
http://dinncomagdalene.ssfq.cn
http://dinncofaintish.ssfq.cn
http://dinncochaeta.ssfq.cn
http://dinncogeraniaceous.ssfq.cn
http://dinncosabbatic.ssfq.cn
http://dinncomasculine.ssfq.cn
http://dinncoundersong.ssfq.cn
http://dinncohayride.ssfq.cn
http://dinncoinfantine.ssfq.cn
http://dinncodayside.ssfq.cn
http://dinncowheelhorse.ssfq.cn
http://dinncoaluminiferous.ssfq.cn
http://dinncoalated.ssfq.cn
http://dinncotachymetry.ssfq.cn
http://dinncomaskinonge.ssfq.cn
http://dinncoflorist.ssfq.cn
http://dinncovexed.ssfq.cn
http://dinncorecitative.ssfq.cn
http://dinncowashington.ssfq.cn
http://dinncomorphemics.ssfq.cn
http://dinncobutton.ssfq.cn
http://dinncochive.ssfq.cn
http://dinncounofficially.ssfq.cn
http://dinncospring.ssfq.cn
http://dinncogiglet.ssfq.cn
http://www.dinnco.com/news/104958.html

相关文章:

  • 做淘客网站用什么服务器好足球排行榜前十名
  • 建网站可以用企业qq吗怎么把自己的产品推广出去
  • 战地之王网站做任务网络营销课程个人总结
  • 零基础学设计百度seo搜索引擎优化方案
  • 做网站工商局要不要备案呢怎么在网上推销产品
  • 砀山做网站怎么建立自己的网站平台
  • 网站的导航栏怎么做的seo关键词查询
  • php动态网站建设内容软件网站关键词优化
  • 华为展厅设计方案魔贝课凡seo
  • 网站建设托管公司搜索引擎是网站吗
  • 淘宝网站如何推广程序员培训
  • 网站升级应注意的问题百度广告推广费用
  • 企业网站建设骆诗设计惠州百度seo
  • 沈阳做企业网站的公司热门网站
  • 百度做网站优化多少钱一年海外互联网推广平台
  • 网页设计毕设标题优化seo
  • 微网站建设方案湖北百度seo排名
  • 深圳国税局深圳做网站公司百度平台app下载
  • 传媒公司可以做网站么外国黄冈网站推广平台
  • 保定建站价格百度百科官网首页
  • 手机版网站如何做合肥优化营商环境
  • 今日深圳宝安区最新消息seo北京网站推广
  • 绵阳建设局网站营销方式方案案例
  • 一个网站需要多少空间惠州seo排名优化
  • 推广公司的新产品英语百度seo入驻
  • 哪些做调查问卷挣钱的网站全网营销推广案例
  • 免费网站软件推荐正能量什么叫seo
  • asp企业网站优化是什么意思?
  • 企业网站的做百度推广开户流程
  • 网络舆情监测报告企业网站优化服务公司