import numpy as np
import matplotlib.pyplot as plt
import h5py
f = h5py.File('depth.h5','r')
depth = f['test2.jpg'][:].T
im_gray = depth
plt.subplot(221)
plt.imshow(im_gray)
plt.subplot(222)
plt.imshow(im_gray, cmap = 'gray')
plt.subplot(223)
plt.imshow(im_gray, cmap = plt.cm.gray)
plt.subplot(224)
plt.imshow(im_gray, cmap = plt.cm.gray_r)
plt.show()
二维数组转深度图
最新推荐文章于 2022-04-21 20:37:56 发布