forums.naturalpoint.com

Discussion and Support for the OptiTrack, SmartNav and TrackIR brands by NaturalPoint

.net wrappers for c++ SDK

by beckdo » Thu Jul 19, 2012 12:10 pm

In native, it's pretty straight forward. The synchronizer class is cModuleSync. To attach and prepare cameras to return synchronized frames:

sync = new cModuleSync();
sync->AddCamera(camera1);
sync->AddCamera(camera2);

Then instead of calling camera->GetFrame(), you call sync->GetFrameGroup() which returns an array from camera frames that are synchronized.

Unforuntately this class doesn't appear to be wrapped by Brad's C# wrapper.
beckdo
NaturalPoint Employee
NaturalPoint Employee
 
Posts: 519
Joined: Tue Jan 02, 2007 2:02 pm

by jmoody6 » Fri Jul 20, 2012 7:00 am

I am using NPCameraSDKDotNet and have working C# code that calls 1 optitrack V120: SLIM camera, outputs its images to a window/saves them to a file. But I would like to do this with 2 synchronized cameras. Is this possible using NPCameraSDKDotNet? If so, how would I synchronize frames?

Any help would be greatly appreciated.
jmoody6
 
Posts: 3
Joined: Tue Jul 10, 2012 8:41 am

by motion3d » Tue May 07, 2013 5:16 am

I was able to use the wrapper with vb net code, but i couldn't get the image using the Rasterize function.

Any help with main direction or an example how to get the image using vb net will be much appreciated.
motion3d
 
Posts: 9
Joined: Thu Sep 02, 2010 2:30 am

by beckdo » Tue May 07, 2013 12:47 pm

The main challenge of getting an image into VB will be marshaling the frame buffer to store the image. You effectively need to get an array of bytes into the wrapper layer that you can then pass to the native Camera SDK Frame::Rasterize() to populate.
beckdo
NaturalPoint Employee
NaturalPoint Employee
 
Posts: 519
Joined: Tue Jan 02, 2007 2:02 pm

Previous

Return to Camera SDK