Object Detection using Haar feature-based cascade classifiers is an effective object detection method proposed by Paul Viola and Michael Jones in their paper, "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. It is a machine learning based approach where a cascade function is trained from a lot of positive and negative images. It is then used to detect objects in other images.
Run the program like this:
python webcam_cv3.py
OpenCV 3 used.
You may refer: https://docs.opencv.org/3.4.1/d7/d8b/tutorial_py_face_detection.html