About instant-ngp depth
Miaowei-HNU opened this issue · 12 comments
Miaowei-HNU commented
Hi,Can you provide me with the code snippet to capture the depth, I'm having trouble with instant-ngp! help @fabiotosi92
fabiotosi92 commented
Hi! In the original code of Instant-Ngp, you simply need to set testbed.render_mode
to ngp.Depth
.
Miaowei-HNU commented
fabiotosi92 commented
Are you saving it as np.uint16
? I believe the issue might be related to how you are saving the image.
Miaowei-HNU commented
fabiotosi92 commented
Try to visualize it using matplotlib. Let me know
Miaowei-HNU commented
fabiotosi92 commented
Consider to use the first channel -> depth[:,:,0]
Miaowei-HNU commented
fabiotosi92 commented
disparity = focal* args.baseline / image
disparity[np.isinf(disparity)] = 0
disparity[np.isnan(disparity)] = 0
plt.imsave(outname, disparity[:,:,0], cmap="magma")
Miaowei-HNU commented
disparity = focal* args.baseline / image disparity[np.isinf(disparity)] = 0 disparity[np.isnan(disparity)] = 0 plt.imsave(outname, disparity[:,:,0], cmap="magma")
Oh, have you try to visualize the depth map, I'm using dataset0000, I'll try to visualize the disparity map.
Miaowei-HNU commented
3x5c2 commented
hi @Miaowei-HNU ,also i am troubled in capture the depth can u show me the code