Ignore:
Timestamp:
Apr 18, 2011, 10:42:29 PM (10 years ago)
Author:
sommeria
Message:

various bug corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r231 r238  
    458458norm=abs(det(R));
    459459GeometryCalib.CalibrationType='linear';
     460if (a_X1(2)/a_Y1(3))>0
     461    epsilon=1;
    460462GeometryCalib.fx_fy(1)=sqrt((a_X1(2)/a_Y1(3))*norm);
     463else
     464    GeometryCalib.fx_fy(1)=-sqrt((-a_X1(2)/a_Y1(3))*norm);
     465      epsilon=-1;
     466end
    461467GeometryCalib.fx_fy(2)=(a_Y1(3)/a_X1(2))*GeometryCalib.fx_fy(1);
    462468GeometryCalib.CoordUnit=[];% default value, to be updated by the calling function
    463469%GeometryCalib.Tx_Ty_Tz=[a_X1(1) a_Y1(1) 1];
    464470GeometryCalib.Tx_Ty_Tz=[a_X1(1)/GeometryCalib.fx_fy(1) a_Y1(1)/GeometryCalib.fx_fy(2) 1];
    465 R(1,:)=R(1,:)/GeometryCalib.fx_fy(1);
     471R(1,:)=epsilon*R(1,:)/GeometryCalib.fx_fy(1);
    466472R(2,:)=R(2,:)/GeometryCalib.fx_fy(2);
    467473R=[R;[0 0]];
    468 GeometryCalib.R=[R [0;0;1]];
    469 GeometryCalib.omc=(180/pi)*[acos(GeometryCalib.R(1,1)) 0 0];
     474GeometryCalib.R=[R [0;0;-1]];
     475GeometryCalib.omc=(180/pi)*[acos(GeometryCalib.R(1,1)) 0 0]
    470476%------------------------------------------------------------------------
    471477% determine the tsai parameters for a view normal to the grid plane
Note: See TracChangeset for help on using the changeset viewer.