UPDATE Vision 新增Nan值判断
This commit is contained in:
@ -145,7 +145,7 @@ class camera():
|
||||
:return: ret , img, point_map
|
||||
'''
|
||||
if self.caminit_isok == False or self.event.IsOffline():
|
||||
return 0, None
|
||||
return 0, None, None
|
||||
else:
|
||||
image_list = self.cl.DeviceStreamRead(self.handle, 2000)
|
||||
if len(image_list) == 2:
|
||||
@ -153,19 +153,18 @@ class camera():
|
||||
frame = image_list[i]
|
||||
if frame.streamID == PERCIPIO_STREAM_DEPTH:
|
||||
img_depth = frame
|
||||
img_depth2p3d = frame
|
||||
if frame.streamID == PERCIPIO_STREAM_COLOR:
|
||||
img_color = frame
|
||||
|
||||
self.cl.DeviceStreamMapDepthImageToColorCoordinate(self.depth_calib, img_depth.width, img_depth.height,
|
||||
self.scale_unit, img_depth, self.color_calib, img_color.width,
|
||||
img_color.height, self.img_registration_depth)
|
||||
|
||||
# self.cl.DeviceStreamMapDepthImageToColorCoordinate(self.depth_calib, img_depth.width, img_depth.height,
|
||||
# self.scale_unit, img_depth, self.color_calib, img_color.width,
|
||||
# img_color.height, self.img_registration_depth)
|
||||
#
|
||||
# self.cl.DeviceStreamDepthRender(self.img_registration_depth, self.img_registration_render)
|
||||
# mat_depth_render = self.img_registration_render.as_nparray()
|
||||
# cv2.imshow('registration', mat_depth_render)
|
||||
|
||||
self.cl.DeviceStreamMapDepthImageToPoint3D(self.img_registration_depth, self.depth_calib, self.scale_unit,
|
||||
self.cl.DeviceStreamMapDepthImageToPoint3D(img_depth, self.depth_calib, self.scale_unit,
|
||||
self.pointcloud_data_arr)
|
||||
|
||||
# show p3d arr data
|
||||
|
||||
Reference in New Issue
Block a user