简体   繁体   English

如何检查点云/ 3d 对象上的某些坐标?

[英]How to check certain coordinates on a point cloud / 3d object?

I have a point cloud of a human body and 3d scan of it.我有一个人体的点云和它的 3d 扫描。 I have some coordinates of skeleton joints but I want to check if the coordinates fit the body/point cloud or not.我有一些骨架关节的坐标,但我想检查坐标是否适合身体/点云。

I have tried to do that with python open3d and pangolin c++ but I couldn't figure out how to do that.我曾尝试使用 python open3d 和穿山甲 C++ 来做到这一点,但我不知道如何做到这一点。

I have X, Y, Z coordinates of a point and I want to see where it is in my point cloud.我有一个点的 X、Y、Z 坐标,我想看看它在我的点云中的位置。 To explain my question I have an example image that is done with paint.为了解释我的问题,我有一个用油漆完成的示例图像。

完美的艺术

I need advice about what I can use to do that.我需要关于我可以用什么来做到这一点的建议。

It depends on if you want to check visually or automatically.这取决于您是要目视检查还是自动检查。

The visually check is very easy to do with Open3D (at least, installation is much easier than PCL-Python)使用 Open3D 进行目视检查非常容易(至少,安装比 PCL-Python 容易得多)

First, you need to install open3d packages.首先,您需要安装 open3d 软件包。 Then read your point clouds by:然后通过以下方式读取您的点云:

import open3d as o3d
pcd = o3d.io.read_point_cloud(file_path)

Then generate two red point cloud in o3d: # I think your x(3,1) means x for two points然后在o3d中生成两个红色的点云:#我认为你的x(3,1)表示两个点的x

import numpy as np

pcd_red = o3d.geometry.PointCloud()

xyz = np.asarray([[3, 2, 8],
                  [1, 8, 3]])

pcd_red.points = o3d.utility.Vector3dVector(xyz)

# paint them to red
pcd_red.paint_uniform_color([1, 0, 0])

Finally is display:最后是显示:

o3d.visualization.draw_geometries([pcd, pcd_red])

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM