Initial ray generation and dataset code (#12)

* ray generator and cameras structure progress

* test renames

* added pass

* conflicts

* fixing some black errors

* reformated files

* merged master and .gitignore

* fixing linting

* removing old folder

* removed return False

* pylint fixes

* update

* updates

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update
This commit is contained in:
Ethan Weber authored and GitHub committed 2022-04-12 15:08:16 -07:00
1 parent 1995afda57
commit 0b7dfcdc5d
21 files changed
+652 -139

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import torch
from mattport.structures.cameras import PinholeCamera
from mattport.structures.rays import RayBundle, CameraRayBundle
def test_pinhole_camera():
pinhole_camera = PinholeCamera(cx=400.0, cy=400.0, fx=10.0, fy=10.0)
camera_ray_bundle = pinhole_camera.generate_camera_rays()
assert isinstance(camera_ray_bundle, CameraRayBundle)
assert torch.allclose(camera_ray_bundle.origins[0], torch.tensor([0.0, 0.0, 0.0]))
# assert False