有没有办法直接从pcd网址加载点云数据?

时间:2020-03-27 22:31:41

标签: python python-3.x python-requests point-cloud-library

我正在使用python-pcl。在将response.content转换为pcd.load对象之后,我尝试将bytesIO传递给.pcd,但是由于某种原因它无法处理它。 pcl有什么方法可以直接从URL加载from pypcd.pypcd import PointCloud import io response = requests.get(pcd_url) req_content = io.BytesIO(response.content) pc = PointCloud.from_fileobj(req_content) print(pc) 文件吗?

我正在使用以下代码:

Traceback (most recent call last):
  File "...../algorithm.py", line 86, in <module>
    pc = PointCloud.from_fileobj(req_content)
  File "...../venv/lib/python3.7/site-packages/pypcd/pypcd.py", line 740, in from_fileobj
    return point_cloud_from_fileobj(fileobj)
  File "...../venv/lib/python3.7/site-packages/pypcd/pypcd.py", line 282, in point_cloud_from_fileobj
    if ln.startswith('DATA'):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

<button name="operation" onclick="operation(+)">+</button>
<button name="operation" onclick="operation(-)">-</button>

0 个答案:

没有答案