How do I extract OSC information from KVL_Kinect_Tracker

Feb 12, 2013 at 5:45pm

How do I extract OSC information from KVL_Kinect_Tracker

Hello everyone, I’m planning on using the KVL_Kinect_Tracker for a school project to sonify space and I am having trouble getting the OSC data from the tracker into MaxMSP so I can sparse out the data. I’d like to separate x, y, and z axises so that I can perform various effects with that information. It would be great if you could help! Thanks

#66477
Feb 12, 2013 at 5:55pm

You have two options:

1) open the KVL patchers within Max and use a [receive] and [route]:

– Pasted Max Patch, click to expand. –

2) use OSC with a [udpreceive] and [route]:

– Pasted Max Patch, click to expand. –

For the second option, be sure to edit the ‘kinect_tracker_config.json’ to include your OSC destination in the clients list:

{“127.0.0.1″ : 7300} – send messages locally via port 7300
{“192.168.1.92″ : 8080} – send messages to any other IP/port

Make sure you turn on OSC sending with the textbutton included in the interface, and use [unpack] or a $1 etc. message box to parse the data after the [route] object.

I used this for a project recently, sending the data from one machine to another with no problems, let me know if you have any other issues.

#239284
Feb 12, 2013 at 7:18pm

Hi asgsound,

I’d recommend running it as a standalone (Medd’s 2nd option). Edit the client ip and port you want to send to in ‘kinect_tracker_config.json’ (again as Medd wrote). If you want to run the KVL Kinect Tracker on the same machine as you’re doing your max patching, just use “127.0.0.1″ is the ip (use the quotes), and any port you want to listen on.

Let’s say you’re sending to port 7300. You’ll receive a variable length list in multiples of 6 elements, depending on how many blobs are detected by the tracker.

-where i and j are in pixel space – x, y, z are in real space (dist in meters)

After routing the OSC url (by the way you can alter this url in the JSON config file), you need to pass the list through a [zl iter 6] to chop it up into chunks per blob. Then use unpack, route, zl, etc. to get the data you want. Here’s an example:

– Pasted Max Patch, click to expand. –

If you want to run the tracker as a max patch, you can receive information as done above, or you can just receive via [r kinect.blobs], as Medd showed in his first example.
All this is described in the info.rtf file that comes with the tracker, btw. Hope that helps.

best,
Zachary

#239285
Feb 12, 2013 at 8:34pm

Awesome, thanks for the help guys. I will test out both options tomorrow to see what works best for what I’m doing.

best,
Alex

#239286

You must be logged in to reply to this topic.