For example, I would like to finish this code:
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while True:
ret, frame = cap.read()
if # frame is empty or all zeros #:
print("Empty Frame")
else:
cv2.imshow('frame',frame)
if cv2.waitKey(33) & 0xFF == ord('q'):
break
cv2.destroyAllWindows()
The line, 'if # frame is empty or all zeros #:', is there an operator I can use to determine if a frame is empty?