这种情况大概率是d435相机的硬件出了问题或者更换过,我在github上发现同样的问题,但是经过了三四年也没有解决,我问了淘宝intel客服,他给出的建议是使用OEM设备来标定,而且还要在他们实验室场景下做,买他们的设备不如买一个新的相机划算。
这种情况只能手动测出相机的内外参,来使用,使用方法大致如下
pipe = rs.pipeline()
cfg = rs.config()
cfg.enable_stream(rs.stream.depth,640,480,rs.format.z16,30)
cfg.enable_stream(rs.stream.color,640,480,rs.format.bgr8,30)
cfg.enable_stream(rs.stream.infrared,1,640,480,rs.format.y8,30)
profile = pipe.start(cfg)
depth_profile = profile.get_stream(rs.stream.depth)
color_profile = profile.get_stream(rs.stream.color)
depth_intr = depth_profile.as_video_stream_profile().get_intrinsics()
color_intr = color_profile.as_video_stream_profile().get_intrinsics()
extrinsics_depth_to_color = depth_profile.get_extrinsics_to(color_profile)
#print(color_intr)
color_intr.fx=np.array(5.990818971121990e+02)
color_intr.fy=np.array(6.007770207896575e+02)
color_intr.ppx=np.array(3.360454215338955e+02)
color_intr.ppy=np.array(2.400705427417924e+02)
#print(color_intr)
depth_intr.fx=np.array(3.904567900216258e+02)
depth_intr.fy=np.array(3.913375769950008e+02)
depth_intr.ppx=np.array(3.237127035243132e+02)
depth_intr.ppy=np.array(2.377210640958379e+02)
#print(depth_intr)
extrinsics_depth_to_color.rotation=np.array([ 0.99925857, 0.00553705 , 0.03810057,
-0.00437968 , 0.99952842 ,-0.03039341,
-0.03825089 , 0.030204 , 0.99881159])
extrinsics_depth_to_color.translation=np.array([0.024382348683330505, -0.008719076611654965, -0.003561121659189037])