Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How did you extract Make3D depthmaps from the dataset? #24

Open
Neltherion opened this issue Dec 16, 2018 · 4 comments
Open

How did you extract Make3D depthmaps from the dataset? #24

Neltherion opened this issue Dec 16, 2018 · 4 comments

Comments

@Neltherion
Copy link

Neltherion commented Dec 16, 2018

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

@ylhua
Copy link

ylhua commented Feb 21, 2019

have you known now?

@zwtpro-nb-puls
Copy link

不知道您的问题是否解决?我现在需要make3D数据集的真实深度图用以训练我的模型,但是官方提供的是.mat文件,尝试转换为图片格式后效果极差,或许向您说的根本无法转化为图像,也可能是我的转换方法不对?感谢您的指导!

@baoguoma
Copy link

baoguoma commented Mar 14, 2021

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')

@saqibnaziir
Copy link

@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??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants