Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 1dc429fc0da4cc5ff4f62617760447613f85980b authored by vbhandawat on 01 February 2021, 13:54:09 UTC, committed by GitHub on 01 February 2021, 13:54:09 UTC
Add files via upload
1 parent 17f20a6
  • Files
  • Changes
  • 345c390
  • /
  • Tracking
  • /
  • other files
  • /
  • legLength
  • /
  • getLegLengthEditor.m
Raw File Download
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:1dc429fc0da4cc5ff4f62617760447613f85980b
directory badge Iframe embedding
swh:1:dir:6f90658952362cbc064e28102578aceb6fa31853
content badge Iframe embedding
swh:1:cnt:6c5c861a45df69edb37e155fa87f446c6b923582
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
getLegLengthEditor.m
function Rn=getLegLengthEditor(data)

%data = data.frames;


FigH = figure('position',[100 100 size(data,2)+100 size(data,1)+600]);
% axes('XLim', [0 4*pi], 'units','pixels', ...
%      'position',[100 50 200 200], 'NextPlot', 'add');
% x     = linspace(0, 4*pi, 400);
% y     = sin(x);
dcm_obj = datacursormode(FigH);
set(dcm_obj,'DisplayStyle','datatip',...
    'SnapToDataVertex','off','Enable','on')

first = 1;
imgH = imshow(data(:,:,:,first));
TextH = uicontrol('style','text',...
    'position',[100 40 40 15]);
TextH.String='1';
SliderH = uicontrol('style','slider','position',[1 10 1200 20],...
    'min', 1, 'max', size(data,4),'Value',1);
addlistener(SliderH, 'Value', 'PostSet', @callbackfn);
movegui(FigH, 'center')


Rnat=zeros(5,1);
for j=1:5
i=1;
joints=zeros(8,2);
while true
    
    while true
        w = waitforbuttonpress;
        if w == 1
            num = get(gcf, 'CurrentCharacter');
            num = str2double(num)
            if ismember(num,[0 1])
                break
            end
        end
    end
    
    if num == 1
        disp(['registered: ' num2str(i)])
        c_info = getCursorInfo(dcm_obj);
        position = c_info.Position;
    else
        disp('exiting prematurely')
        break
    end
    
    joints(i,:)=position;
    
    i=i+1;
    
    if i == 9
        i=1;
        break
    end
end


%joins row 1~4 bottom view. row 5~8 top view
%From tip to body
%
joints3D=zeros(4,3);

joints3D(1,1)=joints(1,1);
joints3D(2,1)=joints(2,1);
joints3D(3,1)=joints(3,1);
joints3D(4,1)=mean(joints([4 8],1));

joints3D(1,2)=joints(1,2);
joints3D(2,2)=joints(2,2);
joints3D(3,2)=joints(3,2);
joints3D(4,2)=joints(4,2);

joints3D(1,3)=joints(5,2);
joints3D(2,3)=joints(6,2);
joints3D(3,3)=joints(7,2);
joints3D(4,3)=joints(8,2);
joints3D(:,3)=joints3D(1,3)-joints3D(:,3);

% figure
% plot3(joints3D(:,1),joints3D(:,2),joints3D(:,3))
% xlabel('x')
% ylabel('y')
% zlabel('z')

segmentLengths = sqrt(sum(diff(joints3D,1,1).^2))*24/1984;
Rnat(j) = sum(segmentLengths);
disp('Move to next frame')
disp(['currently ' num2str(j) '/5'])
end
Rn = zeros(1,2);
Rn(1)=mean(Rnat);
Rn(2)=std(Rnat);

    function callbackfn(source, eventdata)
        num          = round(get(eventdata.AffectedObject, 'Value'));
        imgH.CData = data(:,:,:,first*num);
        
        TextH.String = num2str(num);
    end

end
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API