Skip to content

Commit

Permalink
replace syncder with frame_queue
Browse files Browse the repository at this point in the history
  • Loading branch information
noacoohen committed Nov 17, 2024
1 parent 59c8039 commit 58db2aa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions unit-tests/post-processing/test-rotation-filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def validate_rotation_results(filtered_frame, angle):
vs = create_video_stream(depth_intrinsics)
depth_stream_profile = depth_sensor.add_video_stream(vs)

sync = rs.syncer()
frame_queue = rs.frame_queue(15)

# Define rotation angles to test
rotation_angles = [90, 180, -90]
Expand All @@ -109,17 +109,16 @@ def validate_rotation_results(filtered_frame, angle):

# Start depth sensor
depth_sensor.open(depth_stream_profile)
depth_sensor.start(sync)
depth_sensor.start(frame_queue)

for i in range(frames):
# Create and process each frame
frame = create_frame(depth_stream_profile, i)
depth_sensor.on_video_frame(frame)

# Wait for frames and apply rotation filter
fset = sync.wait_for_frames()
depth = fset.first_or_default(rs.stream.depth)
filtered_depth = rotation_filter.process(depth)
depth_frame = frame_queue.wait_for_frame()
filtered_depth = rotation_filter.process(depth_frame)

# Validate rotated frame results
validate_rotation_results(filtered_depth, angle)
Expand Down

0 comments on commit 58db2aa

Please sign in to comment.