mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-24 00:26:08 +08:00
Image dataset implemented and ray generation working. (#23)
* working data loader code * adding gitignore * fixing linting errors * set black line length in settings file * update * fixed filepath * black format * tqdm
This commit is contained in:
1 parent
9bc83b0ed2
commit
e38040ee4d
23 files changed
+529
-277
No files matched your search
@@ -1,12 +1,16 @@
|
||||
"""
|
||||
Test the camera classes.
|
||||
"""
|
||||
|
||||
import torch
|
||||
|
||||
from mattport.structures.cameras import PinholeCamera
|
||||
from mattport.structures.rays import RayBundle, CameraRayBundle
|
||||
from mattport.structures.rays import CameraRayBundle
|
||||
|
||||
|
||||
def test_pinhole_camera():
|
||||
"""Test that the pinhole camera model works."""
|
||||
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