in the cameras.md documentation you specify that the Pytorch3d coord. convention defines the screen space (0,0) as the top left corner of the top left pixel. From what I understand the OpenCV coord. convention defines the (0,0) as the center of the top left pixel (unless i am mistaken here).
This implies that an offset of 0.5 pixels should be applied when converting from one space to the other, however the function pytorch3d.renderer.camera_conversions._cameras_from_opencv_projection does not do this (as far as I can tell).
I think the fix should be adding 0.5 to the principal point before shifting and scaling to ndc.
in the
cameras.md
documentation you specify that the Pytorch3d coord. convention defines the screen space (0,0) as the top left corner of the top left pixel. From what I understand the OpenCV coord. convention defines the (0,0) as the center of the top left pixel (unless i am mistaken here).This implies that an offset of 0.5 pixels should be applied when converting from one space to the other, however the function
pytorch3d.renderer.camera_conversions._cameras_from_opencv_projection
does not do this (as far as I can tell).I think the fix should be adding 0.5 to the principal point before shifting and scaling to ndc.