Depth2HHA-python icon indicating copy to clipboard operation
Depth2HHA-python copied to clipboard

What if I don't have the Depth Image?

Open briankim0825 opened this issue 4 years ago • 4 comments

I'm trying to make a HHA image for other datasets that doesn't provide improved depth images such as SUNRGB-D, only raw ones. Can I get a recommendation of inpainting codes for improving raw Depth Image?

I also would like to ask would the result be far different if I use a raw depth image as an improved depth image to make a HHA image.

Thanks.

briankim0825 avatar Jan 04 '22 01:01 briankim0825

The NYUDv2 toolkit has a matlab script that has an inpainting algorithm based on the colorization approach of Levin, here: https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html

I have code in my github (can't remember the source tbh, not written by me) that has a python script of this approach. https://github.com/JamesMcCullochDickens/CSI5340Project/blob/main/InPainting.py

There are probably much better/modern depth inpainting algorithms however, but if you are satisfied with this approach, not a bad place to start.

As for whether the HHA would be better with raw depth or improved depth, you can see in the SUN RGBD dataset the difference is pretty substantial imo.

JamesMcCullochDickens avatar Jan 04 '22 01:01 JamesMcCullochDickens

For a more modern approach, see here: https://github.com/ZJULearning/depthInpainting

JamesMcCullochDickens avatar Jan 04 '22 01:01 JamesMcCullochDickens

The python file worked for me. Thanks a lot.

briankim0825 avatar Jan 05 '22 07:01 briankim0825

@briankim0825 I should add that the script is quite slow, and that if you want to make it faster you can either run it in matlab (the original NYUDv2 one), or if you don't have matlab you could re-write it in C++, since I believe its the loop that is the main problem, and I pretty much guarantee you will see huge speedups, only relevant really if you have lots of files. I should probably add a multi-threading/multi-processing component to it as well... will do eventually.

JamesMcCullochDickens avatar Jan 05 '22 17:01 JamesMcCullochDickens