UPDATE Vision 修复深度图对齐彩色图
This commit is contained in:
@ -80,6 +80,7 @@ class camera_pe():
|
||||
# print('\t{} -size[{}x{}]\t-\t desc:{}'.format(idx, cl.Width(fmt), cl.Height(fmt), fmt.getDesc()))
|
||||
self.cl.DeviceStreamFormatConfig(self.handle, PERCIPIO_STREAM_DEPTH, depth_fmt_list[2]) # 深度图大小
|
||||
self.depth_calib_data = self.cl.DeviceReadCalibData(self.handle, PERCIPIO_STREAM_DEPTH)
|
||||
self.color_calib_data = self.cl.DeviceReadCalibData(self.handle, PERCIPIO_STREAM_COLOR)
|
||||
|
||||
err = self.cl.DeviceLoadDefaultParameters(self.handle)
|
||||
if err:
|
||||
@ -124,7 +125,7 @@ class camera_pe():
|
||||
:return: ret , img, point_map
|
||||
'''
|
||||
if self.caminit_isok == False or self.event.IsOffline():
|
||||
return 0, None, None
|
||||
return 0, None, None, None
|
||||
else:
|
||||
image_list = self.cl.DeviceStreamRead(self.handle, 2000)
|
||||
if len(image_list) == 2:
|
||||
@ -140,7 +141,7 @@ class camera_pe():
|
||||
|
||||
self.cl.DeviceStreamDepthRender(self.img_registration_depth, self.img_registration_render)
|
||||
mat_depth_render = self.img_registration_render.as_nparray()
|
||||
self.cl.DeviceStreamMapDepthImageToPoint3D(self.img_registration_depth, self.depth_calib_data, self.scale_unit,
|
||||
self.cl.DeviceStreamMapDepthImageToPoint3D(self.img_registration_depth, self.color_calib_data, self.scale_unit,
|
||||
self.pointcloud_data_arr)
|
||||
p3d_nparray = self.pointcloud_data_arr.as_nparray()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user