Hello
Thank you for the code.
Actually, the following error is shown. How to solve this problem. Thank you.
'MSR_NuiApi.h': No such file or directory
C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: Compile of 'getimagedata.cpp' failed.
I cannot get this code to compile. First, it complains "fatal error C1083: Cannot open include file: 'MSR_NuiApi.h': No such file or directory".
Then, if I change the include statement to #include <NuiApi.h>, I get the following:
getimagedata.cpp
getimagedata.cpp(42) : warning C4305: 'return' : truncation from 'int' to 'bool'
getimagedata.cpp(43) : error C2065: 'NuiImageBuffer' : undeclared identifier
getimagedata.cpp(43) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(44) : error C2065: 'KINECT_LOCKED_RECT' : undeclared identifier
getimagedata.cpp(44) : error C2146: syntax error : missing ';' before identifier 'LockedRect'
getimagedata.cpp(44) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(45) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(45) : error C2227: left of '->LockRect' must point to class/struct/union/generic type
type is ''unknown-type''
getimagedata.cpp(45) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(46) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(46) : error C2228: left of '.Pitch' must have class/struct/union
type is ''unknown-type''
getimagedata.cpp(48) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(48) : error C2228: left of '.pBits' must have class/struct/union
type is ''unknown-type''
getimagedata.cpp(78) : warning C4305: 'return' : truncation from 'int' to 'bool'
getimagedata.cpp(79) : error C2065: 'NuiImageBuffer' : undeclared identifier
getimagedata.cpp(79) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(80) : error C2065: 'KINECT_LOCKED_RECT' : undeclared identifier
getimagedata.cpp(80) : error C2146: syntax error : missing ';' before identifier 'LockedRect'
getimagedata.cpp(80) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(81) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(81) : error C2227: left of '->LockRect' must point to class/struct/union/generic type
type is ''unknown-type''
getimagedata.cpp(81) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(82) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(82) : error C2228: left of '.Pitch' must have class/struct/union
type is ''unknown-type''
getimagedata.cpp(84) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(84) : error C2228: left of '.pBits' must have class/struct/union
type is ''unknown-type''
I tried this with both the AMD and the x86 versions.
I had the same problem and I fixed it today. As far as I know the problem arises from the differences in the libraries of the SDK beta and the newly released SDK.
What I did was that I changed this code using the "SkeletalViewer" example of the SDK sample browser, and I was able to get it running on matlab.
Hope this helps, let me know if you have further questions.
I got the recent SDK, MATLAB R2011a, and tried to compile according to instructions but got an error (too bad this would help me a lot!).
Command:
mex getimagedata.cpp -I'C:\Program Files\Microsoft SDKs\Kinect\v1.0\inc' 'C:\Program Files\Microsoft SDKs\Kinect\v1.0\lib\x86\Kinect10.lib'
(there's no MSRKinectNUI.lib) I got an error because it was looking for #include <MSR_NuiApi.h> but the header in the inc is <NuiApi.h>
So I changed that and it now gives me:
>> mex getimagedata.cpp -I'C:\Program Files\Microsoft SDKs\Kinect\v1.0\inc' 'C:\Program Files\Microsoft SDKs\Kinect\v1.0\lib\amd64\Kinect10.lib'
getimagedata.cpp
getimagedata.cpp(42) : warning C4305: 'return' : truncation from 'int' to 'bool'
getimagedata.cpp(43) : error C2065: 'NuiImageBuffer' : undeclared identifier
getimagedata.cpp(43) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(44) : error C2065: 'KINECT_LOCKED_RECT' : undeclared identifier
getimagedata.cpp(44) : error C2146: syntax error : missing ';' before identifier 'LockedRect'
getimagedata.cpp(44) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(45) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(45) : error C2227: left of '->LockRect' must point to class/struct/union/generic type
type is ''unknown-type''
getimagedata.cpp(45) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(46) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(46) : error C2228: left of '.Pitch' must have class/struct/union
type is ''unknown-type''
getimagedata.cpp(48) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(48) : error C2228: left of '.pBits' must have class/struct/union
type is ''unknown-type''
getimagedata.cpp(78) : warning C4305: 'return' : truncation from 'int' to 'bool'
getimagedata.cpp(79) : error C2065: 'NuiImageBuffer' : undeclared identifier
getimagedata.cpp(79) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(80) : error C2065: 'KINECT_LOCKED_RECT' : undeclared identifier
getimagedata.cpp(80) : error C2146: syntax error : missing ';' before identifier 'LockedRect'
getimagedata.cpp(80) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(81) : error C2065: 'pTexture' : undeclared identifier
getimagedata.cpp(81) : error C2227: left of '->LockRect' must point to class/struct/union/generic type
type is ''unknown-type''
getimagedata.cpp(81) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(82) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(82) : error C2228: left of '.Pitch' must have class/struct/union
type is ''unknown-type''
getimagedata.cpp(84) : error C2065: 'LockedRect' : undeclared identifier
getimagedata.cpp(84) : error C2228: left of '.pBits' must have class/struct/union
type is ''unknown-type''
C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Compile of 'getimagedata.cpp' failed.
??? Error using ==> mex at 208
Unable to complete successfully.
Comment only