06-20-2022, 05:45 PM
As a workaround, we added the ability to retrieve the depth map through socket withRoboDK v5.4.3(2022-06-20)及以上。它应该是available on all platforms soon.
Code:
bytes_img = RDK.Cam2D_Snapshot("", cam_item, 'DEPTH')
if isinstance(bytes_img, bytes) and bytes_img != b'':
# By socket
depth32_socket = np.frombuffer(bytes_img, dtype='>u4')
w, h = depth32_socket[:2]
depth32_socket = np.flipud(np.reshape(depth32_socket[2:], (h, w))).astype(np.uint32)
Please read theForum Guidelinesbefore posting!
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .
Find useful information about RoboDK by visiting our2022世界杯32强赛程表时间 .