mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-26 10:59:53 +08:00
Camera Extrinsics Optimization (#610)
* init commit. * cleanup. * docstring cleanup.
This commit is contained in:
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())
|
||||
|
||||
Reference in new issue
Block a user