Using console as a Client

Nov 8, 2012 at 6:45 PM

Hello

First of all thank you for that library it's very usefull! I've only one problem, I' have compiled a c++ function as a .exe and I''m trying to call that console executable with a wpf application. But skeleton client doesn't work if it's not called with a routedevenargs. Is there anyway to call skeletonclient in the main void of the console or maybe to create an Event Args in order to use the console as a client?

Coordinator
Nov 8, 2012 at 6:47 PM

You can try grabbing the SkeletonFrame property off the SkeletonClient object instead of subscribing an event, but I'm not sure if that would work in your scenario.

Nov 8, 2012 at 7:13 PM

I already tried it without sucess. If I don't call the skeletonclient within an event argrs method i get a system reference null exeption during runtime no matter what i do with the skeleton frame. Thank a lot for your quick answear

Coordinator
Nov 8, 2012 at 9:07 PM

Ah. I see what's wrong. The WPF client assumes a SynchronizationContext since it's intended to be used from WPF, which always has one.  In SkeletonClient.cs, remove the wrapper call to Context.Send on line 43.  Turn that chunk into the following:

	if(SkeletonFrameReady != null)
		SkeletonFrameReady(this, args);

Nov 8, 2012 at 9:35 PM

Ok I'm goona try that tomorow but it seems good to me. I' ll let you know thank you so much for your help

Nov 12, 2012 at 10:35 AM

Ok it works great, I'm now aible to export skeleton position data! May i ask you another thing? In order to improve skeleton's accuracy I've coded an application which  delete the depth background and i'm trying to launch skeleton stream from tha modifyed depth Data. But the skeleton stream can be enable directly from a kinect sensor so do you think it's possible to create a virtual kinect where i set its depth data? Sorry To bother you again and thanks à lot

Coordinator
Nov 12, 2012 at 4:02 PM

That's not possible that I'm aware of...