mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-08-02 03:42:50 +08:00
Update the docstring for try_get_projection_transform
Summary: Update the docstring for try_get_projection_transform on the API design. Reviewed By: kjchalup Differential Revision: D39227333 fbshipit-source-id: c9d0e625735d4972116d1f71865fb9b763e684de
This commit is contained in:
parent
84fa966643
commit
8a96770dc2
@ -6,7 +6,7 @@
|
||||
|
||||
import math
|
||||
import warnings
|
||||
from typing import List, Optional, Sequence, Tuple, Union
|
||||
from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
@ -1851,12 +1851,15 @@ def get_screen_to_ndc_transform(
|
||||
return transform
|
||||
|
||||
|
||||
def try_get_projection_transform(cameras: CamerasBase, kwargs) -> Optional[Transform3d]:
|
||||
def try_get_projection_transform(
|
||||
cameras: CamerasBase, cameras_kwargs: Dict[str, Any]
|
||||
) -> Optional[Transform3d]:
|
||||
"""
|
||||
Try block to get projection transform.
|
||||
Try block to get projection transform from cameras and cameras_kwargs.
|
||||
|
||||
Args:
|
||||
cameras instance, can be linear cameras or nonliear cameras
|
||||
cameras: cameras instance, can be linear cameras or nonliear cameras
|
||||
cameras_kwargs: camera parameters to be passed to cameras
|
||||
|
||||
Returns:
|
||||
If the camera implemented projection_transform, return the
|
||||
@ -1865,7 +1868,7 @@ def try_get_projection_transform(cameras: CamerasBase, kwargs) -> Optional[Trans
|
||||
|
||||
transform = None
|
||||
try:
|
||||
transform = cameras.get_projection_transform(**kwargs)
|
||||
transform = cameras.get_projection_transform(**cameras_kwargs)
|
||||
except NotImplementedError:
|
||||
pass
|
||||
return transform
|
||||
|
Loading…
x
Reference in New Issue
Block a user