Intel Realsense D435 pyrealsense2 get_option_range() 获取rs.option中参数值取值范围 获取默认值

color sensor支持参数值的取值范围

代码

# -*- coding: utf-8 -*-
"""
@File    : 200108_测试获取Intel_Realsense_options参数.py
@Time    : 2020/1/8 13:18
@Author  : Dontla
@Email   : [email protected]
@Software: PyCharm
"""

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]

option_range = sensor.get_option_range(rs.option.global_time_enabled)
print(option_range)

color sensor支持参数

option.backlight_compensation, Enable / disable backlight compensation
option.brightness, UVC image brightness
option.contrast, UVC image contrast
option.exposure, Controls exposure time of color camera. Setting any value will disable auto exposure
option.gain, UVC image gain
option.gamma, UVC image gamma setting
option.hue, UVC image hue
option.saturation, UVC image saturation setting
option.sharpness, UVC image sharpness setting
option.white_balance, Controls white balance of color image. Setting any value will disable auto white balance
option.enable_auto_exposure, Enable / disable auto-exposure
option.enable_auto_white_balance, Enable / disable auto-white-balance
option.frames_queue_size, Max number of frames you can hold at a given time. Increasing this number will reduce frame drops but increase latency, and vice versa
option.power_line_frequency, Power Line Frequency
option.auto_exposure_priority, Limit exposure time when auto-exposure is ON to preserve constant fps rate
option.global_time_enabled, Enable/Disable global timestamp.
backlight compensation,	背光补偿,启用/禁用背光补偿
brightness, 	亮度,
contrast, 	对比,
exposure, 	曝光,控制彩色相机的曝光时间。 设置任何值将禁用自动曝光
gain, 	增益,
gamma, 	伽玛,
hue, 	色调,
saturation, 	饱和,
sharpness, 	锐度,
white balance, 	白平衡,控制彩色图像的白平衡。 设置任何值将禁用自动白平衡
enable auto exposure, 	启用自动曝光,启用/禁用自动曝光
enable auto white balance, 	启用自动白平衡,启用/禁用自动白平衡
frames queue size, 	帧队列大小,在给定时间可以容纳的最大帧数。 增加此数目将减少帧丢失,但会增加延迟,反之亦然
power line frequency, 	电力线频率,
auto exposure priority, 	自动曝光优先,开启自动曝光时限制曝光时间以保持恒定的fps速率
global time enabled	全局时间启用,启用/禁用全局时间戳。

后面中括号里的貌似是默认值(摄像头重置能够将值重置为默认)那个/不知是啥。。。

backlight compensation,	背光补偿,<pyrealsense2.option_range: 0-1/1 [0]>
brightness, 	亮度,<pyrealsense2.option_range: -64-64/1 [0]>
contrast, 	对比,<pyrealsense2.option_range: 0-100/1 [50]>
exposure, 	曝光,<pyrealsense2.option_range: 1-10000/1 [156]>
gain, 	增益,<pyrealsense2.option_range: 0-128/1 [64]>
gamma, 	伽玛,<pyrealsense2.option_range: 100-500/1 [300]>
hue, 	色调,<pyrealsense2.option_range: -180-180/1 [0]>
saturation, 	饱和,<pyrealsense2.option_range: 0-100/1 [64]>
sharpness, 	锐度,<pyrealsense2.option_range: 0-100/1 [50]>
white balance, 	白平衡,<pyrealsense2.option_range: 2800-6500/10 [4600]>
enable auto exposure, 	启用自动曝光,<pyrealsense2.option_range: 0-1/1 [1]>
enable auto white balance, 	启用自动白平衡,<pyrealsense2.option_range: 0-1/1 [1]>
frames queue size, 	帧队列大小,<pyrealsense2.option_range: 0-32/1 [16]>
power line frequency, 	电力线频率,<pyrealsense2.option_range: 0-3/1 [3]>
auto exposure priority, 	自动曝光优先,<pyrealsense2.option_range: 0-1/1 [1]>
global time enabled	全局时间启用,<pyrealsense2.option_range: 0-1/1 [1]>
发布了747 篇原创文章 · 获赞 28 · 访问量 9万+

猜你喜欢

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