ankurhanda / gvnn

gvnn: Geometric Vision with Neural Networks
445 stars 71 forks source link

How to rotate image of 3D object? #6

Closed foelin closed 7 years ago

foelin commented 8 years ago

In Transform3DPoints_R and Transform3DPoints_Rt, all Z coordinates are set to 1... In this setting, it assumes all the image pixles lie on a plane in 3D space, thus these layers can only deal with image of planar scenes, right?

If I want to rotate an image of a 3D object/scene, there should be some way to feed these layers with depth of each coordinate....so , can you give an example to explain how to do this?

Thanks..

ankurhanda commented 8 years ago

Yes, that's what the forward pass expects - Look here https://github.com/ankurhanda/gvnn/blob/master/Transform3DPoints_Rt.lua#L73-L104 It needs a depth image and also look into the SE3 section in the README.md file.

ankurhanda commented 8 years ago

for rotation an object in 3D you don't need depth anyway. you only need K * R * K^{-1} matrix

foelin commented 8 years ago

Thanks for the quick reply! Understood!