File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1717# depend on the display driver. For example, the default ST7789 display driver
1818# will crop large images, and show small images in the top-left corner
1919cv2 .imshow (display , img )
20- key = cv2 .waitKey (1000 )
20+
21+ # Prompt the user to press a key to continue
22+ print ("Press any key to continue" )
23+ key = cv2 .waitKey (0 )
2124
2225# Let's modify the image! Here we use `cv2.Canny()` to perform edge detection
2326# on the image, which is a common operation in computer vision
Original file line number Diff line number Diff line change 1313# `boot.py` script. See the example `boot.py` script for more details
1414camera .open ()
1515
16+ # Prompt the user to press a key to continue
17+ print ("Press any key to continue" )
18+
1619# Loop to continuously read frames from the camera and display them
1720while True :
1821 # Read a frame from the camera, just like any other Python environment! It
3134 # Check for key presses
3235 key = cv2 .waitKey (1 )
3336
34- # If the 'q' key is pressed, exit the loop
35- if key == ord ( 'q' ) :
37+ # If any key is pressed, exit the loop
38+ if key != - 1 :
3639 break
3740
3841# Release the camera, just like in any other Python environment!
You can’t perform that action at this time.
0 commit comments