【发布时间】:2021-04-24 07:14:35
【问题描述】:
我试图了解如何从从 iphone 11 pro (python) 获得的深度图中获取点云。我尝试使用在线 exif 工具获取内在矩阵。
Intrinsic_Matrix = [[3131.580078125, 0.0, 0.0], [0.0, 3131.580078125, 0.0], [1505.6236572265625, 2004.1282958984375, 1]]
我目前有一张在 1-255 之间变化的灰度图像,代表深度。我想获取深度坐标(以米为单位)。
对不起,我对这个主题只有一些基础知识,任何帮助将不胜感激。 以下是我尝试但失败的代码。
img_depth = cv2.imread('Images/image_depth11.jpg')
h, w ,c = img_rgb.shape
new_img = img_depth[:, :, 0] # single channel
hd, wd = new_img.shape
#imC = cv2.applyColorMap(img_depth, cv2.COLORMAP_JET)
# intrinsic matrix iphone 11 Pro
Matrix = [[3131.580078125, 0.0, 0.0], [0.0, 3131.580078125, 0.0], [1505.6236572265625, 2004.1282958984375, 1]]
focalX = float(wd) * (Matrix[0][0] / wd)
focalY = float(hd) * (Matrix[1][1] / hd)
principalPointX = float(wd) * (Matrix[2][0] / wd)
principalPointY = float(hd) * (Matrix[2][1] / hd)
distance ( z direction) = 1/Z ( ie , 1/255 ??)
谢谢 尼特
【问题讨论】: