Software Archive
Read-only legacy content

f200 camera - finger detection does not work

leonid_b_1
Beginner
336 Views

hello,

I am running my f200 camera in hand detection mode, I get crash while i am trying to get AcquireFrame.

I would like that my camera detect my hand(one of my fingers) and will write to output the coordinate of it.

This is my code:

            // Create a PXCMSenseManager instance
            PXCMSenseManager sm = PXCMSenseManager.CreateInstance();

            // Select the depth stream
            sm.EnableHand();

            // Get an instance of PXCMHandModule 
            PXCMHandModule handModule = sm.QueryHand();

            // Create the hand data instance
            PXCMHandData handData = handModule.CreateOutput();

            PXCMHandData.IHand hand;

            // Get an instance of PXCMHandConfiguration
            PXCMHandConfiguration handConfig = handModule.CreateActiveConfiguration();

            // Make configuration changes and apply them
            handConfig.EnableJointSpeed(PXCMHandData.JointType.JOINT_INDEX_BASE,PXCMHandData.JointSpeedType.JOINT_SPEED_ABSOLUTE, 3);
            handConfig.EnableAllAlerts(); ;

            // set other configuration options
            handConfig.ApplyChanges(); // Changes only take effect when you call ApplyChanges

            sm.Init();

            PXCMHandData.FingerData fingerData;
            PXCMHandData.ExtremityData extremitydata;

            // Main processing loop
            while (sm.AcquireFrame(true).IsSuccessful())
            {
                // Retrieve current hand tracking results
                handData.Update();

                handData.QueryHandData(PXCMHandData.AccessOrderType.ACCESS_ORDER_BY_ID, 1, out hand);

                hand.QueryFingerData(PXCMHandData.FingerType.FINGER_INDEX, out fingerData);

                hand.QueryExtremityPoint(PXCMHandData.ExtremityType.EXTREMITY_CLOSEST, out extremitydata);

                Console.Clear();
                Console.WriteLine("X = " + extremitydata.pointWorld.x);
                Console.WriteLine("Y = " + extremitydata.pointWorld.y);
                Console.WriteLine("Z = " + extremitydata.pointWorld.z);

                // Resume next frame processing
                sm.ReleaseFrame();
            }
            handData.Dispose();
            sm.Dispose();

thanks,Leonid

0 Kudos
2 Replies
Xusheng_L_Intel
Employee
336 Views

Have you tried our sample app @C:\Program Files (x86)\Intel\RSSDK\framework\CSharp\FF_HandsViewer.cs? What is your configure of your system? Thanks!

0 Kudos
leonid_b_1
Beginner
336 Views

Hello David,

The HandsViewer app does not work.

What do you mean when you ask about my config? I work on win 10 and I intall the latest version of the sdk and of the camera depth manager.

0 Kudos
Reply