MegaDepth
MegaDepth copied to clipboard
How did you extract Make3D depthmaps from the dataset?
Hi, First of all, thanks for the Paper & the Code.
The Make3D Dataset Has Two Parts : Images + Depths
The Depth part of the dataset is described by the ReadMe as :
Laser Range data with Ray PositionData Format: Position3DGrid (55x305x4)
Position3DGrid(:,:,1) is Vertical axis in meters (Y)
Position3DGrid(:,:,2) is Horizontal axis in meters (X)
Position3DGrid(:,:,3) is Projective Depths in meters (Z)
Position3DGrid(:,:,4) is Depths in meters (d)
The Images are in the shape of (2272, 1704, 3) BUT the Depths are in the shape of (55, 305, 4). By the way of its structure and ratios, one can tell that the Depth Data is not an image (55 x 305 != 2272 x 1704).
So then, how were you able to extract the depth maps? is there a code or a procedure which I've missed?
Thanks
have you known now?
不知道您的问题是否解决?我现在需要make3D数据集的真实深度图用以训练我的模型,但是官方提供的是.mat文件,尝试转换为图片格式后效果极差,或许向您说的根本无法转化为图像,也可能是我的转换方法不对?感谢您的指导!
I write a python code, which works
import cv2 import scipy.io as scio from PIL import Image import numpy as np import matplotlib.pyplot as plt import os
array_struct = scio.loadmat('/home/1.mat') #print(array_struct.keys()) data=array_struct['Position3DGrid'] #print(data.shape) image = data[:,:,3] image = image/80
resized_img = cv2.resize(image,(1704,2272)) plt.imsave(os.path.join("./", "1.jpg"), resized_img, cmap='rainbow')
@kebinpeng thanks but This does not work, the depth map I get after running this code is completely false, is there any other way to extract the depth map from Make3D dataset??