import cv2
def camera_capture():
cap = cv2.VideoCapture(0)#打开摄像头
while cap.isOpened():
ret, frame = cap.read()
cv2.isshow('img', frame)
if cv2.waitKey(1) == ord('q'):
break
cv2.destroyAllWindows()
cap.release()
if name == 'main':
camera_capture()
报错如下