- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
In the touchless controller sample , the following code is presented incorrectly.
Can anyone tell me the correct syntax.
PXCMTouchlessController.ProfileInfo pinfo; tc.QueryProfile(out pinfo); pinfo.config= [PXCMTouchlessController.ProfileInfo.Configuration.AllowZoom, PXCMTouchlessController.ProfileInfo.Configuration.Configuration_Scroll_Horizontally]; tc.SetProfile(pinfo);
Thanks,
Shaleen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shaleen,
did you have a look at the toucless control sample in C#?
RSSDK\framework\CSharp\touchless_listbox_sample.cs
there's a simple example for that
I think this should work for multiple values:
pInfo.config = PXCMTouchlessController.ProfileInfo.Configuration.Configuration_Scroll_Vertically | PXCMTouchlessController.ProfileInfo.Configuration.Configuration_Allow_Zoom;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi Dagan,
Thanks for the reply. It worked.
But I am not able get the cursor to follow the hand. Here's the code. Please let me know what is missed out.
// 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(); PXCMTouchlessController tc = sm.QueryTouchlessController(); PXCMTouchlessController.ProfileInfo pinfo; tc.QueryProfile(out pinfo); pinfo.config = pinfo.config = PXCMTouchlessController.ProfileInfo.Configuration.Configuration_Scroll_Vertically | PXCMTouchlessController.ProfileInfo.Configuration.Configuration_Allow_Zoom | PXCMTouchlessController.ProfileInfo.Configuration.Configuration_Enable_Injection ; // register for the ux events // tc.SubscribeEvent(OnFiredUXEvent); tc.SetProfile(pinfo); // 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) { Point point = new Point(); point.X =(int) Math.Max(Math.Min(0.9F, data.position.x), 0.1F); point.Y =(int) Math.Max(Math.Min(0.9F, data.position.y), 0.1F); ; } private void UXEvent_CursorVisible(PXCMTouchlessController.UXEventData data) { textBox1.AppendText(data.bodySide.ToString()); } void OnFiredUXEvent(PXCMTouchlessController.UXEventData uxEventData) { // textBox1.AppendText("UX Event"); }

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