Rank: 402250 based on 0 downloads (last 30 days) and 0 file submitted
photo

feng yuxuan

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by feng View all
Updated File Comments Rating
11 Sep 2012 Kinect Matlab Microsoft Kinect, OpenNI wrapper, Skeleton, Depth Author: Dirk-Jan Kroon

function compile_cpp_files_update(OpenNiPath)
% This function compile_cpp_files will compile the c++ code files
% which wraps OpenNI for the Kinect in Matlab.
%
% Please install first on your computer:
% - NITE-Bin-Win32-v1.3.0.18
% - OpenNI-Bin-Win32-v1.0.0.25
%
% Just execute by:
%
% compile_c_files
%
% or with specifying the OpenNI path
%
% compile_cpp_files('C:\Program Files (x86)\OpenNI\');
%
% Modify: update to support 64bit in win7

%reset the mex
mex -setup;

%detect the version of system
try
cs = computer;
is64 = strcmp('64', cs(end-1:end));
catch
disp('Unable to detect the version of the system!');
end

if is64
disp('The system is 64bit system!');
else
disp('The system is 32bit system!')
end

if(nargin<1)
OpenNiPathInclude=getenv('OPEN_NI_INCLUDE');
OpenNiPathLib=getenv('OPEN_NI_LIB');
if(isempty(OpenNiPathInclude)||isempty(OpenNiPathLib))
error('OpenNI path not found, Please call the function like compile_cpp_files(''examplepath\openNI'')');
end
else

cd('Mex');
files=dir('*.cpp');
if ~is64
% for 32bit
OpenNiPathLib=[OpenNiPath 'Lib'];
OpenNiPathInclude=[OpenNiPath 'Include'];

for i=1:length(files)
Filename=files(i).name;
clear(Filename);
mex('-v',['-L' OpenNiPathLib],'-lopenNI',['-I' OpenNiPathInclude],Filename);
end
else
%for 64bit
OpenNiPathLib=[OpenNiPath 'Lib64'];
OpenNiPathInclude=[OpenNiPath 'Include'];

for i=1:length(files)
Filename=files(i).name;
clear(Filename);
mex('-v',['-L' OpenNiPathLib],'-lopenNI64',['-I' OpenNiPathInclude],Filename);
end
end
end
cd('..');

11 Sep 2012 Kinect Matlab Microsoft Kinect, OpenNI wrapper, Skeleton, Depth Author: Dirk-Jan Kroon

Hi! I modify a little of the code to support 64bit system in Win7.

function compile_cpp_files_update(OpenNiPath)
% This function compile_cpp_files will compile the c++ code files
% which wraps OpenNI for the Kinect in Matlab.
%
% Please install first on your computer:
% - NITE-Bin-Win32-v1.3.0.18
% - OpenNI-Bin-Win32-v1.0.0.25
%
% Just execute by:
%
% compile_c_files
%
% or with specifying the OpenNI path
%
% compile_cpp_files('C:\Program Files (x86)\OpenNI\');
%
% Modify: update the code to support 64bit

%reset the mex
mex -setup;

%detect the version of system
try
cs = computer;
is64 = strcmp('64', cs(end-1:end));
catch
disp('Unable to detect the version of the system!');
end

if is64
disp('The system is 64bit system!');
else
disp('The system is 32bit system!')
end

if(nargin<1)
OpenNiPathInclude=getenv('OPEN_NI_INCLUDE');
OpenNiPathLib=getenv('OPEN_NI_LIB');
if(isempty(OpenNiPathInclude)||isempty(OpenNiPathLib))
error('OpenNI path not found, Please call the function like compile_cpp_files(''examplepath\openNI'')');
end
else

cd('Mex');
files=dir('*.cpp');
if ~is64
% for 32bit
OpenNiPathLib=[OpenNiPath 'Lib'];
OpenNiPathInclude=[OpenNiPath 'Include'];

for i=1:length(files)
Filename=files(i).name;
clear(Filename);
mex('-v',['-L' OpenNiPathLib],'-lopenNI',['-I' OpenNiPathInclude],Filename);
end
else
%for 64bit
OpenNiPathLib=[OpenNiPath 'Lib64'];
OpenNiPathInclude=[OpenNiPath 'Include'];

for i=1:length(files)
Filename=files(i).name;
clear(Filename);
mex('-v',['-L' OpenNiPathLib],'-lopenNI64',['-I' OpenNiPathInclude],Filename);
end
end
end
cd('..');

Contact us