In simple terms,
The Computer Vision algorithm involves a few pre-processing techniques to remove clutters and segments hand in a frame, and detect convexity defects in the segmented frame and look for peaks to find the finger tip.
Then, the rest is to check the number of peaks and associate required appliances control through raspberry pi's GPIO
For source code, have a look here (https://engineerslaboratory.wordpress...)