Open
Description
This is the code which iam tryng in PyCharm
import cv2
import time
cap = cv2.VideoCapture(0)
while True:
success, img = cap.read()
cv2.imshow("Image", img)
cv2.waitKey(1)
Iam getting below error
"C:\Users\Support ACTA\AppData\Local\Programs\Python\Python37\python.exe" "E:/Project/Python/advanced computer vision/Face Detection/FaceDetectionMin.py"
Traceback (most recent call last):
File "E:/Project/Python/advanced computer vision/Face Detection/FaceDetectionMin.py", line 4, in <module>
cap = cv2.VideoCapture(0)
TypeError: VideoCapture() takes no arguments
If I use the the video path also, same error iam getting