我正在使用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>