Installation of Kinect on Windows 7 [OpenNI , Sensor Kinect and NITE]

Posted: June 7, 2012 in Kinect, Technology
Tags: , , ,

It took me sometime to get the installation done so just thought of making a little tutorial that would help other folks. I am assuming that you have Microsoft kinect and the adapter ready with you .

Two competing frameworks to work with Kinect are Microsoft Kinect’s sdk and Prime Sense OpenNI sdk . But since the Microsoft’s sdk is only  for non commercial use, many developers love to use  OpenNI sdk.

In this tutorial we would be installing  OpenNI, SensorKinect and NITE. In simple terms OpenNI and SensorKinect are the drivers that help to access RGB-D data [Depth & Color]  from Kinect . NITE is a skeleton tracking library that can be used by developers to create gesture interactions etc. Hence if you just want to work with depth images and pointclouds you wouldn’t necessarily need to install NITE. So, technically it is optional but most of them install it as it doesn’t take much extra effort.

I have installed 32 bit versions of openNI, sensorKinect and NITE on my 64 bit windows7 laptop. I shall walk you through the steps that I had followed  to install OpenNI drivers successfully.

Step1: Go to http://www.openni.org/Downloads/OpenNIModules.aspx . Select unstable and select windows 32 version. Download and install it.

Step 2: Go to https://github.com/avin2/SensorKinect  , download the zip file and extract it.  Navigate to the Bin folder , find SensorKinect093-Bin-Win32-v5.1.2.1.msi  and install it. Sample path where  the above sensor kinect installation file would be located is C:\Users\Sanmarino\Downloads\avin2-SensorKinect-v0.93-5.1.2.1-0-g15f1975\avin2-SensorKinect-15f1975\Bin.

Step 3:  Go to http://www.openni.org/Downloads/OpenNIModules.aspx. Select openNI compliant middleware binaries, unstable , windows 32  version then download and  install it.

Step 4: Now replace the file SamplesConfig.xml in C:\Program Files (x86)\OpenNI\Data  with the SamplesConfig.xml that is present in avin2-SensorKinect-15f1975\OpenNI\Data folder that you downloaded in step2.

Here you may get “access denied” when you try to replace in  C:\Program Files (x86)\OpenNI\Data  folder. So right click on the Data folder present in C:\Program Files (x86)\OpenNI\  , then select properties –> select security tab –>click edit. Under “Group or user names” select “users(your-computer_name\Users)” , eg: “users(Sanmarino-THINK\Users)” in my case. Now under “Permissions for users” click to allow full control , then click apply and ok.  After this you can replace without any problem. See the picture below if you have any confusion.

Step5:  Download KinectXML’s.zip from https://www.dropbox.com/s/tpl9wtx96xbe6rr/KinectXMLs.zip  and navigate to the NITE folder inside the unzipped KinectXMLs folder. Copy the three files Sample-Scene,Sample-Tracking & Sample-user from the NITE  folder in KinectXMLS and replace the files in C:\Program Files (x86)\PrimeSense\NITE\Data  with these three files. If you encounter “access denied “ problem do the same procedure explained in the step4 to the Data folder inside NITE.

Now restart your system ,  plugin Kinect and wait for the drivers to be installed. Once the drivers are installed properly open device manager[Click windows icon and search for device manager]  in your system . You should be able to see Kinect Audio,Camera & Motor when you expand PrimeSense. If you are unable to see this then refer the Errors encountered section below.

Testing the installation:

 Try out some samples   to ensure that your installation is working perfectly. Double click on NiViewer in C:\Program Files (x86)\OpenNI\Samples\Bin\Release  to see the following output. Here is the output with my kinect –

Also try Sample-SceneAnalysis in C:\Program Files (x86)\PrimeSense\NITE\Samples\Bin\Release to see if the NITE installation is working properly. Here is the output with my kinect –

If everything is working properly then you are done with the installation. If you encountered errors refer to the  section below and see if it helps. Comment if you encounter any problems. I shall offer the help I can.

Errors Encountered:

1) The procedure entry point xnloggetfilename could not be located…..

2) Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!

3) A blank screen appears and dissapears immediately when you try to run the samples in NITE or OpenNI.

