c# - Error adding gesture to visual gesture builder frame source with kinect v2 -


after creating gesture database using visual gesture builder, i'm trying write own project detect gestures. after see example of "discretegesturebasics-wpf" comes sdk browser, tried write own code, when i'm trying add gesture "visual gesture builder frame source" object, i'm getting exception:

"a first chance exception of type 'system.invalidoperationexception' occurred in microsoft.kinect.visualgesturebuilder.dll"

i added in post-build event line "xcopy "$(kinectsdk20_dir)redist\vgb\x64\vgbtechs" "$(targetdir)\vgbtechs" /s /r /y /i" still not working.

if i'm using example comes kinect sdk, working fine, when i'm trying write own project isn't working @ all. test custom database on project , it's working.

this line code isn't working:

     foreach (gesture gesture in database.availablegestures)      {          if (gesture.name.equals(this.hands) || gesture.name.equals(this.handsup))             {                     this.vgbframesource.addgesture(gesture);             }      } 

hope can me..

it bit hard answer information provided, however, see error in post-build event command line. explicitly specifying platform - x64 - , project building under x86 or win32 configuration, cause dll mismatch , not work.

replace 'x64' value '$(platform)' , see if error persists.

also, check 2 files in build directory -

  • microsoft.kinect.visualgesturebuilder.dll
  • microsoft.kinect.visualgesturebuilder.xml

these 2 should automatically copied when add reference microsoft.kinect.visualgesturebuilder, make sure there.

in case have created own gesture database file, can try run code gesture database comes example code , see happens.

source: personal experience. have been working gesture recognition on sample , own code since kinect v2 came out.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -