ubuntu14 解決openni2 驅動kinect找不到設備i

NiViewer 
openDevice failed:
    DeviceOpen using default: no devices found

Press any key to continue . . .










In addition, make sure to update the OpenNI.ini file, e.g. to run the OpenNI sample apps in OpenNI2/Samples/Bin or the NiTE sample apps in /path/to/NiTE*/Samples/Bin.

For example, I was using the 32-bit OpenNI version 2.2:

  1. I copied the libFreenectDriver.so* to /path/to/OpenNI2/Tools (there is no bin/x64-release folder in this OpenNI version).
  2. In OpenNI2/Samples/Bin, edit the file OpenNI.ini
  3. Under the [Drivers] section, at the end of the file, add the line: Repository=/path/to/OpenNI2/Tools (where you put the libFreenectDriver.so file). Below is my edited OpenNI.ini file. I used a relative path, but an absolute path will also work.

    #/path/to/OpenNI2/Samples/Bin/OpenNI.ini
    [Log]
    ; 0 - Verbose; 1 - Info; 2 - Warning; 3 - Error. Default - None
    Verbosity=3
    LogToConsole=0
    LogToFile=0
    
    [Device]
    ;Override=""
    
    [Drivers]
    ; Location of the drivers specified by a relative path based on  OpenNI's shared library or an absolute path.
    ; Path separator "/" can be used to be portable for any platforms.
    ; Default - OpenNI2/Drivers
    Repository=../../Tools
    

You'll have to do the same thing for the NiTE samples. The samples should run now.

Without updating the OpenNI.ini I always get the error DeviceOpen using default: no devices found

*ps. libfreenect installation will put the libFreenectDriver.so in /usr/local/lib/OpenNI2-FreenectDriver/


發佈了132 篇原創文章 · 獲贊 115 · 訪問量 42萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章