File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -283,9 +283,9 @@ def inverse_projection(
283
283
pts : torch .Tensor ,
284
284
):
285
285
"""Backproject points in pixel plane (2D) onto the image plane in world coordinates (3D)."""
286
- # pts = pts.flip(-1)
286
+ pts [..., 1 ] = self . detector . height - pts [..., 1 ]
287
287
if self .detector .reverse_x_axis :
288
- pts [..., 1 ] = self .detector .width - pts [..., 1 ]
288
+ pts [..., 0 ] = self .detector .width - pts [..., 0 ]
289
289
x = self .detector .sdd * torch .einsum (
290
290
"ij, bnj -> bni" ,
291
291
self .detector .intrinsic .inverse (),
Original file line number Diff line number Diff line change 434
434
" pts: torch.Tensor,\n " ,
435
435
" ):\n " ,
436
436
" \"\"\" Backproject points in pixel plane (2D) onto the image plane in world coordinates (3D).\"\"\"\n " ,
437
- " # pts = pts.flip(-1) \n " ,
437
+ " pts[..., 1] = self.detector.height - pts[..., 1] \n " ,
438
438
" if self.detector.reverse_x_axis:\n " ,
439
- " pts[..., 1 ] = self.detector.width - pts[..., 1 ]\n " ,
439
+ " pts[..., 0 ] = self.detector.width - pts[..., 0 ]\n " ,
440
440
" x = self.detector.sdd * torch.einsum(\n " ,
441
441
" \" ij, bnj -> bni\" ,\n " ,
442
442
" self.detector.intrinsic.inverse(),\n " ,
You can’t perform that action at this time.
0 commit comments