ent ele conecta a webcam mas n exibe a imagem e eu ja tentei de tudo...
se tem alguma coisa errada eu n sei...
import cv2
webcam = cv2.VideoCapture(0)
if webcam.isOpened():
validacao = frame = webcam.read()
while validacao:
validacao = frame = webcam.read()
cv2.imshow("Video", frame)
key = cv2.waitKey(5)
e quando fecho ele da este erro
Traceback (most recent call last):
File "D:\RN\Object_Detection_Files\main.py", line 27, in <module>
success, img = webcam.read()
KeyboardInterrupt
[ WARN:0@4.950] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (539) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
[ WARN:0@5.264] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (539) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
Process finished with exit code -1073741510 (0xC000013A: interrupted by Ctrl+C)