YvanYin/VNL_Monocular_Depth_Prediction

how to get the surface normal image

ITking666 opened this issue · 10 comments

Dear YvanYin:
I missed a problem when test your masterpiece,which is that i can't get surface normal image from depth image and RGB image ,would you please tell me how to get it.

Hi, I will try to find the code.
You can read this:
https://stackoverflow.com/questions/34644101/calculate-surface-normals-from-depth-image-using-neighboring-pixels-cross-produc
It is very helpful for you to understand how to recover surface normal. However, you should recover (x, y, z) for each pixel before calculating its surface normal

Thank you so much for your kind reply.
But I still want to konw how did you get the depth estimation results by Junjie Hu (Revisiting Single Image Depth Estimation: Toward Higher Resolution Maps With Accurate Object Boundaries) and convert these depth images to surface normal map .

Hi, can you send me an email, I can send you the code.

Thank you very much and my mails is 1474690467@qq.com

Thank you very much and my mails is 1474690467@qq.com

Hi,
I have tried to understand the link @YvanYin gives, but failed. Could you please send me the code too. My email is 407055993@qq.com. Looking forward to your reply and thank you very much.

@YvanYin Hi, the link you provide gives a good insight but is not directly applicable here as it doesn't take into account the camera parameters. As you suggested, the correct way should be to backproject each pixel into 3d xyz then calculate the normals. However I struggle to find an efficient and concise implementation... I'm also surprised that I cannot find any resource on google as it seems to be a common problem. Anyway, can you provide the code in this repo? Thank you.

Hi all, I will post my code for recovering the surface normal from the point cloud.

Please check /tools/recover_surface_normal.py.