i have matlab 2011b when i want to do mex compile the error is :
mex getimagedata.cpp -I'C:\Program Files\Microsoft SDKs\Kinect\v1.8\inc' 'C:\Program Files\Microsoft SDKs\Kinect\v1.8\lib\amd64\MSRKinectNUI.lib'
getimagedata.cpp(4) : fatal error C1083: Cannot open include file: 'MSR_NuiApi.h': No such file or directory
C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Compile of 'getimagedata.cpp' failed.
Error using mex (line 206)
Unable to complete successfully.
help me pilzzzzzzz
I got this nice code working with the latest SDK (1.6) following the fixes proposed by Chris. The the depth scaling however seems not to be working correctly. Any object closer than about 1 meter from the sensor will recieve zero depth. Starting at 1 meter and moving away from the sensor, the depth value starts to increase from zero with integer steps of 8. After about 30 cm, the depth value peaks at 4080 and then starts all over from zero again counting up in steps of 8 until it reaches 4080 after another 30 cm. I suspect that there is some confusion in the code between bits and bytes somwhow. How about this for a coincidence: dividing 4080 by 8 (8 bits = 1 byte) gives 510, which corresponds well with the 16 bit depht data of the Kinect sensor. So where does things go wrong in getimagedata.cpp? Please advice, I am a wizard in Matlab but a bozo in C.