We have a problem with the Kinect V2. We use Google and the Microsoft documentation to find a solution but we found nothing.
We get a Exception when we try to load the gesture from the database:
private readonly string gestureDatabase = @"Database\ChiMoGestures.gbd";
. . .
VisualGestureBuilderDatabase database = new VisualGestureBuilderDatabase(this.gestureDatabase)
When the program comes to this position,it throws a System.InvalidOperationException , exactly:
An unhandled exception of type 'System.InvalidOperationException' occurred in Microsoft.Kinect.VisualGestureBuilder.dll
Additional information: This API has returned an exception from an HRESULT: 0x80004005
Maybe the database self is not correct but we got it with the
I am glad if anyone has a solution for this problem?
Not sure if this is relevant since the question is quite old, but I will answer it anyway.
The Visual Gesture Builder dll is throwing this error because it is missing some files it needs to work. Specifically, it needs the dlls of the two algorithms that perform the gesture recognition - AdaBoost and RFRProgress. These two dlls are available under your Kinect SDK folder, usually located at:
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409\Redist\VGB\x86\vgbtechs
C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409\Redist\VGB\x64\vgbtechs
depending on your platform.
Luckily, there is a way to automate this process via Post-build command in Visual Studio. Go to Project -> Properties -> Build Events -> Edit Post-build ...
xcopy "$(KINECTSDK20_DIR)Redist\VGB\$(Platform)\vgbtechs" "$(TargetDir)\vgbtechs" /S /R /Y /I
This will ensure that you have the dlls in your Build directory no matter what your platform setting is.
User contributions licensed under CC BY-SA 3.0