フィルターのクリア

what does this code mean ?

2 ビュー (過去 30 日間)
Karn Vadaliya
Karn Vadaliya 2019 年 3 月 19 日
コメント済み: Torsten 2019 年 3 月 25 日
function PV=Get_Pivot_Point(PP)
% PP dimension: (no. of observation X 4 [no. of markers] X 3[x,y,z 3-d coordinate of marker] )
pv_tool = squeeze(PP(1,:,:));
%pv_tool=[0 0 0 ; 0 0 50; 0 25 100 ; 0 -25 135];
p_pairs=nchoosek(1:size(PP,1),2);
num_exapmple=10;
whos
pivot_points=[]
for k=1:10
P1=[];
P2=[];
rp=randperm(size(p_pairs,1),num_exapmple)
rp_a=p_pairs(rp,1);
rp_b=p_pairs(rp,2);
for i=1:10
P1=[P1 ; squeeze(PP(rp_a(i),:,:))'];
P2=[P2 ; squeeze(PP(rp_b(i),:,:))'];
end
X=compute_pivot_point(P1,P2);
tmp_pivot_points=[];
for j=1:size(PP,1)
[T, Eps] = estimateRigidTransform(pv_tool', squeeze(PP(j,:,:))); % (target, source)
tmp_pivot_points=[tmp_pivot_points ; transformPoint3d(X',T)];
end
pivot_points=[pivot_points ; mean(tmp_pivot_points)];
end
plot3(pv_tool(:,1),pv_tool(:,2),pv_tool(:,3),'r*')
hold on
plot3(pivot_points(:,1), pivot_points(:,2), pivot_points(:,3),'b*')
grid on
axis equal
PV.pv_point=median(pivot_points);
PV.pv_tool=pv_tool;
end
function X=compute_pivot_point(P1,P2)
[X, R] = linsolve([P2-P1],sum([P2.^2-P1.^2], 2)/2);
end
  7 件のコメント
Karn Vadaliya
Karn Vadaliya 2019 年 3 月 24 日
Then what is it ?
Torsten
Torsten 2019 年 3 月 25 日
https://en.wikipedia.org/wiki/Scaling_(geometry)

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by