Kinect2 with Max7 on OSX

pauleary's icon

Hey all, I bought a Kinect2 (X Box One Kinect Sensor) for my class assuming I would be able to use it with Max because I used
a Kinect1 in the past. What I'm finding is either very outdated Kinect1 software, or Dale Phurrough's dp.kinect2 package which
is only for PC.

Is there anything new out there to run the Kinect2 with Max7 on OSX?

Thanks for any leads.

Spa's icon

someone is trying to port openni for the kinect2, but i don't think they target to have skeletons, only depth and color map.
and i dont think anyone will port it one day on Max7 osx.

its 1 of the reason why I personnaly moved to windows 10.
The dp.kinect2 by Dave is really good.
and the kinect2 too...

TiagoAngelo's icon

Hi Paul. I've recently made an external for OSX to use Kinect2, based on libfreenect2.
You can find it here: http://digitopia.github.io/ta.jit.kinect2/

As to the skeleton tracking I hope it can become a possibility (for MaxMSP) in the near future. See discussion here:
https://github.com/OpenKinect/libfreenect2/issues/243

John Daniel's icon

Hubba Hubba! THANK YOU

So - Tiagoangelo, Question -i do not have a V2 kinect yet to test with.

Will this external allow me to access the RGB camera and the depth info? I use Kinects in a "chroma-key" style, where I use the depth map to cut out the users and then use the cutout RGB signal. Am very hip to get a HD RGB signal in rather than the 640x480 I am currently dealing with with Kinects V1

Skeleton tracking can wait for another day.

thanks!
jd

TiagoAngelo's icon

I suppose so... I haven't thoroughly tested it...
but I did test it under OS X 10.10.5

also: libfreenect2 already provides a "registration" (juxtaposing RGB to depth data)...this should come out in future versions of the external

cheers

pauleary's icon

Tiagoangelo; thank you so much for this lead. One question, your .mxo file is missing the main
ta.jit.kinect2 file/subpatcher, I'm probably missing something pretty basic here....

TiagoAngelo's icon

the external is in the 'external' folder
PS: you must run max in 64-bit mode

estevancarlos's icon

On this topic, to my understanding there's only one specific version of the Kinect1 works on OSX. This was that result of my research a while ago. Not sure if that's changed. Does anyone know? I have the incorrect Kinect1 version that I could never get to work on OSX.

pauleary's icon

Ok, I've got the .mxo file in the right place, I'm running 64bit, but the console is giving me this error
and the main ta.jit.kinect2 object in your patcher is orange (like it doesn't exist). Here's the error:

ta.jit.kinect2: unable to load object bundle executable
2016-04-11 20:08:01.805 Max[2137:707] Error loading /Users/pleary/Downloads/Digitopia-ta.jit.kinect2-7c49299/external/ta.jit.kinect2.mxo/Contents/MacOS/ta.jit.kinect2: dlopen(/Users/pleary/Downloads/Digitopia-ta.jit.kinect2-7c49299/external/ta.jit.kinect
2.mxo/Contents/MacOS/ta.jit.kinect2, 262): Library not loaded: /Users/tiago/libfreenect2/build4Max/lib/libfreenect2.dylib
Referenced from: /Users/pleary/Downloads/Digitopia-ta.jit.kinect2-7c49299/external/ta.jit.kinect2.mxo/Contents/MacOS/ta.jit.kinect2
Reason: image not found

I'm still in the process of getting libfreenect2 installed, does that have to be up and working first?

John Daniel's icon

Am pretty sure the original Kinect models that do not like OSX were the 1473 ones.
The only fix I know of was returning the kinect to the pawnshop and getting it's brother instead.

TiagoAngelo's icon

Hi Paul... I tried to install it on another computer and got similar erros.
You do have to install libfreenect2, I would recommend version 0.1.1 (https://github.com/OpenKinect/libfreenect2/releases/tag/v0.1.1)
it was the one I used

Meanwhile I wrote some installation instructions and common problems:
https://github.com/Digitopia/ta.jit.kinect2/wiki/Installation

Hope this helps!
Please let me know if you got it working...

Cheers

Adam Bach's icon

Hi,
Trying to get a kinect v2 to work on osx 10.13 with max7.
I went through the install instructions for ta.jit.kinect2 and installed libfreenect2. The protonect example runs and works with my kinect (it also works swimmingly with openFrameworks). When I try to toggle on the qmetro in the ta.jit.kinect2 help patch, max freezes every time. Any ideas what's going on?
Where should I put my download of libfreenect2? in the same folder as the mxo? or ../ ?

I'm also wondering if there are any other options for getting a kinect v2 to run with max.
Thanks!

mirko's icon

Hi,
Is anyone still using kinect2? I am trying to use ta.jit.kinect2 with libfreenect2, but keep on getting the error, same as Paul:


2020-08-08 01:33:37.677 Max[776:74031] Error loading /Users/mirko/Documents/Max 8/Packages/kinect2/external/ta.jit.kinect2.mxo/Contents/MacOS/ta.jit.kinect2: dlopen(/Users/mirko/Documents/Max 8/Packages/kinect2/external/ta.jit.kinect2.mxo/Contents/MacOS/
ta.jit.kinect2, 262): Library not loaded: /Users/tiago/libfreenect2/build4Max/lib/libfreenect2.dylib
Referenced from: /Users/mirko/Documents/Max 8/Packages/kinect2/external/ta.jit.kinect2.mxo/Contents/MacOS/ta.jit.kinect2
Reason: image not found

Its Max 8 on os10.14
Did someone found the for this?
Thanks!

TiagoAngelo's icon

Hey guys. Unfortunately I won't be able to provide a lot of help. I don't have a kinect2 and I haven't worked on this project for 4 years now so I don't really recall a lot of stuff....

I might be wrong but it seems like a directory issue. Can you try to recreate the directory /Users/tiago/libfreenect2/build4Max/lib/libfreenect2.dylib ?

If this doesn't work what I can suggest right now is:
- try and run it in Max 7 in 64-bit mode
- or try running in OS 10.10.5 and Max7 (64-bit)

If none of this works try compiling the object using XCode. You can use the debugger found here: https://github.com/Digitopia/ta.jit.kinect2/wiki/Debugging

Hope you can make it happen...
BTW feel free to fork the repository and make changes to the code.
Cheers

mirko's icon

Thank you Tiago,
I will check the code and post if i get somewhere.
Using Max7 and recreatnig the directory path didn't help.
at the moment, i will have to stay with Kinect 1 and freenect external.