Detect Fingers and Count in real time.
This Project is done utilizing the inbuilt methods in OpenCV and sklearn.
The initial frames from the video are read and accumulated till a threshold is reached for Background Subtraction.
Once the background in extracted, it's time for the foreground ( i.e: our hand) to be detected. This is done by calculating the absolute difference between the foreground and the background that is detected.
Fingers are then detected from the binary image of the foreground by finding the external contours (or) finger outlines and calculate the number of fingers using ConvexHull Algorithm.
The steps after initial background detection will be repeated for every frame as the camera records.