Theoretical Laser Tracking…

I’m currently developing a laser-pointer and webcam pointing device for a 3D game. One of the issues one runs into with this situation arises when you’re setting up the webcam. What happens if the webcam does not have a direct angle on the surface it’s looking at? What you get is this weird quadrilateral that can’t be used to directly map the laser to the mouse.

I’ve written a test program in Processing to address this problem. The white squares define the edges of the usable area. The little red square controlled by the mouse represents the laser pointer, and the larger red circle represents the cursor as the final program would interpret it. The goal is to pretend the area in the box and the area of the program are two perspectives of the same element. Every frame, the program tries to track down the x and y position of the laser dot. It follows a guess and check algorithm, and each guess is shown as a line within the box.

Note that you may click and drag the white boxes to change the shape of the usable area. Check it out!

3 Comments »

  1. Carl johan Hambro said,

    February 12, 2008 @ 7:27 pm

    You should make an application that uses the webcam, to see where the red laserdot is and then put it into the computer as the mouse pointer. I can’t seem to find this anywhere, and it would be pretty cool :) .

  2. reliastar life term insurance company said,

    December 6, 2008 @ 3:40 pm

    term insurance reliastar life company reliastar life of insurance company

  3. payday laons in said,

    January 7, 2009 @ 7:35 am

    laons in payday in payday laons

RSS feed for comments on this post · TrackBack URI

Leave a Comment