Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [v] = krd2(TH)
- I=[176 492 337 37 176 492 38;
- 331 291 235 269 389 345 319 ;
- 1 1 1 1 1 1 1];
- W=[0 0 .1345 .1345 0 0 .1345;
- 0 .159 .159 0 0 .159 0;
- 0 0 0 0 .026 .026 .026;
- 1 1 1 1 1 1 1];
- cx=TH(1);
- cy=TH(2);
- mx=TH(3);
- my=TH(4);
- phi=TH(5);
- tht=TH(6);
- psi=TH(7);
- Pcam=[TH(8);TH(9);TH(10)];
- v=0;
- for i=1:7,
- point_proj = [mx 0 cx;0 my cy;0 0 1]*[0 1 0;0 0 1;1 0 0]*euler2dcm([phi;tht;psi])*(W(1:3,i) - Pcam);
- x=point_proj(1)/point_proj(3);
- y=point_proj(2)/point_proj(3);
- v=v+sqrt((I(1,i) - x)^2 + (I(2,i) - y)^2);
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement