I want to develop a program which uses the webcam to track finger tips. When tracked, the finger tip will be like an index and I will be able to get its positions even if it is moved around. If anyone has any advice for me. Thanks in advance.
Setup is everything. First make sure you make it easy for yourself: have the proper lighting conditions ( either an IR LED + IR filter on camera or just high contrast between your surface and the fingers )
I imagine you would do blob tracking. I can't give you a solution for making sure the id of the detected blobs will always be the same, even if they go in out of the tracked area, but I would suggesting giving Community Core Vision(used to be tbeta) a try and use the forums there as well.
HTH
If you look around the internet, you'll find lots of DIY tutorials to make a touch table.
If you want to keep your fingers in the air, you could put some colour markers. This article might help: http://www.aishack.in/2010/07/tracking-colored-objects-in-opencv/