Hi adi0803199,
Sounds like an interesting project. I would start with using OpenCV - there is example on the Wiki that uses **broken link removed**.
I would approach you project in two phases, first design your algorithm using OpenCV running on your PC with a webcam. There is plenty of instructions and tutorials about how to get opencv installed and how to start developing.
In the second phase, I assume (because we are on EDABoard) that you want to port this algorithm onto a embedded processor, microcontroller or FPGA. This is where things get a bit difficult. You need to decide what sort of device you want to use, what sort of performance / accuracy is required for your project (i.e. integer, fixed point, floating point etc). By far the simplest way here would be to grab yourself a RaspberyPi and run your algorithm on that, it should require very little work to get that going and there is plenty of articles and blog posts on the net about it (**broken link removed**)