Ask Your Question
0

problem with kinect()..

asked 2013-07-03 03:54:38 -0500

Purva3192 gravatar image
 purva@ubuntu:~/SmCV$ python p9.py
Error: Invalid index [0]
Error: Can't open device. 1.) is it plugged in? 2.) Read the README
ERROR: 
Traceback (most recent call last):
  File "p9.py", line 5, in <module>
    img = kin.getImage()
  File "/usr/local/lib/python2.7/dist-packages/SimpleCV-1.3-py2.7.egg/SimpleCV/Camera.py", line 977, in getImage
    video = freenect.sync_get_video(self.deviceNumber)[0]
TypeError: 'NoneType' object has no attribute '__getitem__'

i was trying simple kinect program... .py file

from SimpleCV import Kinect
import time 
kin = Kinect()

img = kin.getImage()

img.show()
time.sleep(5)

..so plzz get me out of this...is there problem with code???or in my installation of freenect package?? Do i need something extra to be installed to make this program run.??.

edit retag flag offensive close merge delete

Comments

`freenect-glview` try this command in the terminal. If it doesn't work, it means there might be some problems with kinect.

jayrambhia gravatar imagejayrambhia ( 2013-07-03 06:57:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-31 20:16:41 -0500

You need to install the python wrappers for libfreenect.

Find the setup file in the libfreenect/wrappers/python folder then do

python setup.py install

Once that finishes you should be able to do

python
>> import freenect

With this taken care of, you shouldn't have problems anymore with the SimpleCV kinect API.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-07-03 03:54:38 -0500

Seen: 369 times

Last updated: Jul 03 '13