Software Archive
Read-only legacy content

Touchless listbox

HexLord
Beginner
817 Views

HI,

I am trying out the touchless list box functionality.  The Sample works fine but my use case is  simpler that the one in the sample.

In my test code , I just want to select one of the 2 options. How can I do that using the touchless controller.?

I tried adding swipeleft and swiperight gesture.as in the documentation.

tc.AddGestureActionMapping("SwipeLeft", PXCMTouchlessController.Action.Action_NextTrack)

How I use this statement to select a button on screen. I want to  select an option if user swipes right and another if user swipes left.

 

Thank You,

Shaleen

 

0 Kudos
6 Replies
HexLord
Beginner
817 Views

Also, I am not able to get the swipe gesture to work. It does not get recognized.

0 Kudos
steve-vink
Beginner
817 Views

I have found the swipe gesture very difficult to activate. Sometimes it works, sometimes it doesn't.

What would be useful is a diagram of what a swipe actually is. Is it a flat hand, or a finger? Must it stay parallel to the camera, or swipe in an arc? What kind of speed is recognised? How far do you have to move for a swipe to be registered?

 

0 Kudos
Colleen_C_Intel
Employee
817 Views

the closest diagram I can point you to quickly ishttp://www.samsung.com/ph/smarttv/common/guide_book_3p_si/img/hand2.png. It's a fairly slow movement- maybe 2 seconds max from the straight down to finish. 

0 Kudos
HexLord
Beginner
817 Views

 hi,

I have issue in touchless controller. I tried running an application from the documentation but it does not detect hand when presented in front of the camera. Here's the code.

Also, I dont see any complete applications or code snippets in the documentation. 

I void OnFiredUXEvent(PXCMTouchlessController.UXEventData uxEventData) {
   // handle the event….
};
 
// 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);
 
// Streaming data
while (sm.AcquireFrame(true)>=pxcmStatus.PXCM_STATUS_NO_ERROR) {
   sm.ReleaseFrame();
}
 
// Clean up
sm.Dispose();

 

 

Thanks,

Shaleen

0 Kudos
Yinon_O_Intel
Employee
817 Views

Hi,

Just tested the code you sent, When a hand with open palm is presented in front of the camera I get the right event thrown to OnFiredUXEvent.

Did you try to add some log to that method?

 

Yinon

0 Kudos
HexLord
Beginner
817 Views

hi, 

 I get that event as well. But I wanted to get the cursor to move when the hand is moved . I think it needs some code to be written in the CursorMove event. 

Also could you tell  me if it is possible to map another gesture to fire the Select event. Currently , tap gesture fires the Select event.

Thanks,

Shaleen

0 Kudos
Reply