# Use Kinect 1 or 2 sensors with Processing 2 or 3

**URL:** https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86
**Category:** Libraries
**Created:** [May 18, 2018, 7:47am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86 "2018-05-18T07:47:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [May 18, 2018, 7:47am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/1 "2018-05-18T07:47:20Z")

</div>

SimpleOpenNI [Repository](https://totovr.github.io/SimpleOpenni/)

---

<div class="post-metadata">

### Author: ![hamoid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/hamoid/32/58_2.png) [@hamoid](https://discourse.processing.org/u/hamoid)
#### Post date: [May 19, 2018, 9:32am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/2 "2018-05-19T09:32:12Z")

</div>

Hi! Thanks for sharing! For those who don’t know: what can you do with this library? Does it require specific hardware? The GitHub page seems to assume the user knows what is SimpleOpenNI. I didn’t find an explanation of its purpose 🙂

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [May 19, 2018, 10:00am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/3 "2018-05-19T10:00:57Z")

</div>

Sorry! but the library is used to be able to use the Kinect Sensor with Processing, I assumed that most of the people that worked or is currently working knew about it.

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [May 21, 2018, 8:23pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/4 "2018-05-21T20:23:22Z")

</div>

@totovr76 – thanks for posting this!

I also think it is a great suggestion to add a top description line like:

> “Use Kinect 1 or 2 sensors with Processing 2 or 3”

to the top of this thread, and to:

- [GitHub - totovr/SimpleOpenNI: SimpleOpenNI library for Processing 3.5.2, 3.4, 3.3.7, 3.3.6 on MacOS for V1 and V2](https://github.com/totovr/SimpleOpenni)
- [https://totovr.github.io/SimpleOpenni/](https://totovr.github.io/SimpleOpenni/)

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [May 21, 2018, 11:42pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/5 "2018-05-21T23:42:01Z")

</div>

Updated! @jeremydouglass

---

<div class="post-metadata">

### Author: ![lmccandless](https://avatars.discourse-cdn.com/v4/letter/l/f0a364/32.png) [@lmccandless](https://discourse.processing.org/u/lmccandless)
#### Post date: [May 21, 2018, 11:47pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/6 "2018-05-21T23:47:09Z")

</div>

Can anyone confirm which versions of kinect work with which versions of processing?  
Does KinectV2 only work with win10 or is win7 good? That link seemed to suggest it only works on OSX.

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [May 22, 2018, 12:02am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/7 "2018-05-22T00:02:43Z")

</div>

As I wrote in the decription, this is only working for Mac users, I don’t have any windows computer to taste it

---

<div class="post-metadata">

### Author: ![Jackieh111](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@Jackieh111](https://discourse.processing.org/u/Jackieh111)
#### Post date: [February 9, 2019, 9:32pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/9 "2019-02-09T21:32:55Z")

</div>

does your library work with processing 3.5.3 - I installed SimpleOPenNI in my sketch folder but when I run the test same program [https://github.com/totovr/SimpleOpenni/tree/Processing\_3.5.2](https://github.com/totovr/SimpleOpenni/tree/Processing_3.5.2)  
I get SimpleOpenNi Error: Can’t open device: DeviceOpen using default: no devices found.

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [February 10, 2019, 2:26am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/10 "2019-02-10T02:26:16Z")

</div>

Did you follow the [instructions](https://github.com/totovr/SimpleOpenNI/blob/master/instructions.md) file?

---

<div class="post-metadata">

### Author: ![Jackieh111](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@Jackieh111](https://discourse.processing.org/u/Jackieh111)
#### Post date: [February 15, 2019, 1:10am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/11 "2019-02-15T01:10:59Z")

</div>

I reinstalled my Mac so I got it working now (at least initializes) but I get a time-out as follows:

After initialization:

[Info] [Freenect2DeviceImpl] opening…  
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20_16384 ir: 4_128\*33792  
[Info] [Freenect2DeviceImpl] opened  
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB\_ERROR\_TIMEOUT Operation timed out  
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB\_ERROR\_TIMEOUT Operation timed out  
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB\_ERROR\_TIMEOUT Operation timed out

Any clues? My machine is old, mid 2012 MAC but does have USB3 port for the Kinect2 and I can get Shiffman’s examples running.

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [February 15, 2019, 1:39am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/12 "2019-02-15T01:39:42Z")

</div>

Go to:

`~/OpenNI2/Drivers/`

In my case:

![40694436-7cfd2750-63f7-11e8-9edc-3e8e80e3c56b](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6422b84b100e44942a6cf6f2de0059c7bffa1ce8.png)

and paste the drivers directly in the SimpleOpenNI folder:

`/libraries/SimpleOpenNI/library/osx/OpenNI2/Drivers/libfreenect2-openni2.0.dylib` and `/libraries/SimpleOpenNI/library/osx/OpenNI2/Drivers/libfreenect2-openni2.dylib`

---

<div class="post-metadata">

### Author: ![Jackieh111](https://avatars.discourse-cdn.com/v4/letter/j/9e8a1a/32.png) [@Jackieh111](https://discourse.processing.org/u/Jackieh111)
#### Post date: [February 15, 2019, 6:30pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/13 "2019-02-15T18:30:09Z")

</div>

Thanks you so much I got it working. I was not installing the OpenNI2 drivers correctly - I did the libfreenect2 build & install before installing and exporting the drivers so perhaps that was the reason.  
Thanks again.

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [February 16, 2019, 12:21am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/14 "2019-02-16T00:21:42Z")

</div>

Cool! hope you can end your project soon.

---

<div class="post-metadata">

### Author: ![yuxinnuo](https://avatars.discourse-cdn.com/v4/letter/y/7bcc69/32.png) [@yuxinnuo](https://discourse.processing.org/u/yuxinnuo)
#### Post date: [March 5, 2019, 10:15am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/15 "2019-03-05T10:15:57Z")

</div>

Hi! I am using Kinect V1 and just download and paste the library in the the Processing folder, but no devices found:cry:

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [March 5, 2019, 10:27am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/16 "2019-03-05T10:27:55Z")

</div>

Which is the output of the log? and which version of OS?

---

<div class="post-metadata">

### Author: ![yuxinnuo](https://avatars.discourse-cdn.com/v4/letter/y/7bcc69/32.png) [@yuxinnuo](https://discourse.processing.org/u/yuxinnuo)
#### Post date: [March 7, 2019, 2:19am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/17 "2019-03-07T02:19:08Z")

</div>

> [@totovr76](#):
>
> output of the log

SimpleOpenNI Version 1.96  
After initialization:  
SimpleOpenNI Error: Can’t open device: DeviceOpen using default: no devices found  
NullPointerException  
macOS version is 10.14 and my processing version is 3.53

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [March 7, 2019, 2:39am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/18 "2019-03-07T02:39:38Z")

</div>

Can you try one version of the previous branches?

---

<div class="post-metadata">

### Author: ![totovr76](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/totovr76/32/50_2.png) [@totovr76](https://discourse.processing.org/u/totovr76)
#### Post date: [March 15, 2019, 1:50am UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/19 "2019-03-15T01:50:41Z")

</div>

I tried Kinect 1 in Processing 3.5.3 and is working:

![depthTwo](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/f2d93f06a4e72566b6c1c524bfe35d77fde0420f.png)

 ![point](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/99fde4c66ef7862c999501fdabde69416b179328.png)

---

<div class="post-metadata">

### Author: ![schmittmachine](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@schmittmachine](https://discourse.processing.org/u/schmittmachine)
#### Post date: [May 7, 2019, 10:13pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/20 "2019-05-07T22:13:17Z")

</div>

For your information on this “no device found problem”, I had the same problem on MacOS10.13.6 with a kinect V1 (model 1414) in Processing 3.5.3.

I solved it by doing all the installation process detailed in the [https://github.com/totovr/SimpleOpenNI/blob/master/instructions.md](https://github.com/totovr/SimpleOpenNI/blob/master/instructions.md) page, which is said to be necessary only for kinectV2. So I installed freenectv2 and OpenNI2.

After this, the problem was just gone.

I did not copy any dylib into the SimpleOpenNI folder.  
And there was no `libfreenect2-openni2.dylib` file in the `libfreenect2/build/lib` folder. Nor in the `~/OpenNI2/Drivers/` folder.

Hope this helps…

---

<div class="post-metadata">

### Author: ![rossig7](https://avatars.discourse-cdn.com/v4/letter/r/4af34b/32.png) [@rossig7](https://discourse.processing.org/u/rossig7)
#### Post date: [October 14, 2019, 7:02pm UTC](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86/21 "2019-10-14T19:02:21Z")

</div>

Coukd anyone got it working on Linux/Ubuntu with Processing 3.5.3.? I am aware it was developed for Mac, but I gave it a try since the Linux libraries are into the branch. I appreciate any hints regarding this.  
Ubuntu 19:04  
Kinect V1  
Thanks!

[Next page](https://discourse.processing.org/t/use-kinect-1-or-2-sensors-with-processing-2-or-3/86.md?page=2)
