kinectxbox kinectdevice

  1. What is Kinect?
  2. Kinect for Xbox 360, or simply Kinect, is a motion sensing input device by Microsoft for the Xbox 360 video game console.

    Based upon a webcam-style add-on peripheral for the Xbox 360 console, it enables users to control and interact with the Xbox 360 without the need to touch a game controller, through a natural user interface using gestures and spoken commands.

  3. Some Demos
  4. The first demo shows two persons making gestures or dancing. The color of the figure conveys depth information. For each figure, the Kinect OpenNI interface can track a number of body parts and display the match-stick skeleton consisting of tracking points connected by straight lines.



    The second demo shows how a robot car can be controlled by gestures. The screen on the right shows the gestures to control the robot car.

  5. How to install it?
  6. We will use an open source driver provided by OpenNI.

  7. How to test it?
  8. To test it, please finish installation and connect Kinect Device to your computer,

    then compile and run sample programs contained in the installation package (under OpenNI/Sample and OpenNI/platform/YOURSYSTEM/build/sample)

    For Visual Studio user, there are precompiled VS project in OpenNI/platform/Win32/build/sample

    Frequent Error Messages

    "Failed to open XML, Error: Unknown USB Device Speed"

    You need to use the power adapter for the Kinect camera when using a regular USB port on a PC

    "error initializing NITE"

    NITE isn't installed properly. Make sure you have used the correct license key. When it requests for the license key use the one provided by Primesense : 0KOIk2JeIBYClPWVnMoRKn5cdY4=

    "Can't create any node of the requested type!"
    NITE isn't installed properly. Make sure you have used the correct license key provided
    I keep getting a message telling me I need .NET Framework 4.0.
    This error can be fixed by installing with the .exe installer first then reinstalling with the .msi installer. If you use the auto-installer above you should not see this error.

    "Kinect Motor Driver not found. LED & Motor control disabled"
    You need to manually install the motor/ LED driver for the Kinect device.

  9. How to develop Kinect application using recorded Kinect data?
  10. (You probably do not need to use this option)

  11. How to present your demo?
  12. You can give a live demo. However, just in case Murphy's Law strikes again, it is always advisable to also pre-record your demo and upload it to Youtube.
    kinectxbox kinectdevice
  13. How to use Kinect Interface?

    After initial calibration, Kinect is able to track human movement in the form of match-stick skeletons.

    The OpenNI Inteface will produce the position of each body part of interest (head, hand, elbow, etc.) in the form of its coordinates (x,y,z). In what follows, updateBodyInfo() pushes the device to grab next frame from camera and update BodyInfo in kinect object, and getBodyInfo() retrieves the BodyInfo from kinect object.

    A typical main program may look like the following:

        int id = 0x01;
            Kinect *kinect = new Kinect(id);	//create kinect object
            BodyInfo body;	//declare BodyInfo object
            kinect->initKinect();        //init kinect object and start the
    device
            while(1) {
                    kinect->updateBodyInfo();         /*request the device to
    get a new frame from camera and update BodyInfo*/
                    body = kinect->getBodyInfo();        /*retrieve BodyInfo
    from kinect object*/
                    if(body.bTracking)	/*bTrack indicate whether the device
    has confidence about what it is tracking*/
                            printf("%.0f, %.0f,
    %.0f\n",body.pRHand.X,body.pRHand.Y,body.pRHand.Z);
    /*pRHand.X is X coordinate of right hand*/
                    //else
                            //printf("No Body Info Updated\n");
            }
            delete kinect;	//clean up
    
    

    The above program produces the following output (the coordinates of successive right hand positions):

  14. Where to download the source code?

    We will use google code for version control. These are detailed instructions on how to access google code svc server.

    Our course google code url is "https://cs1530-kinect.googlecode.com/svn/trunk/"





    kinectxbox kinectdevice
  15. How to provide an add-on Kinect Interface?

    For some applications it is often more convenient to have both a web interface and an add-on Kinect Interface that provides some of the functions of the web interface. Therefore a user can use the Kinect Interface for certain essential functions and fall back on the web interface for other functions.

    For the following example, the source code is available on google code: "http://code.google.com/p/cs1530-kinect/downloads/list" A video demo can be found on YouTube: "http://www.youtube.com/watch?v=nmFo8dTNghw"

    In the demo, after the Kinect calibration phase a 'start' gesture (a wave of the right hand) will start the application. A 'stop' gesture (a horizontal left hand pointing at a vertical right hand) will stop the application.

    When the GestureDetector in the main program HHAMain.cpp detects a gesture such as the 'start' hand gesture, the sendCommand(ICMD_START) outputs "HOME HEALTH APPLICATION START" and starts the application. When the 'stop' gesture is detected the sendCommand(ICMD_STOP) stops the application and outputs "HOME HEALTH APPLICATION STOP".

    The user can also use the web interface to do the same. When the user clicks on the "Start Application" button on the web page test1.html, the associated JavaScript function runCmd('start') (see the source for test1.html) sends a 'start' message to c:\\Program Files\\HomeHealthApp\\HHARemoteClient.exe. The HHARemoteClient sends ICMD_START through a socket to the main program. The main program HHAMain maintains three threads to interact with Kinect device, display device and HHARemoteClient. Upon reception of ICMD_START, sendCommand(ICMD_START) in the main program outputs "HOME HEALTH APPLICATION START" and starts the application. It is the same for the 'stop' command. Please note the web page for this example only works properly on IE brower.

    The application developer can add more buttons to the web page test1.html, more commands to HHARemoteClient.cpp, and more processing functions to sendCommand() for a realistic application. GestureDetector() must also be expanded to detect additional hand gestures and body gestures. For this purpose a structure called BodyInfo containing the 3D-coordinates of all body parts that can be tracked by Kinect is provided. The program is BodyInfo.cpp, and the corresponding structure is BodyInfo.h. More information can be found in the following Readme.txt.