pysdic.Camera.get_camera_rays#
- Camera.get_camera_rays(mask=None, *, distortion_kwargs=None)[source]#
Get the camera rays emitted from the camera sensor to the scene in the world coordinate system for each pixel.
The rays are computed from the cached normalized points of the camera (see
get_camera_normalized_points()) with thecompute_raysmethod of the extrinsic transformation.- Parameters:
mask (Optional[ArrayLike], optional (default:
None)) – A boolean mask to filter the rays, with shape \((H \times W,)\) or \((H, W)\) where \(H\) and \(W\) are the height and width of the camera sensor. If None, all rays are returned.distortion_kwargs (Optional[Dict[str, Any]], optional (default:
None)) – Additional keyword arguments passed to theinvertmethod of the distortion transformation.
- Returns:
The rays (origins and directions) in the world coordinate system, with batch shape \((N_p,)\).
- Return type:
- Raises:
ValueError – If the world points of the camera are not 3D.