mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 14:20:38 +08:00
camera refactoring
Summary: Refactor cameras * CamerasBase was enhanced with `transform_points_screen` that transforms projected points from NDC to screen space * OpenGLPerspective, OpenGLOrthographic -> FoVPerspective, FoVOrthographic * SfMPerspective, SfMOrthographic -> Perspective, Orthographic * PerspectiveCamera can optionally be constructred with screen space parameters * Note on Cameras and coordinate systems was added Reviewed By: nikhilaravi Differential Revision: D23168525 fbshipit-source-id: dd138e2b2cc7e0e0d9f34c45b8251c01266a2063
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9242e7e65d
commit
57a22e7306
@@ -12,7 +12,7 @@ from common_testing import TestCaseMixin, load_rgb_image
|
||||
from PIL import Image
|
||||
from pytorch3d.datasets import ShapeNetCore, collate_batched_meshes
|
||||
from pytorch3d.renderer import (
|
||||
OpenGLPerspectiveCameras,
|
||||
FoVPerspectiveCameras,
|
||||
PointLights,
|
||||
RasterizationSettings,
|
||||
look_at_view_transform,
|
||||
@@ -174,7 +174,7 @@ class TestShapenetCore(TestCaseMixin, unittest.TestCase):
|
||||
|
||||
# Rendering settings.
|
||||
R, T = look_at_view_transform(1.0, 1.0, 90)
|
||||
cameras = OpenGLPerspectiveCameras(R=R, T=T, device=device)
|
||||
cameras = FoVPerspectiveCameras(R=R, T=T, device=device)
|
||||
raster_settings = RasterizationSettings(image_size=512)
|
||||
lights = PointLights(
|
||||
location=torch.tensor([0.0, 1.0, -2.0], device=device)[None],
|
||||
|
||||
Reference in New Issue
Block a user