目的
↓これの"Score Minimum Threshold"と"Score Maximum Threshold"をpyrealsenseで同じことをしたい
方法
depth_frame = frames.get_depth_frame()
t = rs.threshold_filter(min_dist=1, max_dist=2)
depth_frame = t.process(depth_frame)
実行結果
プログラム
import pyrealsense2 as rs
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
config.enable_stream(rs.stream.color, 640, 480, rs.format.rgb8, 30)
pipeline.start(config)
align_to = rs.stream.color
align = rs.align(align_to)
for x in range(10):
pipeline.wait_for_frames()
frames = pipeline.wait_for_frames()
frames = align.process(frames)
depth_frame = frames.get_depth_frame()
t = rs.threshold_filter(min_dist=1, max_dist=2)
depth_frame = t.process(depth_frame)
pipeline.stop()
- 生画像
- thread_filter(max_depth=1)