pysdic.Camera.get_camera_rays#
- Camera.get_camera_rays(mask=None)[source]#
Get the camera rays emitted from the camera sensor to scene in the world coordinate system for each pixel.
The rays are computed from the normalized points of the camera.
If a mask is provided, it filters the rays based on the mask to select only the rays corresponding to the valid pixels.
- Parameters:
mask (Optional[
numpy.ndarray], optional) – A boolean mask to filter the rays. If None, all rays are returned. Default is None. Shape (\(H \times W\),) or (\(H\), \(W\)) where \(H\) is the height and \(W\) is the width of the camera sensor.- Returns:
numpy.ndarray– A 2D array of shape (\(N_p\), 3) representing the origins of the rays in world coordinate system.numpy.ndarray– A 2D array of shape (\(N_p\), 3) representing the directions of the rays in world coordinate system.
- Return type: