none
a question on VGB RRS feed

  • Question

  • After  look at the 2 videos now live on Channel 9, I still have a question on VGB.

    When running the sample DiscreteGeatureBasics inKinect browser , calling my own . gbd  file builded by  VGB replacing its "seated.gbd",it has an error:

    "System. InvalidOperationException" type of exception happen in  Microsoft.Kinect.VisualGestureBuilder.dll , but not handled in the user code

    Other information: This API has returned an exception from the an HRESULT: 0 x80004005

     How to call my own .gbd in the code?

    • Edited by oniya Thursday, December 18, 2014 8:44 AM
    Thursday, December 18, 2014 8:38 AM

Answers

All replies

  • Hi, oniya.

    Your problem may be not about .gdb. Try following

    1. edit your project build event (right click your project -> properties -> build events)
    2. past following codes into `post build event command line`
    xcopy "$(KINECTDFK20_DIR)Redist\VGB\$(Platform)\vgbtechs" "$(TargetDir)\vgbtechs" /S /R /Y /I

    I found this command line from sample of SDK Browser for WPF.

    Thursday, January 1, 2015 4:40 PM
  • Thanks vey much for your reply.  I check this codes in the WPF, there is no problem.

    I mean it's ok when running the sample DiscreteGeatureBasics,

            /// <summary> Path to the gesture database that was trained with VGB </summary>
            private readonly string gestureDatabase = @"Database\Seated.gbd";
    
            /// <summary> Name of the discrete gesture in the database that we want to track </summary>
            private readonly string seatedGestureName = "Seated";
    
            /// <summary> Gesture frame source which should be tied to a body tracking ID </summary>
            private VisualGestureBuilderFrameSource vgbFrameSource = null;
    
            /// <summary> Gesture frame reader which will handle gesture events coming from the sensor </summary>
            private VisualGestureBuilderFrameReader vgbFrameReader = null;

    but it has an error when I replace "seated.gbd"  as my own gbd  for example "Drink.gbd" like this:

            private readonly string gestureDatabase = @"Database\DiscreteDrinkWater.gbd";
    
            private readonly string seatedGestureName = "Seated";

     


     
    Monday, January 5, 2015 7:19 AM
  • The error in this line:
              using (VisualGestureBuilderDatabase database = new VisualGestureBuilderDatabase(this.gestureDatabase))
                {
                    foreach (Gesture gesture in database.AvailableGestures)
                    {
                        if (gesture.Name.Equals(this.seatedGestureName))
                        {
                            this.vgbFrameSource.AddGesture(gesture);
                        }
                    }
                }
            }

    Monday, January 5, 2015 7:21 AM
  • Is the .gdb file getting copied to your build directory? Did you mark the property as content?

    Carmine Sirignano - MSFT

    Monday, January 5, 2015 8:44 PM
  • ouch! I didn't mark the property!   Thank you very very much!~~
    Tuesday, January 6, 2015 1:22 AM