kwea123 / nerf_pl

NeRF (Neural Radiance Fields) and NeRF in the Wild using pytorch-lightning
https://www.youtube.com/playlist?list=PLDV2CyUo4q-K02pNEyDr7DYpTQuka3mbV
MIT License
2.74k stars 483 forks source link

NERFW pose vs w2c #135

Closed YaroslavShchekaturov closed 2 years ago

YaroslavShchekaturov commented 2 years ago

Dear kwea123, Thank you for your hard work!

could you please clarify why do you multiply poses by -1 but dont do it for w2c matrix and after that you use w2c for nears/fars estimation? image image

SrinjaySarkar commented 2 years ago

I am not sure but I believe because that line of code changes the direction of the camera from up and back axis to down and front.

kwea123 commented 2 years ago

Answer from @SrinjaySarkar is correct. Btw, next time you can create a permanent link to a code snippet so that it's easier to see which part you have question.

YaroslavShchekaturov commented 2 years ago

I suppose that the answer is the following: when you multiply by -1 you change to the opencv convention to opengl convention where z points back. w2c are in opencv where z points to the fron so everything is correct when we calculate fars/nears.