In my case all the above errors have been caused because of the conflict between Microsoft driver and OpenNI driver.  When I first connected the Kinect to my laptop Microsoft driver has been automatically installed without my knowledge and it kept causing errors like the ones mentioned above. To remove,  open Device Manager  and find Microsoft Kinect. Expand it to find Microsoft Kinect camera , right click and choose uninstall. A windows pops out and  make sure you check the box Delete the driver software for this device so that the Microsoft Driver is not installed again the next time when you unplug and plug in kinect. Then click ok to uninstall. Now uninstall the existing openNI drivers and install them newly again(i.e, Start from Step1 again). The problem should be solved. The following image clarifies the steps mentioned.

Advertisements
Comments
  1. Romain says:

    Hey man,

    Thanks for the tutorial. Seems that it’s not working for me though.
    Everything’s fine until step 5 : I don’t have the PrimeSense section in the device manager.
    When I try to run the release called NiViewer I also have the error you mentioned “Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!”.
    So I tried to uninstall the Microsoft Kinect drivers and to start it all over again with the Kinect plugged in, but still the problem remains.
    Do you have an idea of how I could solve this?

    Rom

    • Hi Romain,

      Can you also make sure that you have Microsoft Visual Studio 2010 installed.[You can download freely from dreamspark.com if you are a student] . Because I believe that the binaries of SensorKinect are compiled using VS 2010 so you need to have MS VC++ 2010 redistributable.

      Apart from that make sure that all the previous drivers of libfreenect or Microsoft drivers are completely uninstalled.

      When you uninstalled the Microsoft drivers make sure you check the box of delete drivers for this device. If you connect the Kinect again you should get “drivers being installed” message and then “your device is ready to use” message. Let me know what exactly is shown under your device manager once the Kinect is connected.

      Hope that helps!

      Cheers,
      Ramsri

  2. Romain says:

    Hi Ramsri,

    Thank you for your help.

    I am using VS2008. Is there any way to get it working under this version?

    When I connect the Kinect I have the drivers installation message (Camera, Device and Audio) and the corresponding drivers appear in the device manager (Camera and Device in “Microsoft Kinect” and Audios in “Other devices”).

    After uninstalling the drivers, should I disconnect the kinect before restarting the installation?

    Apart from that your blog is really cool 😉

    Romain

    • Hi Romain,

      I believe that you have to compile the source code of SensorKinect using cmake and VS2008 compiler and generate binaries yourself.

      I am afraid that the Microsoft Kinect Driver is still causing trouble to you.
      Because ideally you should not have ” Microsoft Kinect” in your device manager. You should just have “PrimeSense” and see ” Kinect Audio, Kinect camera , Kinect Motor” when you expand prime sense. I have both the screen shots in my post and go through them once.

      Yeah disconnect the Kinect before re-installing again. This is important.

      I’m glad that you liked the blog 🙂

      Hope that information helps.

      Cheers,
      Ramsri

  3. Romain says:

    Ok I did exactly what you said and now I have in the device manager :
    – Microsoft Kinect -> Microsoft Kinect Camera
    – Other devices -> Audios
    – PrimeSense -> Kinect Motor
    And the NiViewer release is still not working.

    Romain

  4. Romain says:

    Ok so I tried to uninstall the Microsoft Kinect Camera driver and disconnect the Kinect before re-installing. I still have this “Microsoft Kinect” appearing in the device manager.

    Do you believe that generating the binaries by myself would solve the problem? (I have to admit I don’t know how to do that :p).

    Otherwise do you know how I can solve this problem?

    Cheers,
    Romain

    • Hi Romain,

      You still have “Microsoft Kinect” appearing in your device manager because I believe that you have not checked the box in the prompt when you try to uninstall Microsoft Driver where it reads “Delete the driver software for this Device” . Make sure you check that box and then uninstall Microsoft Kinect. Now unplug Kinect , install drivers of openNI,SensorKinect,Nite and reboot. Now plugin the kinect and let me know if it is working. You should not see “Microsoft driver” now in device manager.

      Please refer to the last paragraph and screenshot of this blogpost where I explain that.
      You need not do the sensor binaries compilation part. Right now the problem is because of Microsoft drivers.

      Let me know if that works.

      Cheers,
      Ramsri

  5. Romain says:

    Hi Ramsri,

    I effectively checked this box as you advised me to do. It seems to have worked for the Motor which appears now under “PrimeSense” in the device manager but the Microsoft Kinect Camera remains.

    Cheers,
    Romain

  6. Romain says:

    Hey Ramsri,

    You’re the man ! It finally worked thanks to your explanation.

    Cheers,
    Romain

    • Hi Romain,

      Glad that you finally got it working ! It would be great if you can summarize your solution so that it would be helpful for others with the same problem.

      Cheers,
      Ramsri

    • Anton says:

      Ramsri that worked!!! Thanks a lot.

      • Anton says:

        How I got Kinect working on Windows:
        0.Unplug Kinect
        Download from openni.org
        1.Latest OpenNI unstable for Win
        2.Latest PrimeSense NITE unstable (select middleware)
        Download from github avin2 [https://github.com/avin2/SensorKinect/tree/unstable/Bin]
        3.SensorKinect, appropriate for your operating system
        Install (I installed with default location. If you choose another, remember that location)
        4.OpenNI, then SensorKinect, then NITE
        5.Go to C:\Program Files\PrimeSense\Sensor\Driver (could be slightly different on your OS) and run dpinst-x86.exe or dpinst-amd64.exe depending on 32 or 64-bit OS
        6.Go to C:\Program Files\PrimeSense\NITE\Data, edit all three files (you will need admin rights):
        6a.Change licence key field from “no key” or “enter key here” to “0KOIk2JeIBYClPWVnMoRKn5cdY4=”
        6b.Google for “mapoutputmode xres yres” and look for how to change the three files
        7.Plug in Kinect
        8.Open Device manager, right-click on “Microsoft Kinect\Microsoft Kinect Camera”, Update Driver, “Browse my computer…”, “Let me pick…” and choose the one which doesn’t start with Microsoft.

      • Thanks for the detailed description on how you got it working!

        Cheers,
        Ramsri

  7. Yourikahn says:

    Hello
    have you any clues for “The procedure entry point xnloggetfilename could not be located…..” still displaying? I’ve uninstall Microsoft driver and have the three Audio/Camera/Motor device in device manager, but was not able to run any sample…

    • Hi YouriKahn,
      Please ensure you have installed all same bit versions( I recommend 32 bit) of OpenNI,SensorKinect & NITE and followed the xml file replacements carefully.
      Make a clean uninstall by removing the folders of PrimeSense and openNI in program files and reinstall again. I shall update you if I happen to find out any specific modification needed to solve this error.

      Cheers,
      Ramsri.

  8. Hi YouriKahn,

    Good to know that you have solved the issue.

  9. Fletric says:

    I’ve been messing with this for 2 days until I found your blog, followed step by step and it worked perfectly, thank you for putting time to share knowledge. Much appreciated

  10. Burak Karaboga says:

    Hey Ramsri, thanks for this detailed tutorial, it really helped me a lot.

  11. Rod says:

    Hey Thanks so much for the guide.

    The one question I have is during the OpenNI installation (Step 1) I get a pop up asking if I want to install primesense drivers.
    Should I click install or uninstall? Wasnt sure if that was causing a driver confusion as I am also having the entrypoint xncore.dll issue.

    -Rod

    • Hi there,
      I recommend to ignore the pop-up and not install it. Also go through top comments and see if u are doing everything right or not. Ensure that kinect is connected properly ( Led blinking on kinect).
      Hope that helps! Keep me posted on the status of your installation.

      Cheers,
      Ramsri

  12. Sumeet Jindal says:

    I got this working on Windows 8 64bit with 32bit drivers. You will need to disable driver signing.

  13. Anonymous says:

    4. and 5. try with your tut. But in the end, all went good! 😀
    Its important to deinstall all kinect software, starting new the pc, install all software and make changes described in this tut. Restart the pc too, wait for the automatic driver installation and than start the experiments. 😉

    it works on my Acer S3 ultrabook with win7 and a new kinect (without motor)

    greets and and many thanks to you

  14. Gagan Bhargava says:

    Thanks a lot. This tutorial really solved my problems which i had been facing since past 10 days.

    Thanks again

  15. Anonymous says:

    You sir are a life saver ! Great tutorial it worked ! Wondering how did you figure this all out? I wouldve not thought of switching files..

    Thanks,
    AM

    • Well, it took time for me to figure this out and didn’t want people out there to spend time unnecessarily. So made a tutorial that would help other folks to get started.

      Cheers,
      Ramsri

  16. Andy says:

    Hi Ramsri,

    Thank you very much for the tutorial. It worked great. I did it on a Windows 7 64-bit machine, as well as a Windows 7 32-bit machine without error.

    When I first tried to install (without your guide), I downloaded the full OpenNI Package from the OpenNI website, which only has a stable version. I was getting a weird procedure entry point error with XnDDK.dll when I tried to access the Kinect. I am blaming it on the stable version of the OpenNI package.

    Anyways, your tutorial works perfectly, highly recommend it to anybody out there having problems.
    Thanks again,
    Andy

  17. Anonymous says:

    y para ubuntu como se realiza la configuracion de la instalacion del kinect

  18. Anonymous says:

    how to perform this installation in ubuntu 11.10 because it is how to do it because when you install it in the folder nite I asked him to leave and not as activate

  19. Raja says:

    You are the man! I had to piece together the facts: all the instructions for the OpenNI software fail to mention that the most common problem now has nothing to do with x86 vs. x64 but that the original Kinect hacks were for the Xbox kinect, NOT THE KINECT FOR WINDOWS DEVICE!!!! You MUST use the avin2 package and replace the “default” kinect sensor mod as you say, and you MUST force the computer to NOT use the automatic windows update drivers, and you MUST force the computer to install the primesense drivers by navigating from driver update to “choose from a list” and selecting “all devices” and scrolling to PrimeSense and overriding the driver not signed warnings!!! Whew!

  20. Shereen says:

    Hi,
    Your tutorial is so helpful, but only one issue with me …
    I uninstalled everything and followed the tutorial but when I open the device manager I only find under Prime Sense (Kinect4Windows Camera, Kinect4Windows Audio), I can’t find the Motor driver and I don’t know from where to add it … thanks in advance:)

    • Hi ,

      If you are not going to use motor don’t worry about it and proceed with the installation.

      When I last checked I believe openni doesn’t have motor control access. You need to use libfreenect or Microsoft kinect sdk to access motor. I don’t know if things have changed in the meanwhile. Hope that helps!

      Cheers,
      Ramsri

  21. Shereen says:

    Yea, it does… thanks 🙂

  22. Kumar Gaurav says:

    Ur the man!
    It worked for me
    Thanks!!!!!!!

  23. DangNguyenVu says:

    Help
    I install x86 driver OpenNI, NITE and SenseDriver 5.1.2.1 but in Device Manager only show Kinect Motor, not have Camera and Audio. And Driver Version of Kinect Motor is 3.1.3.1.
    Do you help me? Thank

  24. raja says:

    hiii can anyone explain… if i want to use opencv for kinect means i want to instal openni or not instead of ms kinect sdk

  25. Eve says:

    Can anyone help me figure out why I am unable to get the SensorKinect binary program to work? After I start the “PrimeSense Sensor KinectMod5.1.2.1 for Windows Setup” window, I get a pop-up that says “Please install OpenNI version 1.2.0.4 or higher!”. I click “OK” because I already have the latest version of OpenNI on my computer. Then I immediately get the message that “Setup Wizard ended prematurely.” In the body of the message it only says “ended prematurely because of an error.” No hint as to what the error is.

    Thanks for any hints you can give.

  26. Paletizma says:

    Help!
    In step 1: I can’t get the download link!
    “ERROR 404
    PAGE NOT FOUND”

    Where can I find the unstable build for OpenNI? Or can I use the latest from the site: OpenNI sdk v.2.2?

    Thanks in advance! 🙂

  27. Anonymous says:

    Thanks! You helped me from hell!

  28. yahoo says:

    Hi there to all, how is all, I think every one is getting more from this site, and your views are pleasant in support
    of new visitors.

  29. Hello There. I found your blog using msn. This is a very well written article.
    I will be sure tto bookmark it and return to read more of your useful information. Thanks for
    the post. I’ll certainly comeback.

  30. matontheroad says:

    Hi ramsrigoutham,

    The install worked at the First intent !

    THANK YOU SO MUCH DUDE !!!!!
    Thanks for all the people contributing too !

    Don’t know how to write this bigger !

    Mat

  31. Anonymous says:

    HI

    Thanks for the tutorial..
    But in the step 1 and step 3 when I open the link, it says page cannot be found..
    Please help!!

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