Documentation Index
Fetch the complete documentation index at: https://docs.generalrobotics.dev/llms.txt
Use this file to discover all available pages before exploring further.
RealsenseCamera
Inherits from: Camera
No class docstring.
Inherited methods
- From
Camera: getData, setCameraIntrinsics, getCameraSettings, setCameraSettings
init
RealsenseCamera.__init__() -> None
No docstring provided.
init_camera
RealsenseCamera.init_camera() -> None
Initialize the RealSense camera
cleanup
RealsenseCamera.cleanup() -> None
Properly cleanup the camera resources
getImage
RealsenseCamera.getImage(image_type: str | None = None) -> Image
Get image from RealSense camera
type of image to retrieve (“rgb”, “depth”, “infrared”). Defaults to rgb.
requested image as numpy array
getStereoImagePair
RealsenseCamera.getStereoImagePair() -> tuple
Get the left and right infrared images, which can be used for stereo vision.
getAllImages
RealsenseCamera.getAllImages() -> tuple
Get all images from RealSense camera (RGB, Depth, and IR), aligned to RGB
(rgb_image, depth_image, ir_image) as Images
getCameraIntrinsics
RealsenseCamera.getCameraIntrinsics() -> dict
Get all camera intrinsic parameters, including the focal length and centerpoint,
distortion_coefficients, distortion model, image size, etc.
getCameraMatrix
RealsenseCamera.getCameraMatrix(image_type: str = None) -> np.ndarray
Get the camera matrix K as a numpy array of shape (3, 3)
K = [[fx, 0, cx], [0, fy, cy], [0, 0, 1]]
str, Describes which camera sensor to get the matrix for. Valid values are: - “color” or “rgb” or None: the color camera (default) - “left” or “infrared”: the left infrared camera - “right”: the right infrared camera
getDistortionCoefficients
RealsenseCamera.getDistortionCoefficients() -> np.ndarray
Get distortion coefficients as a numpy array of shape (5,)
getExtrinsics
RealsenseCamera.getExtrinsics(source_image_frame: str, target_image_frame: str) -> np.ndarray
Get the transform of the target sensor frame with respect to the source sensor frame as a 4x4 homogeneous transformation matrix (np.ndarray)
This transform transforms a 3D point (in meters) from the source frame to the target frame.
the frame of the source sensor. Valid values are ‘color’, ‘rgb’, ‘left’, ‘right’
the frame of the target sensor. Valid values are ‘color’, ‘rgb’, ‘left’, ‘right’
4x4 homogeneous transformation matrix