'How can I make a delay in python without affecting video camera?
I want to set a delay just before my for loop gets executed. However doing so freezes my webcam.
while name != "welcome":
status, img = webcam.read()
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
faces = load.detectMultiScale(gray, 1.3, 5)
cv2.imshow("DEMO", img)
cv2.waitKey(10)
time.sleep(10)
for (x, y, w, h) in faces:
cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2)
id, conf = demo(gray[y:y + h, x:x + w])
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
