- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to write a test touchless program to understand its working, but the cursor doesnt seem to move .\
It is able to detect which hand is in front of the camera but doesnt move the cursor.
Here's he code.
// Create a SenseManager instance. PXCMSenseManager sm = PXCMSenseManager.CreateInstance(); // Enable the touchless controller feature. sm.EnableTouchlessController(); // Initialize the pipeline sm.Init(); // Get the module instance PXCMTouchlessController tc = sm.QueryTouchlessController(); // register for the ux events tc.SubscribeEvent(OnFiredUXEvent); tc.SubscribeEvent(UXEvent_CursorVisible); tc.SubscribeEvent(UXEvent_CursorMove); // Streaming data while (sm.AcquireFrame(true) >= pxcmStatus.PXCM_STATUS_NO_ERROR) { sm.ReleaseFrame(); } // Clean up sm.Dispose(); } private void UXEvent_CursorMove(PXCMTouchlessController.UXEventData data) { } private void UXEvent_CursorVisible(PXCMTouchlessController.UXEventData data) { textBox1.AppendText(data.bodySide.ToString()); } void OnFiredUXEvent(PXCMTouchlessController.UXEventData uxEventData) { }
Pls Help
Thanks
Shaleen
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try to use only OnFiredUXEvent handler. Here is example how I use it:
void OnFiredUXEvent(PXCMTouchlessController.UXEventData uxEventData) { switch (uxEventData.type) { case PXCMTouchlessController.UXEventData.UXEventType.UXEvent_CursorVisible: { // do something } break; case PXCMTouchlessController.UXEventData.UXEventType.UXEvent_CursorNotVisible: { // do something } break; case PXCMTouchlessController.UXEventData.UXEventType.UXEvent_CursorMove: { // do something } break; } }

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page