views:

608

answers:

3

Software Design Question:

Since silverlight 4 is out, and it has webcam support, does anyone know the code to track the motion and color ? Is SL4 writable bitmap is the first step to start wrting the code ?

I wants to convert specific color motion into action in Silverlight. For example if you move red color pen in front of camera from left- > right it should scroll the picture from left to right.

Any help will be appriciated

+1  A: 

It is not simply a *code* to do this. You need to use image processing algorithms to analyze the images from the video stream to determine points of interest, and track these between the frames. Since you only want to track a point of a certain color, this simplifies the problem somewhat because there is less heavy mathematics involved (as in face recognition). You should learn more about the following algorithms:

Cecil Has a Name
A: 

I started looking into this type of application and I found AForge.Net. I would imagine it is possible to port it over to Silverlight (though it probably would take a while). Another possible option would be to wrap AForge in COM and use Silverlight's ability to run COM in trusted OOB applications. The issue there would be you would have to figure out how to use COM to install a COM components.

http://code.google.com/p/aforge/

randomsolutions