初步接触slam,在做用cnn估计图片的深度的工作,发现在把估计出的dpthmap显示时,显示出的图片是全黑的:
depth,disparity = sess.run([model.depthmap_left,model.disparity_left[0]])
depth=depth.squeeze()
disparity=disparity.squeeze()
np.savetxt('./depthmap/{}.txt'.format(step),depth)
misc.imsave('./depthmap/{}.png'.format(step),depth)
np.savetxt('./dis/{}.txt'.format(step),disparity)
misc.imsave('./dis/{}.png'.format(step),disparity)
显示出的深度图
显示出的视差图
但是用np.savetxt('./depthmap/{}.txt'.format(step),depth)
读出的txt文件里深度值都挺大的,再用代码读depthmap的灰度值却又基本是0,两者完全不符合,它显示图片的原理是什么,为什么depthmap是全黑的呢?