资源简介
本程序为Neil Lawrennd搭建的层级高斯过程隐变量模型用于运动数据的重构,同时能够在隐空间中实现走跑运动的拼接
上传原因主要是Neil Lawrennd在github上公布的代码直接跑是跑不通的,需要修改很多函数
本代码可直接运行demHighFilve1查看对两个人的运动的GP建模
而在demWalkRun1中实现了走跑的运动建模,而且隐空间与对应的运动可视空间具有交互式操作
The HGPLVM toolbox is a toolbox for hierarchical visualisation with the GP-LVM, it relies on the FGPLVM code to run
代码片段和文件信息
function xyz = acclaim2xyzHierarchical(skel channels visIndex)
% ACCLAIM2XYZHIERARCHICAL Compute XYZ values given skeleton structure and channels.
% FORMAT
% DESC Converts a series of joint angles (channel data) into xyz
% coordinates for the given skeleton.
% ARG skel : The skeleton being animated.
% ARG channels : The channel data for this frame of animation.
% ARG visIndex : visIndex indicates the index of the current subskel node.
% RETURN xyz : the data structure containing the xyz value and rotation
% matrix for each joint in the skeleton.
%
% COPYRIGHT : Andrew J. Moore and Neil D. Lawrence 2006 2007
%
% HGPLVM
global dependencyVisData;
%/~
% hasDependency = 0;
% isMaster = 0;
% dependencyId = 0;
% %check to see if root node has a dependency.
% for i=1:size(dependencyVisData)
% if (strcmp(skel.tree(1).name dependencyVisData(i).name)
% %check to see if this is a master or a dependent.
% if dependencyVisData(i).masterNodeIndex == visIndex
% isMaster = 1;
% dependencyId = i;
% else
% xyzStruct(1).rot = dependencyVisData(i).rot;
% xyzStruct(1).xyz = dependencyVisData(i).xyz;
% hasDependency = 1;
% end
% end
% end
% if ~hasDependency
%~/
rotVal = skel.tree(1).orientation;
for i = 1:length(skel.tree(1).rotInd)
rind = skel.tree(1).rotInd(i);
if rind
rotVal(i) = rotVal(i) + channels(rind);
end
end
xyzStruct(1).rot = rotationMatrix(deg2rad(rotVal(1)) ...
deg2rad(rotVal(2)) ...
deg2rad(rotVal(3)) ...
skel.tree(1).axisOrder);
xyzStruct(1).xyz = skel.tree(1).offset;
%/~
% end
%~/
for i = 1:length(skel.tree(1).posInd)
pind = skel.tree(1).posInd(i);
if pind
xyzStruct(1).xyz(i) = xyzStruct(1).xyz(i) + channels(pind);
end
end
xyzStruct(1) = checkForDependency(1 visIndex xyzStruct(1));
for i = 1:length(skel.tree(1).children)
ind = skel.tree(1).children(i);
xyzStruct = getChildXyz(skel xyzStruct ind channels);
end
xyz = reshape([xyzStruct(:).xyz] 3 length(skel.tree))‘;
function xyzStruct = getChildXyz(skel xyzStruct ind channels)
% GETCHILDXYZ
parent = skel.tree(ind).parent;
children = skel.tree(ind).children;
rotVal = zeros(1 3);
for j = 1:length(skel.tree(ind).rotInd)
rind = skel.tree(ind).rotInd(j);
if rind
rotVal(j) = channels(rind);
else
rotVal(j) = 0;
end
end
tdof = rotationMatrix(deg2rad(rotVal(1)) ...
deg2rad(rotVal(2)) ...
deg2rad(rotVal(3)) ...
skel.tree(ind).order);
torient = rotationMatrix(deg2rad(skel.tree(ind).axis(1)) ...
deg2rad(skel.tree(ind).axis(2)) ...
deg2rad(skel.tree(ind).axis(3)) ...
skel.tree(ind).axisOrder);
torientInv = rotationM
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 64964 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\demHighFive_talk.png
文件 18796 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\demTemporalSamplePaths.png
文件 102941 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\demWalkRun_icml.png
文件 102941 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\demWalkRun_portrait.png
文件 4602 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\matlab\acclaim2xyzHierarchical.m
文件 6289 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\matlab\acclaimGetSubSkel.m
文件 4240 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\matlab\acclaimSplitHierarchy.m
文件 403 2015-06-08 12:36 lawrennd-hgplvm-d0ef808\matlab\additionalfiles.txt
文件 408282 2007-01-13 00:51 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\3Class.mat
文件 242 2007-01-13 00:51 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\connections.txt
文件 323 2007-01-13 00:51 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\connections_walkJogRun.txt
文件 740 2007-01-13 00:51 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\Contents.m
文件 408282 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\3Class.mat
文件 4934 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\classificationOneData.mat
文件 11960 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\classificationTwoData.mat
文件 1224 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\cmu35TaylorScaleBias.mat
文件 1073738 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\cmu35WalkJog.mat
文件 2492550 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\combined.csv
文件 242 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\connections.txt
文件 323 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\connections_walkJogRun.txt
文件 4750830 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\DellaGattaData.mat
文件 72245 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\demhighFive.mat
文件 27385 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\demwalkRun.mat
文件 1066960 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\DGdat_p63_case1_GL.txt
文件 1066960 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\DGdat_p63_case2_GL.txt
文件 1066960 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\DGdat_p63_case3_GL.txt
文件 43520 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\europeDistance.xls
文件 1100584 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\frey_rawface.mat
文件 276515 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\ILEA567.DAT
文件 76467 2017-08-01 15:41 lawrennd-hgplvm-d0ef808\matlab\DATASETS0p131\data\ionosphere.data
............此处省略1114个文件信息
评论
共有 条评论