Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#15 - example script closes when any key pressed #16

Merged
merged 1 commit into from
Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Create a controller to start the device
controller = ProCaptureController(device)

print('PRESS Q TO QUIT!')
print('PRESS ANY KEY TO QUIT!')
counter = 0
timestamps = []
while True:
Expand All @@ -37,7 +37,7 @@
# Here we are using OpenCV to display the acquired frames after conversion to BGR numpy arrays
frame_array = frame.as_array(channel_order=RGBChannelOrder.BGR)
imshow("video", frame_array)
if waitKey(1) & 0xFF == ord('q'):
if waitKey(1) != -1:
break

# Every 60 frames, print some timing information
Expand Down
Loading