mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 04:13:57 +08:00
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:
1 parent
1995afda57
commit
0b7dfcdc5d
21 files changed
+652
-139
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user