Hand isolation, Finger counting, and finger point tracking in Python with OpenCV Using histogram backprojection to isolate a users hand in the frame, followed by simple background subtraction, a mask is created where white implies a pixel that belongs to the hand and black implies a pixel that belongs to the background. Convexity defects between the hand contour and convex hull are used to identify the points between fingers and subsequently to calculate the number of fingers in the frame. When a single finger is showing, the highest point is assumed to be the fingertip and the user can draw gestures onto the frame.