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 can I get the actual depth value of each pixel by the 3-channel depth map? #8

Open
TmzComeLearn opened this issue Jun 19, 2019 · 1 comment

Comments

@TmzComeLearn
Copy link

What is the relationship between the pixel value of the depth map(3 channels) and the actual depth value? How do I get it from depth maps? Thank you!

@art-programmer
Copy link
Contributor

If you are referring the groundtruth depth map from ScanNet, you could use something like this,

depth = cv2.imread(depthPath, -1).astype(np.float32) / self.depthShift

As for the output visualization, it's generated here,

cv2.imwrite(options.test_dir + '/' + str(indexOffset) + '_depth' + suffix + prediction_suffix + '.png', drawDepthImage(depth_pred[80:560]))

The input to the drawDepthImage function is the absolute depth map.

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

2 participants