pyrealsense2.config

class pyrealsense2.config

The config allows pipeline users to request filters for the pipeline streams and device selection and configuration. This is an optional step in pipeline creation, as the pipeline resolves its streaming device internally. Config provides its users a way to set the filters and test if there is no conflict with the pipeline requirements from the device. It also allows the user to find a matching device for the config filters and the pipeline, in order to select a device explicitly, and modify its controls before streaming starts.

__init__(self: pyrealsense2.config) → None

Methods

__init__((self: pyrealsense2.config) -> None)
can_resolve((self: pyrealsense2.config, ...) Check if the config can resolve the configuration filters, to find a matching device and streams profiles.
disable_all_streams(...) Disable all device stream explicitly, to remove any requests on the streams profiles.
disable_stream((self: pyrealsense2.config, ...) Disable a device stream explicitly, to remove any requests on this stream profile.
enable_all_streams(...) Enable all device streams explicitly.
enable_device((self: pyrealsense2.config, ...) Select a specific device explicitly by its serial number, to be used by the pipeline.
enable_device_from_file(...) Select a recorded device from a file, to be used by the pipeline through playback.
enable_record_to_file(...) Requires that the resolved device would be recorded to file.
enable_stream(*args, **kwargs) Overloaded function.
resolve((self: pyrealsense2.config, ...) Resolve the configuration filters, to find a matching device and streams profiles.
can_resolve(self: pyrealsense2.config, p: pyrealsense2.pipeline_wrapper) → bool

Check if the config can resolve the configuration filters, to find a matching device and streams profiles. The resolution conditions are as described in resolve().

disable_all_streams(self: pyrealsense2.config) → None

Disable all device stream explicitly, to remove any requests on the streams profiles. The streams can still be enabled due to pipeline computer vision module request. This call removes any filter on the streams configuration.

disable_stream(self: pyrealsense2.config, stream: pyrealsense2.stream, index: int=-1) → None

Disable a device stream explicitly, to remove any requests on this stream profile. The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the stream configuration.

enable_all_streams(self: pyrealsense2.config) → None

Enable all device streams explicitly. The conditions and behavior of this method are similar to those of enable_stream(). This filter enables all raw streams of the selected device. The device is either selected explicitly by the application, or by the pipeline requirements or default. The list of streams is device dependent.

enable_device(self: pyrealsense2.config, serial: str) → None

Select a specific device explicitly by its serial number, to be used by the pipeline. The conditions and behavior of this method are similar to those of enable_stream(). This method is required if the application needs to set device or sensor settings prior to pipeline streaming, to enforce the pipeline to use the configured device.

enable_device_from_file(self: pyrealsense2.config, file_name: str, repeat_playback: bool=True) → None

Select a recorded device from a file, to be used by the pipeline through playback. The device available streams are as recorded to the file, and resolve() considers only this device and configuration as available. This request cannot be used if enable_record_to_file() is called for the current config, and vice versa.

enable_record_to_file(self: pyrealsense2.config, file_name: str) → None

Requires that the resolved device would be recorded to file. This request cannot be used if enable_device_from_file() is called for the current config, and vice versa as available.

enable_stream(*args, **kwargs)

Overloaded function.

  1. enable_stream(self: pyrealsense2.config, stream_type: pyrealsense2.stream, stream_index: int, width: int, height: int, format: pyrealsense2.format=format.any, framerate: int=0) -> None

Enable a device stream explicitly, with selected stream parameters. The method allows the application to request a stream with specific configuration. If no stream is explicitly enabled, the pipeline configures the device and its streams according to the attached computer vision modules and processing blocks requirements, or default configuration for the first available device. The application can configure any of the input stream parameters according to its requirement, or set to 0 for don’t care value. The config accumulates the application calls for enable configuration methods, until the configuration is applied. Multiple enable stream calls for the same stream override each other, and the last call is maintained. Upon calling resolve(), the config checks for conflicts between the application configuration requests and the attached computer vision modules and processing blocks requirements, and fails if conflicts are found. Before resolve() is called, no conflict check is done.

  1. enable_stream(self: pyrealsense2.config, stream_type: pyrealsense2.stream, stream_index: int=-1) -> None

Stream type and possibly also stream index. Other parameters are resolved internally.

  1. enable_stream(self: pyrealsense2.config, stream_type: pyrealsense2.stream, format: pyrealsense2.format, framerate: int=0) -> None

Stream type and format, and possibly frame rate. Other parameters are resolved internally.

  1. enable_stream(self: pyrealsense2.config, stream_type: pyrealsense2.stream, width: int, height: int, format: pyrealsense2.format=format.any, framerate: int=0) -> None

Stream type and resolution, and possibly format and frame rate. Other parameters are resolved internally.

  1. enable_stream(self: pyrealsense2.config, stream_type: pyrealsense2.stream, stream_index: int, format: pyrealsense2.format, framerate: int=0) -> None

Stream type, index, and format, and possibly framerate. Other parameters are resolved internally.

resolve(self: pyrealsense2.config, p: pyrealsense2.pipeline_wrapper) → pyrealsense2.pipeline_profile

Resolve the configuration filters, to find a matching device and streams profiles. The method resolves the user configuration filters for the device and streams, and combines them with the requirements of the computer vision modules and processing blocks attached to the pipeline. If there are no conflicts of requests, it looks for an available device, which can satisfy all requests, and selects the first matching streams configuration. In the absence of any request, the config object selects the first available device and the first color and depth streams configuration.The pipeline profile selection during start() follows the same method. Thus, the selected profile is the same, if no change occurs to the available devices.Resolving the pipeline configuration provides the application access to the pipeline selected device for advanced control.The returned configuration is not applied to the device, so the application doesn’t own the device sensors. However, the application can call enable_device(), to enforce the device returned by this method is selected by pipeline start(), and configure the device and sensors options or extensions before streaming starts.