Home | Lehre | Videos | Texte | Vorträge | Software | Person | Impressum, Datenschutzerklärung | Blog RSS

Visual Pong

We looked further into how to use OpenCV to set a virtual object into motion. Now you can exert a force on a red ball with your image. See the code file.

Several Computer Mice in Parallel

At a high level, Windows does not distinguish between several mice connected to a PC. Every mouse will move the cursor. By registering for "raw" data, however, you can opt to receive every change message (motion, click, release) together with the mouse's unique ID (device handle). Note that the motion is given as a number of minute steps in x and y direction (positive or negative) that have occured since the last message. See the example code. Wrapping this by .NET should work, too.

This can be applied for instance to create an "uber"-mouse that can measure its orientation by physically coupling two standard mice. The tricky thing here is that the raw xy data refer to the current orientation of the mice. The first computational step could be to sum the incremental changes of the rotation angle and thus to determine the orientation in absolute terms. (Drift may be an issue here.) From there, one can also convert the incremental position changes to an absolute frame.