Kinect Magic Cursor and xRemote


I’m releasing 2 very small applications for Windows that are nevertheless invaluable. There is already software out there that does these jobs, but this is my take it them using XNA4.

The first release came about as I was asked to do a magic wall thing using Kinect and I managed to put this together in about 5 hours (finished it at 2.30am), so it might not be perfect, but it’s worth a go. It basically allows you to use Kinect connected to a Windows 7 pc to control the windows mouse pointer and perform left clicks. Once you run the software you simply use your right hand to control the mouse pointer by standing in front of Kinect and moving your hand. To left-click you just raise your left hand above your shoulder. It certainly has plenty of uses, an interactive presentation projected onto a wall, which would then be controlled by users standing in front of the wall and controlling the pointer with their hand is our initial thoughts, but it could have so many other uses.

Kinect Magic Cursor

There are various keyboard controls to set things within the application.

ESC key Quits the application.
K key toggles between kinect and mouse control.
LEFT-ARROW & RIGHT-ARROW keys change the scale, which is basically how far you need to move your hand in each direction to move the pointer to the edge of the screen.
UP-ARROW & DOWN-ARROW keys allow you to adjust the angle of the Kinect camera.
SPACE key freezes the video feed into the application, which is useful if you are running on a slow PC.
S key starts the video feed again.

You will need a Windows7 PC, Kinect SDK v1.5 and XNA4 runtime installed and obviously a Kinect (XBOX360 Kinect or Windows Kinect).

Click here to download Kinect Magic Cursor version 1.2

Once you run the application you can minimise it and it will still function, you will need to click back into it though to exit from it and stop the Kinect mouse control.

My second application is based on the first one, as I thought, “why not also do this with the wireless XBOX controller”. So if you already use my xGames and have a wireless XBOX360 controller with USB wireless receiver for Windows then you should try this. It basically allows you to use a wireless XBOX controller as a wireless mouse and multimedia remote control.

Left and right sticks on the controller will control the mouse pointer.
A Button and Left Trigger perform a left-click.
B Button and Right Trigger perform a right-click.
X Button does a double-click.
BACK button quits the application.
LEFT bumper button does a LEFT-ARROW keyboard press (useful for powerpoint).
RIGHT bumper button does a RIGHT-ARROW keyboard press (useful for powerpoint).
The D-PAD works as cursor keys, allowing you to perform LEFT, RIGHT, UP and DOWN cursor key presses.

LEFT-ARROW & RIGHT-ARROW keys on the keyboard allow you to adjust the mouse speed from within the application.

You can minimise the application and the controller will still function as a mouse.

You will need a Windows 7/XP PC and XNA4 runtime installed and a wireless XBOX360 controller with a USB wireless receiver to plug into the PC.

Click here to download xRemote version 1.2

(UPDATE: Minor update which allows you to use A and B on the controller like proper mouse buttons so you can drag and drop things.)

Advertisements

18 thoughts on “Kinect Magic Cursor and xRemote

    1. Yes I will post the source no problem. I will comment it and get it on this weekend hopefully. Sorry I hacked these 2 things together fast and they probably need tidied and comments before I put out source.

  1. Hi, i have previously tried to control the cursor with kinect, but couldnt make it smooth and properly scaled to the screen. your demo is really smooth, i would also like to have a look at your source code, Thanks

  2. Just tried your Magic Cursor in my classroom and although the video looks smooth, when I hit K to change to Kinect mode the video completely freezes. The program is still operating though because I can switch back to mouse mode , change scale etc. Any suggestions as to what may be wrong? Thanks!

    1. Michael it starts in Kinect mode so if you run it and you can see the video then you are already running it in Kinect mode. Just stand back and try to use your right hand to control the mouse cursor. You should be about 1.5 metres from Kinect. Try adjusting the camera angle using the cursor keys to see if that helps. If none of that works, try downloading my Kinect games installer which will install the latest version and the latest Kinect sdk. It will also install my Kinect educational games which you might want to try.

  3. The idea is to “click and hold” the left mouse button. Is it possible?
    I raised my left hand above my head but I could not keep the left button of the mouse pressed while I moved my right hand to move the cursor.
    Our goal is to use http://new.weavesilk.com/ and be able to click and drag the left button to draw some generative pieces 😉
    Thanks in advance.
    Jose Ismael

      1. It would be great!
        But the way you propose the left click wouldn’t be lost?
        The left click of the mouse is required to choose the colors and symmetry.
        Maybee the two hands raised and moved simultaneously can emulate the click and drag until the two hands are lowered simultaneously to “switch off” the click and drag.
        Do you think it´s feasible?
        Anyway, thank you for your availability.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s