Synchronized tracking data and video frames

Post Reply
baboon1114
Posts: 2
Joined: Fri Nov 30, 2012 8:07 am

Synchronized tracking data and video frames

Post by baboon1114 » Mon Feb 25, 2013 9:16 am

Hi all,

This forum is great and had solved many of my doubts. I really appreciate it.

Here is one question that I couldn't find answer within the forum: How to stream out marker tracking data and video frames synchronously using multiple Optitrack cameras?

I am using three FLEX13 cameras, and I'm trying to using two of them to stream tracking data through NatNet (while TT is broadcasting) and using the third one to save video frames through camera SDK.

I've already got both (tracking data streaming via NatNet and video frame saving in SDK) to work, but only separately. I couldn't get them to work at the same time, not to mention synchronously yet.

What I'm doing: I put Cam1 and Cam2 (connected to OptiHub2) in my camera group in TT to broadcast tracking data into NatNet, while Cam3 is removed from TT camera group and controlled only through camera SDK. However, once I start SDK to pull images from Cam3, since the SDK will try to detect all the cameras that are connected to the computer, it will cause both Cam1 and Cam2 to stop streaming data in Tracking Tools.

I'm wondering if anyone know how to solve this issue? I'm using NatNet because I need both 6DOF data of a rigidbody and 3DOF data of unlabeled single markers, but I don't necessarily have to use camera SDK if there's another way to save .avi videos from the camera. I would really really appreciate you guys' help. Thank you very much!!!

NaturalPoint - Brent
NaturalPoint Employee
NaturalPoint Employee
Posts: 59
Joined: Tue Nov 20, 2012 12:40 pm

Re: Synchronized tracking data and video frames

Post by NaturalPoint - Brent » Wed Feb 27, 2013 7:12 am

There is a way to access both the TT API and the Camera SDK through the TT API. Use this call to get the Camera Manager instead of the standard Camera SDK approach and from there you should be good to go:

//== CAMERA MANAGER ACCESS ====================================================================================----- TTAPICameraLibrary::CameraManager * TT_GetCameraManager(); //== Returns a pointer to the Camera SDK's =====--- //== CameraManager ==============================--- Give this a try and let us know if you run into any issues.

baboon1114
Posts: 2
Joined: Fri Nov 30, 2012 8:07 am

Re: Synchronized tracking data and video frames

Post by baboon1114 » Wed Mar 13, 2013 3:52 pm

Hi Brent,

Thank you very much for the advice. I tried this method you recommended (Use the TT_GetCameraManager to access the camera memory), but it still froze the Tracking Tools, even if I do nothing other than returning a pointer to the Camera SDK's camera manager as following:

CameraLibrary::CameraManager* p_myCameraManager = NULL;

p_myCameraManager = TT_GetCameraManager(); //As soon as I run this line it hangs the Tracking Tools software

I checked the posts on the forum and I saw this post mentioned the similar problem (http://forum.naturalpoint.com/forum/ubb ... #Post54252). I followed the recommendation posted by Doug and set the runtime library to link statically. It helped preventing the Tracking Tools from freezing at the very beginning, but as soon as I call TT_GetCameraManager it still hangs the Tracking Tools immediately.

I'm really not sure what else I did wrong. Could you give me some advice on that? Thank you very much!!!

Post Reply