Closed ArshadAliDev closed 7 years ago
Can you elaborate your problem? Are u getting any error message? Please mention it so that it will be easier to understand your problem.
@codeArshad This is debugging problem. Please mention what you have tried so far. Here are couple of things you can try to debug this code.
make sure that you are receiving the streams from the video
`
python
while cam.isOpened():
ret,img = cam.read()
`
check if you are able to detect to the faces in the video.
`
faces = faceDetect.detectMultiScale(gray,1.3,5);
`
if you don't find the error in above steps then try to use this code:
cv2.imshow("window", frame_processed)
key = cv2.waitKey(1) & 0xFF
if key == ord("q"):
break
Instead of this:
cv2.imshow("Face",img);
if (cv2.waitKey(1) == ord('q')):
break;
It worked after copying opencv_ffmpeg2411.dll file to python27 directory.
Thank you @prsntmaurya and @arpit1997
I am trying to recognize faces from a
.mp4
file. I already have some sample images of faces in my database. When I run the program, I want it to recognize the faces from the video. The location of video file is passed as a command line argumentsys.argv[1]
.code :
The command in command prompt is
C:\FaceRocogProject\Face Recog sqlite\python Recognize_video.py 'C:\FaceRocogProject\Face Recog sqlite\test.mp4'