完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用python包装器中的代码来获取点云:
depth = frames.get_depth_frame() color = frames.get_color_frame() 如果不是深度或不是颜色: 继续 pc.map_to(颜色) points = pc.calculate(depth) 然后我将顶点转换为ndarray: vtx = np.asarray(points.get_vertices()) vtx_list = vtx.tolist() vtx = np.array(vtx_list,'float') 我尝试将顶点绘制为散点图: fig = pyplot.figure() ax = Axes3D(图) ax.scatter(vtx [:,0],vtx [:,1],vtx [:,2]) pyplot.show() 我得到以下结果: 图形看起来不应该是(它不应该只是几条直线)。 谁知道我错过了什么? 谢谢MartyG 以上来自于谷歌翻译 以下为原文 I used the the code from the python wrapper to get point cloud: depth = frames.get_depth_frame()color = frames.get_color_frame()if not depth or not color: continuepc.map_to(color)points = pc.calculate(depth) Then I transform the vertex to ndarray: vtx = np.asarray(points.get_vertices())vtx_list=vtx.tolist()vtx=np.array(vtx_list, 'float') And I try to plot the vertex as scatter points: fig = pyplot.figure()ax = Axes3D(fig)ax.scatter(vtx[:,0], vtx[:,1], vtx[:,2])pyplot.show() I get following result: The graph does not look like it is supposed to be (It should not be just a few straight lines). Anyone knows what I am missing? Thanks MartyG |
|
相关推荐
2个回答
|
|
我不确定,但我记得最近的一个案例,即Python中生成的点云缺少数据点,因为它们的深度记录为无效的NaN值。
我发现有人编写了脚本,通过使所有NaN值的深度值为“0”来包含云中这些点的坐标。 一旦用户将NaN修复程序集成到他们的应用程序中,他们就会发布他们的脚本,以便其他人可以从中受益。 从D435获得完整的点云 以上来自于谷歌翻译 以下为原文 I'm not sure, but I recall a recent case where a point cloud generated in Python was missing data points because their depth was registering as invalid NaN values. I found that someone had written scripting that includes the coordinates of those points in the cloud by making all NaN values have a depth value of '0'. Once the user had integrated the NaN fix into their application, they kindly posted their script so others could benefit from it. Getting complete point cloud from D435 |
|
|
|
nywerwer 发表于 2018-10-12 11:38 我检查了深度帧数据。 640 * 480 = 307200中有大约197371个零值,这很奇怪。 我刚检查了颜色深度对齐示例,它还有很多零值。 好像深度框架很好,问题来自'pc.map_to'或'pc.calculate' 以上来自于谷歌翻译 以下为原文 I checked the depth frame data. There are around 197371 zeros values out of 640*480=307200, which is weird. I just checked the color-depth alignment example, it also has lots of zeros values. Seems like the depth frame is fine, and the problem is from the 'pc.map_to' or 'pc.calculate' |
|
|
|
只有小组成员才能发言,加入小组>>
538浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-1-12 16:30 , Processed in 0.809974 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号