v01
This commit is contained in:
12
thirdparty/opengv/matlab/helpers/perturb.m
vendored
Normal file
12
thirdparty/opengv/matlab/helpers/perturb.m
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
function [t_perturbed,R_perturbed] = perturb(t,R,amplitude)
|
||||
|
||||
t_perturbed = t;
|
||||
r = rodrigues(R);
|
||||
|
||||
for i=1:3
|
||||
t_perturbed(i,1) = t_perturbed(i,1) + (rand-0.5)*2.0*amplitude;
|
||||
r(i,1) = r(i,1) + (rand-0.5)*2.0*amplitude;
|
||||
end
|
||||
|
||||
R_perturbed = rodrigues(r);
|
||||
end
|
||||
Reference in New Issue
Block a user