Answers for "waitkey in python"

0

waitkey in python

#Examples 1: Display image with a time limit

# importing cv2 module
import cv2
  
# read the image
img = cv2.imread("gfg_logo.png")
  
# showing the image
cv2.imshow('gfg', img)
  
# waiting using waitKey method
cv2.waitKey(5000)

Example 2: Display image until key pressed

# importing cv2 module
import cv2
  
# read the image
img = cv2.imread("gfg_logo.png")
  
# showing the image
cv2.imshow('gfg', img)
  
# waiting using waitKey method
cv2.waitKey(0)
Posted by: Guest on February-02-2022

Python Answers by Framework

Browse Popular Code Answers by Language