.net wrappers for c++ SDK

leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

.net wrappers for c++ SDK

Post by leith »

Howdy.

Hey NP type people:

Is NP planning on releasing .net wrappers for the new c++ SDK? I started writing one today. Got it to the point that I'm getting a list of cameras, their IDs and setting up the NumericLEDs. Main test program is in C#, so its definitely working.

I'm wondering if I should start an open source project for these wrappers, or if you guys are in the middle of doing a wrapper yourselves? If you are planning on releasing something I wont muddy the waters. If you are not, I'd like to get a project up and running ASAP. Thks.

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

Re: .net wrappers for c++ SDK

Post by beckdo »

Hey Brad,

We're not currently working on a wrapper. In fact, I was really hoping that the community would put together a wrapper. Clearly you are thinking along the same lines.

Please let me know what I can do to be of assistance.

-Doug
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post by leith »

Good to know. I'm going to keep kicking it around for a few more days. I'll likely release a half finished (but runnable) version under the lgpl next week. License decision isn't final.

Good opportunity to get over my fear of C++.

Thks.
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post by leith »

or maybe sooner... just got it capturing frames in precision grayscale mode.
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post by leith »

My gosh this is fast. My first gen quad core intel is processing 20 cams at full 100fps and not even pinning a single core.

Very impressive. Great job NP folk.

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

Re: .net wrappers for c++ SDK

Post by beckdo »

Thanks Brad. The new SDK is a complete rewrite with the intent of making something simple & powerful for end users. All of the image processing code has been optimized to squeeze out every bit of performance while leaving as much CPU as possible for the user application.
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post by leith »

I think I saw somewhere that parts of the SDK are thread safe?

Is that to the point that say... I could spawn a thread for each camera and poll each camera for its own frames independently? Or is it better to address the cams from a single thread?
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: .net wrappers for c++ SDK

Post by beckdo »

The Camera SDK has been designed to be thread-safe. In that you can pass around camera pointers between threads set & get camera settings from different threads, fetch and process frames from different threads, etc.

However, I wouldn't suggest spawning a thread for each camera. The reasoning is that the processing load is already spread evenly across the machines cores whether you thread or not. Since this is the case, it seems reasonable to keep things as simple as possible. Additionally, there's finally a simple approach for receiving callbacks when a new frame arrives so having a thread to poll is probably overkill.

I think if done right, the wrapper layer can be kept very thin.
leith
Posts: 194
Joined: Tue Jan 02, 2007 2:17 pm

Re: .net wrappers for c++ SDK

Post by leith »

Ok. That's what I wanted to know. The wrapper layer, as you say, is super thin. Wasn't going to thread it. Its my client app I was curious about. But if its multi threaded behind the SDK then as you say, not worth breaking up again unless its for other reasons.

Thanks Doug.

The wrapper is to the point that I was able to update my open source app to use the new SDK rather than the old one.

http://code.google.com/p/kinearx2dotserver/

so... generally, I'd say its pretty functional already for less than 12 hours work.

I'll likely release soon. When I do, I'd be curious as to your feedback. Mostly, I'm taking the header files, copying them over and modifying them. Which is really just manual labor. I'm not a very experienced c++ guy so if you take a look and see any shortcuts I could take, it will be much appreciated.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: .net wrappers for c++ SDK

Post by beckdo »

Excellent Brad. Sounds like good progress. I'd be happy to review the wrapper and give feedback as it comes along.
Post Reply