blendify.cameras package#
Submodules#
blendify.cameras.base module#
- class blendify.cameras.base.Camera(resolution: Union[ndarray, Tuple[int, int]], near: float = 0.1, far: float = 100, tag: str = 'camera', **kwargs)[source]#
Bases:
Positionable
Base class for PerspectiveCamera and OrthographicCamera, implementing shared functionality
- property blender_camera: Object#
- abstract distance2depth(distmap: ndarray) ndarray [source]#
Convert map of camera ray lengths (distmap) to map of distances to image plane (depthmap)
- Parameters:
distmap (np.ndarray) – Distance map
- Returns:
Depth map
- Return type:
np.ndarray
- property far: float#
- property near: float#
- property resolution: ndarray#
blendify.cameras.common module#
- class blendify.cameras.common.OrthographicCamera(ortho_scale: float = 1.0, **kwargs)[source]#
Bases:
Camera
- distance2depth(distmap: ndarray) ndarray [source]#
Convert map of camera ray lengths (distmap) to map of distances to image plane (depthmap)
- Parameters:
distmap (np.ndarray) – Distance map
- Returns:
Depth map
- Return type:
np.ndarray
- property ortho_scale: float#
- class blendify.cameras.common.PerspectiveCamera(focal_dist: Optional[float] = None, fov_x: Optional[float] = None, fov_y: Optional[float] = None, center: Optional[Union[ndarray, Tuple[float, float]]] = None, **kwargs)[source]#
Bases:
Camera
- property center: ndarray#
- distance2depth(distmap: ndarray) ndarray [source]#
Convert map of camera ray lengths (distmap) to map of distances to image plane (depthmap)
- Parameters:
distmap (np.ndarray) – Distance map
- Returns:
Depth map
- Return type:
np.ndarray
- property focal_dist#
- property fov_x#
- property fov_y#