librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

How to infrared streaming on python pyrealsense2

Open alexanderPeregrina opened this issue 8 years ago • 2 comments

Required Info
Camera Model SR300
Firmware Version 3.21.0.0
Operating System & Version Ubuntu 14.04
Kernel Version (Linux Only) 4.4.0-104
SDK Version 2.8.3

How can I get an infrared frame on pyrealsense2, which are the methods that I must use,?

alexanderPeregrina avatar Dec 29 '17 01:12 alexanderPeregrina

This is probably the quickest way:

import pyrealsense2 as rs
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.infrared)
pipeline.start(config)
frames = pipeline.wait_for_frames()
ir = frames.first(rs.stream.infrared) # also I think this is possible: ir = frames[0]

zivsha avatar Dec 29 '17 14:12 zivsha

Thanks, it works

alexanderPeregrina avatar Dec 30 '17 19:12 alexanderPeregrina