mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-04-30 02:28:56 +08:00
Amend D38407094: Fisheye Camera for PyTorch3D
Summary: Amend FisheyeCamera by adding tests for all combination of params and for different batch_sizes. Reviewed By: kjchalup Differential Revision: D39176747 fbshipit-source-id: 830d30da24beeb2f0df52db0b17a4303ed53b59c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d4a1051e0f
commit
b0515e1461
@@ -425,7 +425,7 @@ class FishEyeCameras(CamerasBase):
|
||||
# do Newton iterations to find xr_yr
|
||||
for _ in range(self.num_distortion_iters):
|
||||
# compute the estimated uvDistorted
|
||||
uv_distorted_est = xr_yr
|
||||
uv_distorted_est = xr_yr.clone()
|
||||
xr_yr_squared_norm = torch.pow(xr_yr, 2).sum(dim=-1, keepdim=True)
|
||||
|
||||
if self.use_tangential:
|
||||
@@ -479,7 +479,6 @@ class FishEyeCameras(CamerasBase):
|
||||
th: angle theta (in radians) of shape (...), E.g., (P), (1, P), (M, P)
|
||||
"""
|
||||
sh = list(th_radial_desired.shape)
|
||||
# th = th_radial_desired.clone()
|
||||
th = th_radial_desired
|
||||
c = torch.tensor(
|
||||
[2.0 * i + 3 for i in range(self.num_radial)], device=self.device
|
||||
@@ -552,7 +551,7 @@ class FishEyeCameras(CamerasBase):
|
||||
+ 2.0 * xr_yr[..., 0] * tangential_params[..., 0]
|
||||
)
|
||||
else:
|
||||
duv_distorted_dxryr = torch.eye(2).view(*sh, 2, 2).expand(*sh, 1, 1)
|
||||
duv_distorted_dxryr = torch.eye(2).repeat(*sh, 1, 1)
|
||||
|
||||
if self.use_thin_prism:
|
||||
temp1 = 2.0 * (
|
||||
|
||||
Reference in New Issue
Block a user