Ask Your Question

Revision history [back]

keep haar cascade file and python file on the same folder. no need to give the entire path of haar cascade file, just give name of the xml file.

keep haar cascade file and python file on the same folder. no need to give the entire path of haar cascade file, just give name of the xml file.

in place of cap.release() you have to replace with camera.release()

keep haar cascade file and python file on the same folder. no need to give the entire path of haar cascade file, just give name of the xml file.

in place of cap.release() you have to replace with camera.release()

keep haar cascade file and python file on the same folder. no need to give the entire path of haar cascade file, just give name of the xml file.

in place of cap.release() you have to replace with camera.release()

i don't think cv2.VideoCapture(-1) will work replace it with cv2.VideoCapture(1) [1 for front camera and 0 for rear camera] if it is still not working use ip webcam.

keep haar cascade file and python file on the same folder. no need to give the entire path of haar cascade file, just give name of the xml file.

in place of cap.release() [cap is not defined] you have to replace with camera.release()

i don't think cv2.VideoCapture(-1) will work replace it with cv2.VideoCapture(1) [1 for front camera and 0 for rear camera] if it is still not working use ip webcam.