Architecture
-
The library used is open cv.
-
There are 2 classifiers used, one for frontal face and another for smile detection. The classifiers are directly installed from Github.
-
The method used is VideoCapture to read the current frame from webcam video stream.
-
The picture is then converted to Grayscale image. The reason behind this is only 1 channel is used instead of 4 which makes it faster.
-
The face is detected using the 1st classifier i.e. frontal face.
-
In order to detect smile, the detected face in Step 5 is converted to Rectangular structure and later second classifier is applied i.e. smile.
-
The Cleanup method are applied in the end to clear all the windows after use.