Software Archive
Read-only legacy content
17061 Discussions

Issue with the assembly file libpxcclr.cs

HexLord
Beginner
493 Views

Hi,

I am trying out the hand recognition function in a test app. 

The application quits with the following error in Viusal Studio.  I tried to comment the psm.Enablehand() statement and the error was gone.

there seems to be a problem in the assembly file.

Pls help.

assemblrproblem.png

Thanks,

Shaleen

0 Kudos
2 Replies
Pubudu-Silva_Intel
493 Views

Could you share your code please, for us to have a look

0 Kudos
HexLord
Beginner
493 Views

hi,

here's the code and the error again. Most of it is from the tuchless listbox sample. I did not face any issues in running the sample.

Pls help.

 

 public partial class MainWindow : Window
    {
        static PXCMHandData.GestureData data;
        PXCMSenseManager sm;
        PXCMHandModule handmodule;
        PXCMHandData handdata;
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded_1(object sender, RoutedEventArgs e)
        {
            startrealsense();
            configure();
            StartFrameLoop();
        }
        private void configure()
        {
            PXCMHandConfiguration handcfg = handmodule.CreateActiveConfiguration();

            handcfg.EnableAllGestures();
            handcfg.LoadGesturePack("navigation");

            // Enable a gesture
            handcfg.EnableGesture("swipe");
            handcfg.EnableGesture("fist");
            handcfg.ApplyChanges();
            handcfg.Update();
            handcfg.SubscribeGesture(new PXCMHandConfiguration.OnFiredGestureDelegate(handler));
            Console.Write("config");
        }
        private void startrealsense()
        {
            sm = PXCMSenseManager.CreateInstance();
            Console.WriteLine("Creating SenseManager: " + sm == null ? "failed" : "success");

            Console.Write("problem");
            //       sm.EnableHand();

            handmodule = sm.QueryHand();
            handdata = handmodule.CreateOutput();

            sm.Init();
            Console.Write("here");

            //  ptc.SubscribeEvent(new PXCMTouchlessController.OnFiredUXEventDelegate(OnTouchlessControllerUXEvent));

        }

        private void handler(PXCMHandData.GestureData gestureData)
        {
            Console.Write("gesture");
        }
        private void StartFrameLoop()
        {
            sm.StreamFrames(false);
            Console.Write("frame2");
        }
    }

ERROR Image

assemblrproblem1.png

0 Kudos
Reply