You could connect the signal output of the Skeleton block to a "To workspace" Simulink block. This will save the output of your simulation to your current MATLAB workspace. You can then access joint data as a 20x3xN matrix (where N is the number of frames in your simulation and assuming you are using the Windows kinect runtime).
Thanks for your quick answer. OpenNI and NITE do work on OSX with the PrimeSensor module for OSX (unstable). I was thinking that the Simulink interface should work too then. Thanks for the great work!
I'm trying the latest version with an Asus Xtion Pro Live, but the NID Skeleton block always causes MATLAB to crash. The depth and video blocks work fine however, and everything works fine with a Kinect.
Hello everybody,
First of all thanks Takashi for this great submission.
Second, I successfully ran SETUP_KINECTSDK and setup_openni.m, but when I try to run some example this message appears.
Error reported by S-function 'sfun_nid' in 'nid_cvst_image/NID IMAQ':
NID Error: Failed to initialize NID. It might be caused by
- NID is not connected.
- NID unsupported block is used in the model
- NID unsupported IMAQ Resolution and FPS is configured.
Some clue to solve this.
Thanks in advance
Christian
5
13 Feb 2013
Simulink Support for Kinect
Simulink Support for Kinect is a set of Simulink blocks interfaced with OpenNI and Kinect SDK.
Dan,
You could connect the signal output of the Skeleton block to a "To workspace" Simulink block. This will save the output of your simulation to your current MATLAB workspace. You can then access joint data as a 20x3xN matrix (where N is the number of frames in your simulation and assuming you are using the Windows kinect runtime).
Comment only
13 Feb 2013
Simulink Support for Kinect
Simulink Support for Kinect is a set of Simulink blocks interfaced with OpenNI and Kinect SDK.
Thank you for providing this code. Great resource. Question, how would you go about saving the XYZ for each joint? I am not familiar with Simulink. Thanks
Comment only
07 Feb 2013
Simulink Support for Kinect
Simulink Support for Kinect is a set of Simulink blocks interfaced with OpenNI and Kinect SDK.
Hi all,
Please make sure about the following steps to solve installation issues:
1. Make sure that all SDK (VC++, Windows SDK, Kinect SDK/OpenNI) are installed properly
2. Make sure that VC++ is set as mex compiler
>> mex -setup
3. Read document in the Simulink support Kinect.
Additionally, I recommend to install MATLAB under the directory without spaces because of mex compilation with third party SDKs.
Concerning Windows8, I have never used Win8, so unfortunately, I can't answer your question.
Takashi
Comment only
03 Feb 2013
Simulink Support for Kinect
Simulink Support for Kinect is a set of Simulink blocks interfaced with OpenNI and Kinect SDK.
Hi Takashi,
I am trying to run the setup_kinectsdk.m file on the Matlab, however it gives me the following error
"
>> setup_kinectsdk
### Confirming Simulink Support for Kinect installations with Kinect SDK...
### Setting MATLAB path to .\Lib and .\Lib\doc_en directories.
### Generating C:\Users\Shahzada\Documents\MATLAB\simulinkfornidinfo.m
### Generating C MEX file for Simulink Support for Kinect...
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: 'sfun_nid.cpp' not found.
Error using mex (line 206)
Unable to complete successfully.
Error in makecmexfile4nid (line 62)
mex('sfun_nid.cpp', 'kinectSDK_wrapper.cpp', 'wrapper_common.cpp', ['-L' KinectSDKPathLib],
'-lKinect10', ['-I' KinectSDKPathInclude]);
Error in setup_kinectsdk (line 77)
makecmexfile4nid;
"
Please let me know if you can help at your earliest convenience.
Thank you
Comment only