depth module
Code for handling the Intel RealSense Depth Camera.
Please see /usr/local/bin/rs-enumerate-devices
for compatible depth camera stream arguments.
- depth.check_temperature(depth_sensor)
- Parameters
depth_sensor – Depth Camera to be checked.
Checks the projector, and the Asic, temperatures to see if the depth camera is overheating.
- Returns
boolean indicating whether the camera is overheating.
- depth.combined_stream(colour_map, depth_scale=0.1, alpha=0.6, width=640, height=360, fps=60, image_scale=2)
- Parameters
color_map – OpenCV colour mapping.
depth_scale – Scaling factor to use on the depth data.
alpha – Transparancy value to use when blending streams.
width – The width, in pixels, of the combined streams to use.
height – The height, in pixels, of the combined streams to use.
fps – Average frames-per-second to capture both depth camera streams.
image_scale – Scaling factor for the window.
Creates a window and displays a blend of the video and depth streams within it.
see : OpenCV colour mappings
- depth.create_event_handlers(stream, args)
- Parameters
stream – A stream function to execute in (depth_strea,combined_stream).
args – A tuple of arguments for the stream.
Creates a pair of event handlers :
One opens a window displaying the stream from the depth camera,
the other closes that window and shuts down the depth camera.
- depth.depth_stream(colour_map, scale_factor=0.1, width=1280, height=720, fps=30)
- Parameters
color_map – OpenCV colour mapping.
scale_factor – Depth scaling factor to use.
width – The width, in pixels, of the depth stream to use.
height – The height, in pixels, of the depth stream to use.
fps – Average frames-per-second to capture with the depth camera.
Creates a window and displays the depth stream within it.
see : OpenCV colour mappings
- depth.shutdown_temp = 45
The temperature at which to shutdown the RealSense camera.
- depth.warn_temp = 40
The temperature at which to warn about the projector, or the Asic, temperature.