@flash,
You’re looking at the port, not the message.
rgbd.pcl
is an output port that emits dai.PointCloudData
. The methods getPoints()
/ getPointsRGB()
live on the message you read from that port — not on the port itself. (rgbd.rgbd
is the port that emits dai.RGBDData
frames.)
DepthAI v3:
import depthai as dai
with dai.Pipeline() as p:
rgbd = p.create(dai.node.RGBD).build(autocreate=True, size=(640, 400))
q = rgbd.pcl.createOutputQueue(maxSize=2, blocking=True) # <-- host queue
p.start()
msg = q.get() # <-- dai.PointCloudData
# Access points
xyz = msg.getPoints() # (N,3) float32
xyzc, rgba = msg.getPointsRGB() # xyz:(N,3) float32, rgba:(N,4) uint8
print(type(msg)) # should be <class 'depthai.PointCloudData'>