Intel Realsense D435 python wrapper pyrealsense.pipeline类

pipeline.py

# encoding: utf-8
# module pyrealsense2.pyrealsense2
# from D:\Yolov3_Tensorflow\python\lib\site-packages\pyrealsense2\pyrealsense2.cp36-win_amd64.pyd
# by generator 1.147
"""
LibrealsenseTM Python Bindings((书籍的) 封皮)
        ==============================
        Library for accessing Intel RealSenseTM cameras(用于访问英特尔实感TM摄像头的库)
"""

# imports
import pybind11_builtins as __pybind11_builtins


class pipeline(__pybind11_builtins.pybind11_object):
    """
    The pipeline simplifies the user interaction with the device and computer vision processing modules.
    The class abstracts the camera configuration and streaming, and the vision modules triggering and threading.
    It lets the application focus on the computer vision output of the modules, or the device output data.
    The pipeline can manage computer vision modules, which are implemented as a processing blocks.
    The pipeline is the consumer of the processing block interface, while the application consumes the computer vision interface.
    (管道简化了用户与设备和计算机视觉处理模块的交互。
     该类抽象了相机配置和流,以及视觉模块触发和线程化。
     它使应用程序可以专注于模块的计算机视觉输出或设备输出数据。
     管道可以管理计算机视觉模块,这些模块被实现为处理模块。
     管道是处理块接口的使用者,而应用程序则使用计算机视觉接口。)
    """
    def get_active_profile(self): # real signature unknown; restored from __doc__
        """ get_active_profile(self: pyrealsense2.pyrealsense2.pipeline) -> pyrealsense2.pyrealsense2.pipeline_profile """
        # 获得活跃的摄像头资料?
        pass

    def poll_for_frames(self): # real signature unknown; restored from __doc__
        """
        poll_for_frames(self: pyrealsense2.pyrealsense2.pipeline) -> pyrealsense2.pyrealsense2.composite_frame
        
        Check if a new set of frames is available and retrieve the latest undelivered set.
        The frames set includes time-synchronized frames of each enabled stream in the pipeline.
        The method returns without blocking the calling thread, with status of new frames available or not.
        If available, it fetches the latest frames set.
        Device frames, which were produced while the function wasn't called, are dropped.
        To avoid frame drops, this method should be called as fast as the device frame rate.
        The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following calls to this method shall return no new frames, until resources become available.
        (检查是否有新的帧集并检索最新的未交付的帧。
         帧集包括管道中每个已启用流的时间同步帧。
         该方法返回时不会阻塞调用线程,无论是否有新帧的状态。
         如果可用,它将获取最新的帧集。
         未调用函数时生成的设备帧将被丢弃。
         为避免丢帧,应以与设备帧速率一样快的速度调用此方法。
         应用程序可以保证帧操作器以延迟处理。 但是,如果应用程序的历史记录过长,则设备可能会缺少产生新帧的内存资源,并且对此方法的以下调用将不返回任何新帧,直到资源可用为止。)
        """
        pass

    def start(self, *args, **kwargs): # real signature unknown; restored from __doc__
        """
        start(*args, **kwargs)
        Overloaded function.
        
        1. start(self: pyrealsense2.pyrealsense2.pipeline) -> pyrealsense2.pyrealsense2.pipeline_profile
        
        Start the pipeline streaming with its default configuration.
        The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model.
        During the loop execution, the application can access the camera streams by calling wait_for_frames() or poll_for_frames().
        The streaming loop runs until the pipeline is stopped.
        Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
        (使用默认配置启动流式传输。
         流水线循环从设备捕获样本,然后根据每个模块的要求和线程模型,将它们传递到连接的计算机视觉模块和处理模块。
         在循环执行期间,应用程序可以通过调用wait_for_frames()或poll_for_frames()来访问摄像机流。
         流循环一直运行到管道停止为止。
         仅在未启动时才可以启动管道。 如果已经启动了管道,则会引发异常。)
        
        2. start(self: pyrealsense2.pyrealsense2.pipeline, config: pyrealsense2.pyrealsense2.config) -> pyrealsense2.pyrealsense2.pipeline_profile
        
        Start the pipeline streaming according to the configuraion.
        The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules and processing blocks, according to each module requirements and threading model.
        During the loop execution, the application can access the camera streams by calling wait_for_frames() or poll_for_frames().
        The streaming loop runs until the pipeline is stopped.
        Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
        The pipeline selects and activates the device upon start, according to configuration or a default configuration.
        When the rs2::config is provided to the method, the pipeline tries to activate the config resolve() result.
        If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails.
        Available configurations and devices may change between config resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.
        (根据配置启动流传输。
        流水线循环从设备捕获样本,然后根据每个模块的要求和线程模型,将它们传递到连接的计算机视觉模块和处理模块。
        在循环执行期间,应用程序可以通过调用wait_for_frames()或poll_for_frames()来访问摄像机流。
        流循环一直运行到管道停止为止。
        仅在未启动时才可以启动管道。如果启动了管道,则会引发异常。
        管道根据配置或默认配置在启动时选择并激活设备。
        当向方法提供rs2 :: config时,管道将尝试激活config resolve()结果。
        如果应用程序请求与管道计算机视觉模块冲突,或者平台上没有可用的匹配设备,则该方法失败。
        如果设备连接或断开连接,或者另一个应用程序获得了设备的所有权,则可用的配置和设备可能会在config resolve()调用与管道启动之间改变。)
        
        3. start(self: pyrealsense2.pyrealsense2.pipeline, callback: Callable[[pyrealsense2.pyrealsense2.frame], None]) -> pyrealsense2.pyrealsense2.pipeline_profile
        
        Start the pipeline streaming with its default configuration.
        The pipeline captures samples from the device, and delivers them to the provided frame callback.
        Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
        When starting the pipeline with a callback both wait_for_frames() and poll_for_frames() will throw exception.
        (使用默认配置启动流式传输。
         管道从设备捕获样本,并将其传递到提供的帧回调。(帧回调是什么鬼?!))
         仅在未启动时才可以启动管道。 如果启动了管道,则会引发异常。
         当使用回调启动管道时,wait_for_frames()和poll_for_frames()都将引发异常。)
         
        4. start(self: pyrealsense2.pyrealsense2.pipeline, config: pyrealsense2.pyrealsense2.config, callback: Callable[[pyrealsense2.pyrealsense2.frame], None]) -> pyrealsense2.pyrealsense2.pipeline_profile
        
        Start the pipeline streaming according to the configuraion.
        The pipeline captures samples from the device, and delivers them to the provided frame callback.
        Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
        When starting the pipeline with a callback both wait_for_frames() and poll_for_frames() will throw exception.
        The pipeline selects and activates the device upon start, according to configuration or a default configuration.
        When the rs2::config is provided to the method, the pipeline tries to activate the config resolve() result.
        If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails.
        Available configurations and devices may change between config resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.
        (根据配置启动流传输。
        管道从设备捕获样本,并将其传递到提供的帧回调。
        仅在未启动时才可以启动管道。如果启动了管道,则会引发异常。
        当使用回调启动管道时,wait_for_frames()和poll_for_frames()都将引发异常。(frame callback到底是啥?)
        管道根据配置或默认配置在启动时选择并激活设备。
        当向方法提供rs2 :: config时,管道将尝试激活config resolve()结果。
        如果应用程序请求与管道计算机视觉模块冲突,或者平台上没有可用的匹配设备,则该方法失败。
        如果设备连接或断开连接,或者另一个应用程序获得了设备的所有权,则可用的配置和设备可能会在config resolve()调用与管道启动之间改变。)
        
        5. start(self: pyrealsense2.pyrealsense2.pipeline, queue: pyrealsense2.pyrealsense2.frame_queue) -> pyrealsense2.pyrealsense2.pipeline_profile
        
        Start the pipeline streaming with its default configuration.
        The pipeline captures samples from the device, and delivers them to the provided frame queue.
        Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
        When starting the pipeline with a callback both wait_for_frames() and poll_for_frames() will throw exception.
        (使用默认配置启动流式传输。
         管道从设备捕获样本,并将其传递到提供的帧队列。
         仅在未启动时才可以启动管道。 如果启动了管道,则会引发异常。
         当使用回调启动管道时,wait_for_frames()和poll_for_frames()都将引发异常。)

        6. start(self: pyrealsense2.pyrealsense2.pipeline, config: pyrealsense2.pyrealsense2.config, queue: pyrealsense2.pyrealsense2.frame_queue) -> pyrealsense2.pyrealsense2.pipeline_profile
        
        Start the pipeline streaming according to the configuraion.
        The pipeline captures samples from the device, and delivers them to the provided frame queue.
        Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised.
        When starting the pipeline with a callback both wait_for_frames() and poll_for_frames() will throw exception.
        The pipeline selects and activates the device upon start, according to configuration or a default configuration.
        When the rs2::config is provided to the method, the pipeline tries to activate the config resolve() result.
        If the application requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails.
        Available configurations and devices may change between config resolve() call and pipeline start, in case devices are connected or disconnected, or another application acquires ownership of a device.
        (根据配置启动流传输。
        管道从设备捕获样本,并将其传递到提供的帧队列。
        仅在未启动时才可以启动管道。如果启动了管道,则会引发异常。
        当使用回调启动管道时,wait_for_frames()和poll_for_frames()都将引发异常。
        管道根据配置或默认配置在启动时选择并激活设备。
        当向方法提供rs2 :: config时,管道将尝试激活config resolve()结果。
        如果应用程序请求与管道计算机视觉模块冲突,或者平台上没有可用的匹配设备,则该方法失败。
        如果设备连接或断开连接,或者另一个应用程序获得了设备的所有权,则可用的配置和设备可能会在config resolve()调用与管道启动之间改变。)
        """
        pass

    def stop(self): # real signature unknown; restored from __doc__
        """
        stop(self: pyrealsense2.pyrealsense2.pipeline) -> None
        
        Stop the pipeline streaming.
        The pipeline stops delivering samples to the attached computer vision modules and processing blocks, stops the device streaming and releases the device resources used by the pipeline. It is the application's responsibility to release any frame reference it owns.
        The method takes effect only after start() was called, otherwise an exception is raised.
        (停止管道流。
         管道停止将样本传送到连接的计算机视觉模块和处理模块,停止设备流传输并释放管道使用的设备资源。 应用程序有责任释放其拥有的任何参考的帧。
         该方法仅在调用start()之后生效,否则引发异常。)
        """
        pass

    def try_wait_for_frames(self, timeout_ms=5000): # real signature unknown; restored from __doc__
        """ 
        try_wait_for_frames(self: pyrealsense2.pyrealsense2.pipeline, timeout_ms: int=5000) -> Tuple[bool, pyrealsense2.pyrealsense2.composite_frame] 
        """
        pass

    def wait_for_frames(self, timeout_ms=5000): # real signature unknown; restored from __doc__
        """
        wait_for_frames(self: pyrealsense2.pyrealsense2.pipeline, timeout_ms: int=5000) -> pyrealsense2.pyrealsense2.composite_frame
        
        Wait until a new set of frames becomes available.
        The frames set includes time-synchronized frames of each enabled stream in the pipeline.
        In case of different frame rates of the streams, the frames set include a matching frame of the slow stream, which may have been included in previous frames set.
        The method blocks the calling thread, and fetches the latest unread frames set.
        Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called as fast as the device frame rate.
        The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources become available.
        (等到新的一组帧集可用为止。
         帧集包括管道中每个已启用流的时间同步帧。
         在流的帧率不同的情况下,帧集合包括慢流的匹配帧,该慢帧的匹配帧可能已经包括在先前的帧集合中。
         该方法阻止调用线程,并获取最新的未读帧集。
         未调用函数时设备生成的帧将被丢弃。 为避免丢帧,应以与设备帧速率一样快的速度调用此方法。
         应用程序可以保证帧句柄以延迟处理。 但是,如果应用程序的历史记录过长,则设备可能会缺少产生新帧的内存资源,并且对该方法的后续调用将无法检索新帧,直到资源可用为止。)
        """
        pass

    def __init__(self, ctx, *args, **kwargs): # real signature unknown; NOTE: unreliably restored from __doc__ 
        """
        __init__(self: pyrealsense2.pyrealsense2.pipeline, ctx: pyrealsense2.pyrealsense2.context=) -> None
        
        The caller can provide a context created by the application, usually for playback or testing purposes.
        (调用者可以提供由应用程序创建的上下文,通常用于回放或测试目的。)
        """
        pass

你可能感兴趣的:(Intel,RealSense)