Code covered by the BSD License  

Highlights from
Simulink Support for Kinect

image thumbnail

Simulink Support for Kinect

by

 

25 Jul 2011 (Updated )

Simulink Support for Kinect is a set of Simulink blocks interfaced with OpenNI and Kinect SDK.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

slnid_imaq.m
%% NID IMAQ
%
% KinectfoCXẽf[^擾܂BSimulink Support for Kinect̊eubNgp鎞́AŒXebvŃV~[VȂKv܂B
%
% Copyright 2011-2012 The MathWorks, Inc.

%% ͐M
%
% * Angle (int32): KinectZT[Ίpx[deg]̓|[gB̓̓|[ǵA Kinect SDK::Set sensor angle by InputIꂽɗLƂȂ܂B
% -27`27[deg]͈̔͂L͒lłAȊO̒l͂ꂽꍇ́AŌ̐ݒpxێ܂B

%% o͐M
%
% * SYNC (uint32): NID Depth/Motion/Image/Skeleton/IRubNƂ̓pԐMo [msec]B
% SYNCo͐M͒ځANID Depth/Motion/Image/Skeleton/IRubNSYNC̓|[gցAڑKv܂B
%
% * Angle (int32): KinectZT[Ίpx[deg]. 擾ꂽZT[px-64`64[deg]͈̔͂ɂȂ܂B
% ̏o͐ḾAKinect for Windows SDKgpAAKinect SDK::Read sensor angle`FbN{bNXONɂꍇ̂ݗLɂȂ܂B

%% ubNp[^
%
% * Adjust view point to Image: NID Depth/Motion/SkeletonubNp擾f[^̃r[|CgNID ImageubNp擾f[^
% ̃r[|Cgɍ킹BNID ImageubNgpĂꍇ̂݁A̐ݒ͗LɂȂ܂B
%
% * Mirror image: C[Wf[^擾B̐ݒ͑SẴfoCXf[^ɔf܂B 
%
% * Sample time: TvԂ͏LReslution and FPSp[^Őݒ肳ꂽA1/FPS[sec] ȏɐݒ肷Kv܂B
% NID IMAQubNł́ANIDfoCẌ肵f[^擾邽߂ɁAÕf[^擾Aݒ肳ꂽTvԂ߂܂őҋ@܂B
%
% * OpenNI::Resolution: OpenNINID̉𑜓x(Resolution)ƍXV[g(FPS: Frame Per Second)̐ݒB
%
% * OpenNI::Need PSI pose for calibration of Skeleton tracking: igbLOpLu[VɁAp|[Y(PSI)KvƂ邩Ap|[YŎF邩Ił܂B
%
% * Kinect SDK::Set sensor angle by Input: KinectZT[ΊpxubN̓|[gݒ肷BKinectn[hEFA̎dlɂAZT[Ίpx̕ύXpx́AI1bɈɂȂ܂B
%
% * Kinect SDK::Sensor angle:  KinectZT[Ίpx[deg]BSensor anglep[^ĺA-27`27 [deg]͈̔͂ɐݒ肷Kv܂B
%
% * Kinect SDK::Read sensor angle: KinectZT[Ίpx[deg]SimulinkŎ擾邽߂̐ݒB
%
% * Kinect SDK::Near mode: Kinect Near Mode̐ݒp[^BNear modeł́AZTO̖40[cm]܂ł3D[x𑪒肷邱Ƃ”\ɂȂ܂B
%
% * Kinect SDK::Seated mode: Kinect Seated Mode̐ݒp[^BSeated modeł́A㔼ĝ݂igbLȎΏۂƂȂ܂B
%
% * Kinect SDK::Skeleton smoothing parameters: Smoothing / Correction / Prediction / Jitter Radius / Max Deviation RadiusƂ5‚̃p[^lݒ肷邱Ƃł܂B
% ftHgl[0.5 0.5 0.5 0.05 0.04]ɂȂ܂B(ep[^̐Kinect SDK C++ API ReferencëpɂȂ܂B)
%
% - Smoothing: Smoothing parameter in the range [0.0, 1.0] inclusive. A higher value corresponds to more smoothing. Passing 0 causes the raw data to be returned. 
% As the smoothing value is increased responsiveness to the raw data decreases; therefore, increased smoothing leads to increased latency.
%
% - Correction: Correction parameter in the range [0.0, 1.0] inclusive. A higher value corrects toward the raw data more quickly, a lower value corrects more slowly and appears smoother.
%
% - Prediction: The number of frames to predict into the future, which must be greater than or equal to zero. Values greater than 0.5 will likely lead to overshoot when the data changes quickly; 
% dampen the overshoot effect by using a smaller value of Max Deviation Radius.
%
% - Jitter Radius: The jitter-reduction radius, in meters. Any jitter beyond this radius is clamped to the radius.
%
% - The maximum radius (in meters) that filtered positions can deviate from raw data. Filtered values that would exceed this radius from the raw data are clamped at this distance, in the direction of the filtered value.
%
% * Kinect SDK::Infer skeleton joints position: igbLOɂA肭sȂꍇAߋ̃f[^琄肷邩(ON) Aۂ(=OFF)ݒł܂B

%% NID IMAQubNƑNIDubN̐ڑ@
%
% <<NID_SYNC.png>>

Contact us