Camera Extrinsics Optimization (#610)

* init commit.

* cleanup.

* docstring cleanup.
This commit is contained in:
Alexander Kristoffersen authored and GitHub committed 2022-10-02 17:56:25 -07:00
1 parent c20fed83bb
commit 60bf31844f
8 files changed
+247 -16

No files matched your search

@@ -67,9 +67,10 @@ class SceneContraction(SpatialDistortion):
def contract(x):
mag = torch.linalg.norm(x, ord=self.order, dim=-1)
mask = mag >= 1
x[mask] = (2 - (1 / mag[mask][..., None])) * (x[mask] / mag[mask][..., None])
x_new = x.clone()
x_new[mask] = (2 - (1 / mag[mask][..., None])) * (x[mask] / mag[mask][..., None])
return x
return x_new
if isinstance(positions, Gaussians):
means = contract(positions.mean.clone())