Closed loaysh2010 closed 4 years ago
I already solve it.
First: to save output video from the webcam. the 'output_file' string variable has to be assigned with a value. Second: for the error, it's a bug in OpenCV v.4 .. after installing v.3 all error has been gone.
Thank you very much for sharing your code.
I just want to ask how to save the frames detected from the camera?. I used the command: python yoloface.py --src 0 --output-dir outputs/ and when I check the output folder it's always empty.
P.S. when I use input src from camera, I get below warning even the algorithm works fine at detecting faces. [ERROR:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap.cpp (415) cv::VideoWriter::open VIDEOIO(CV_IMAGES): raised OpenCV exception:
OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\videoio\src\cap_images.cpp:253: error: (-5:Bad argument) CAP_IMAGES: can't find starting number (in the name of file): '/outputs'\ in function 'cv::icvExtractPattern'
Can you help me with that please