.net wrappers for c++ SDK

beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: .net wrappers for c++ SDK

Post by beckdo »

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.
jmoody6
Posts: 3
Joined: Tue Jul 10, 2012 8:41 am

Re: .net wrappers for c++ SDK

Post by jmoody6 »

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.
motion3d
Posts: 9
Joined: Thu Sep 02, 2010 2:30 am

Re: .net wrappers for c++ SDK

Post by motion3d »

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.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: .net wrappers for c++ SDK

Post by beckdo »

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.
BroncoBilli
Posts: 7
Joined: Sat Jan 14, 2023 2:20 am

Re: .net wrappers for c++ SDK

Post by BroncoBilli »

Hm. I haven't seen this thread. I have been working on a few wrappers for the Motive/Camera SDK stuff. It might warrant a new thread.

My stuff:

1. Creates a slightly smarter C++ API layer to do different housekeeping chores with the OT stuff. Like auto switching the stuff between the CameraSDK and the MotiveAPI, to do different things. I had to do this because (apparently) TT_CameraFrameBuffer() or whatever it is called to get the luma bits from the camera, is busted in the MotiveAPI's TT call.

2. Creates a C# wrapper around the C++ motive layer. This allows you to directly call a lot of motive stuff from C#.

3. Creates a gRPC stack, so you can call the motive stuff from a REMOTE computer and get the bits back.

I was thinking of making this open source....

my email is motive - dogstar - us, if you replace the first dash with 'at', and the second dash with a dot, that is my email.
Or I'll look back here occasionally.
anagysm
Posts: 3
Joined: Thu Jan 27, 2022 1:51 am
Location: Hungary

Re: .net wrappers for c++ SDK

Post by anagysm »

Hi,

We are developing an application in .NET Core and we would like to use 3D marker coordinates and/or rigid body position in this app.
If I understand the documents I think we should use the MotiveAPI to get these information. I built a wrapper DLL to export desired methods to access it from C# but I have several issues here. First I created a console app for testing purposes and set everything to 64bit. After I start it and call the TT_Initialize method I received this message:

Code: Select all

QWindowsContext: OleInitialize() failed:  "COM error 0xffffffff80010106 RPC_E_CHANGED_MODE (Unknown error 0x080010106)"
I get same message if I run the marker example code. Is this something installation issue?

In my code sometime I receiving this message if I call the TT_Initialize():

Code: Select all

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
If I run it under Visual Studio I can see this dialog then the application exit:

Code: Select all

Motive Error 1732 Debugger has been found running in your system. Please, unload it from memory and restart your program
I using Motive 3.0.1.
Anybody met these issues? Is there any solution?
bandknobby
Posts: 2
Joined: Sun Jan 28, 2024 8:09 am

Re: .net wrappers for c++ SDK

Post by bandknobby »

Thank you, for your contribution. The new Software Development Kit (SDK) represents a significant milestone as it has been completely rewritten with a focus on simplicity and power for end-users. We've optimized all of the image processing code to maximize performance, ensuring that the SDK operates efficiently while leaving ample CPU resources available for user applications. This dedication to optimization allows developers to harness the full potential of the SDK without sacrificing system resources, ultimately enhancing the overall user experience. We're excited about the possibilities this new SDK opens up and look forward to its impact on future projects.
Jack2024
Posts: 1
Joined: Thu Jul 25, 2024 12:42 am
Contact:

Re: .net wrappers for c++ SDK

Post by Jack2024 »

Can you tell me what dll you are accessing to communicate with the camera?
Post Reply