Changeset 242
- Timestamp:
- Apr 19, 2011, 10:24:16 AM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r238 r242 441 441 %------------------------------------------------------------------------ 442 442 % determine the parameters for a calibration by a linear transform matrix (rescale and rotation) 443 444 443 445 function GeometryCalib=calib_linear(Coord,handles) 444 446 %------------------------------------------------------------------------ … … 456 458 % R=[a_X1(2),a_X1(3),0;a_Y1(2),a_Y1(3),0;0,0,1]; 457 459 R=[a_X1(2),a_X1(3);a_Y1(2),a_Y1(3)]; 460 epsilon=sign(det(R)); 458 461 norm=abs(det(R)); 459 462 GeometryCalib.CalibrationType='linear'; 460 463 if (a_X1(2)/a_Y1(3))>0 461 epsilon=1; 462 GeometryCalib.fx_fy(1)=sqrt((a_X1(2)/a_Y1(3))*norm); 464 GeometryCalib.fx_fy(1)=sqrt((a_X1(2)/a_Y1(3))*norm); 463 465 else 464 GeometryCalib.fx_fy(1)=-sqrt((-a_X1(2)/a_Y1(3))*norm); 465 epsilon=-1; 466 GeometryCalib.fx_fy(1)=-sqrt(-(a_X1(2)/a_Y1(3))*norm); 466 467 end 467 468 GeometryCalib.fx_fy(2)=(a_Y1(3)/a_X1(2))*GeometryCalib.fx_fy(1); … … 469 470 %GeometryCalib.Tx_Ty_Tz=[a_X1(1) a_Y1(1) 1]; 470 471 GeometryCalib.Tx_Ty_Tz=[a_X1(1)/GeometryCalib.fx_fy(1) a_Y1(1)/GeometryCalib.fx_fy(2) 1]; 471 R(1,:)= epsilon*R(1,:)/GeometryCalib.fx_fy(1);472 R(1,:)=R(1,:)/GeometryCalib.fx_fy(1); 472 473 R(2,:)=R(2,:)/GeometryCalib.fx_fy(2); 473 474 R=[R;[0 0]]; 474 GeometryCalib.R=[R [0;0;- 1]];475 GeometryCalib.omc=(180/pi)*[acos(GeometryCalib.R(1,1)) 0 0] 475 GeometryCalib.R=[R [0;0;-epsilon]]; 476 GeometryCalib.omc=(180/pi)*[acos(GeometryCalib.R(1,1)) 0 0]; 476 477 %------------------------------------------------------------------------ 477 478 % determine the tsai parameters for a view normal to the grid plane -
trunk/src/uvmat.m
r238 r242 4308 4308 function list_object_2_Callback(hObject, eventdata, handles) 4309 4309 %------------------------------------------------------------------------ 4310 list_str=get(handles.list_object_2,'String') 4311 IndexObj=get(handles.list_object_2,'Value') 4310 list_str=get(handles.list_object_2,'String'); 4311 IndexObj=get(handles.list_object_2,'Value'); 4312 4312 if ischar(list_str) || isempty(list_str{IndexObj})% || strcmp(list_str{IndexObj},'...') 4313 4313 hview_field=findobj(allchild(0),'Tag','view_field');
Note: See TracChangeset
for help on using the changeset viewer.