xxorde / librekinect

Depth data from a kinect sensor! Small and fast kernel driver. Also for embedded devices like the raspberry pi!
407 stars 68 forks source link

Undefined stream and/or choppy images on Raspberry Pi #8

Open kaij opened 9 years ago

kaij commented 9 years ago

I successfully compiled everything and get a /dev/video0 device on my Raspberry Pi. However, what the video will show is somewhat random:

  1. Just after booting: it will show either the RGB stream or the raw infrared stream. This is dependent on the image size setting in camorama (Small, Medium, Large). It will give a stable stream between 10-14fps.
  2. After unloading the drivers and reloading (insmod gspca.ko, insmod kinect), the depth stream shows up. However, it has a very low framerate (5-7fps) and images are very choppy. Means: it will show the correct depth images, but will have shifted/distorted blocks inside the image. When choosing the "Small" image size, sometimes it will show a small - almost undistorted - depth stream, but also sometimes not.

Questions:

Logs: there are lots of these in the log: kinect: [Stream 70] Invalid magic ffff

Update: ok, I figured out how to load the drivers correctly. But the depth image stays choppy! Using kernel 3.12.29, Kinect XBox 1414, RPI B+. I'm wondering whether it's related to the version of the Kinect - which Kinect did you use, 1414 or 1473?

kaij commented 9 years ago

I compiled everything (and adjusted gspca.c) for kernel 3.4.103 and a BananaPI. It'll deliver a fine depth image at 25fps (displayed with camorama). The depth image is correct and does not have any distortions or choppiness. So this seems to be a problem on the Raspberry PI. Would be nevertheless interesting to have an idea for a solution...

lucyking commented 9 years ago

hi kaji,please would you tell what we should modifiy specially in gspca.c for Banana Pi?Many thanks :-)

kaij commented 9 years ago

If I remember correctly I more or less copied the gspca.c/h from the new 3.4.x kernel sources into this project and added the multi-stream support in vidioc_enum_fmt_vid_cap (using a diff). Sorry, I don't have the code right here anymore, but I could check whether I still have it on the pi itself. You also need to blacklist the gspca_kinect kernel module as this will interfere with the adjusted module.

lucyking commented 9 years ago

oh~ may God bless we can find the code on the pi ><