Intel Realsense D435 获取摄像头option参数值 get_option()

def get_option(self, option): # real signature unknown; restored from __doc__
    """
    get_option(self: pyrealsense2.pyrealsense2.options, option: pyrealsense2.pyrealsense2.option) -> float
    
    Read option value from the device.
    从设备读取选项值。
    """
    return 0.0

示例代码:

# -*- coding: utf-8 -*-
"""
@File    : 200109_测试不同曝光值下帧生成时间.py
@Time    : 2020/1/9 16:52
@Author  : Dontla
@Email   : [email protected]
@Software: PyCharm
"""

import numpy as np
import pyrealsense2 as rs

ctx = rs.context()

pipeline = rs.pipeline(ctx)
cfg = rs.config()
cfg.enable_device('838212073161')
cfg.enable_stream(rs.stream.depth, 640, 360, rs.format.z16, 30)
cfg.enable_stream(rs.stream.color, 640, 360, rs.format.bgr8, 30)
pipeline_profile = pipeline.start(cfg)

sensor = pipeline.get_active_profile().get_device().query_sensors()[1]
print(sensor.get_option(rs.option.enable_auto_exposure))

sensor支持的option参数值:pyrealsense2 sensor.get_supported_options()(获取当前sensor支持的参数)

发布了747 篇原创文章 · 获赞 28 · 访问量 9万+

猜你喜欢

转载自blog.csdn.net/Dontla/article/details/103901316