9 import pyrealsense2
as rs
15 n = frame.get_frame_number()
21 n = frame.get_frame_number()
28 pipeline = rs.pipeline()
33 config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)
37 print(
"Slow callback")
38 pipeline.start(config)
40 while time.time() - start < 5:
41 frames = pipeline.wait_for_frames()
47 print(
"Slow callback + queue")
48 queue = rs.frame_queue(50)
49 pipeline.start(config, queue)
51 while time.time() - start < 5:
52 frames = queue.wait_for_frame()
59 print(
"Slower callback + queue")
60 queue = rs.frame_queue(50)
61 pipeline.start(config, queue)
63 while time.time() - start < 5:
64 frames = queue.wait_for_frame()
72 print(
"Slower callback + keeping queue")
73 queue = rs.frame_queue(50, keep_frames=
True)
74 pipeline.start(config, queue)
76 while time.time() - start < 5:
77 frames = queue.wait_for_frame()
81 except Exception
as e:
84 print(
"A different Error")
static std::string print(const transformation &tf)
def slower_processing(frame)
def slow_processing(frame)