
SplitLabel = 'STRAIGHT_WALK';

%%%%%%%%%%%%%%%%%%%
desc = {'HVHA','NVHA','LVHA','HVLA','NVLA','LVLA','HVNA','LVNA','NVNA'};

load SharpWalk-Sean.mat


files = dir('../Data/AVSegments/sharp/*sean*.txt');
c =1;
for file=files'
AVSegments{c} = ReadSegments(['../Data/AVSegments/sharp/',file.name],1,300);
c = c+1;
end

skelo = skel;
%removePosCh;


SegmentIndices = zeros(length(AVSegments),2);

for jj = 1:size(SegmentIndices,1)
    
    s=-1;
    e=-1;
    
    cc = 1;
    for i=1:size(AVSegments{jj},1)
        if strcmp(AVSegments{jj}{i,3},SplitLabel)==1
            s=AVSegments{jj}{i,1};
            e=AVSegments{jj}{i,2};
            M2{cc} = M{jj}(floor(s/4):floor(e/4),:);
            %expmap2bvh2(skel,M{jj}(floor(s/4):floor(e/4),:),['Input/AV_8Walk_Sean_',desc{jj},'_Rep',int2str(cc),'.bvh'],1/30);
            cc = cc+1;
        end
    end
    SegmentIndices(jj,:) = [s,e];
    
   
end

clear files AVSegments c jj i e s;

    