当前位置:网站首页>open3d里pointcloud和numpy数组之间的转化
open3d里pointcloud和numpy数组之间的转化
2022-06-28 14:24:00 【江湖夜雨abc】
open3d中在使用open3d.io.read_point_cloud()读取点云数据后,返回的是pointcloud类型的数据,有时候希望能用numpy处理点云,这时候需要进行二者之间的转换(严格地说只是数据经过复制再传输而已)。
1.pointcloud转换成numpy
import numpy as np
import open3d as o3d
A=[]
pcd=o3d.io.read_point_cloud("/bunny.ply")#路径需要根据实际情况设置
A=np.asarray(pcd.points)#A已经变成n*3的矩阵
print(A)
2.numpy数组中的数据转化成pointcloud
#这里B已经是一个n*3的numpy.ndarray(也就是常见的数组类型)
pcd=o3d.geometry.PointCloud()#实例化一个pointcloud类
pcd.points=o3d.utility.Vector3dVector(B)#给该类传入坐标数据,此时pcd.points已经是一个点云了
o3d.visualization.draw_geometries([pcd.points])#显示一下
边栏推荐
- 坐拥755万开发者的中国开源,进度几何?
- SPI interface introduction -piyu dhaker
- 2022金属非金属矿山安全检查(地下矿山)复训题库及在线模拟考试
- Play NAS home NAS server setup scheme "suggestions collection"
- Regular matching numbers, English and English symbols
- The time schedule for the soft test in the second half of 2022 has been determined!
- Tencent cloud international ECS has no network after logging in. How to troubleshoot?
- Angers medical sprint scientific innovation board: annual revenue of RMB 300million and proposed fund raising of RMB 770million
- 哪个证券公司最大最安全 怎么办理开户最安全
- 木兰开放作品许可证1.0面向社会公开征求意见
猜你喜欢

你的代碼會說話嗎?(上)

Votre Code parle? (1)

PC Museum - familiar and strange ignorant age

Work study management system based on ASP

sort

How to count dimensions of foreign trade E-mail Promotion

2022下半年软考考试时间安排已确定!

基于asp.net的文献检索系统

Ding! Techo day Tencent technology open day arrived as scheduled!

Based on asp Net based document retrieval system
随机推荐
What does VPS do? What are the famous brands? What is the difference with ECS?
如何备份mysql_史上最全的MYSQL备份方法
Source code analysis of ArrayList
仅用递归函数和栈操作逆序一个栈
Youju new material rushes to Shenzhen Stock Exchange: it plans to raise 650million yuan, with an annual revenue of 333million yuan
如何设计数据可视化平台
Thread life cycle and its methods
Go array and slice, []byte to string[easy to understand]
2022 welder (technician) examination question bank simulated examination platform operation
机器人的运动范围(DFS)
[Zhongyi Xinsheng] 5 SPI interface test TF Card
运行近20年,基于Win 98的火星探测器软件迎来首次升级
快手投资电商服务商易心优选
解决Unable to create process using ‘D:\Program File
js 判断字符串为空或者不为空
Design a stack with getmin function
Double buffer drawing
Open source invites you to participate in openinfra days China 2022. Topic collection is in progress ~
Summary of 2021 computer level III database
Leetcode(665)——非递减数列