- Timestamp:
- Jan 20, 2022, 8:30:32 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/phys_XYZ.m
r1109 r1110 77 77 R=(Calib.R)'; 78 78 c=Z0virt; 79 cvirt=Z0virt; 79 80 if testangle 80 81 % equation of the illumination plane: z=ax+by+c … … 90 91 cvirt=Z0virt-avirt*Calib.SliceCoord(Zindex,1)-bvirt*Calib.SliceCoord(Zindex,2);% Z0 = (virtual) z coordinate on the rotation axis (assumed horizontal) 91 92 % c=z coordinate at (x,y)=(0,0) 93 c=Z0virt-a*Calib.SliceCoord(Zindex,1)-b*Calib.SliceCoord(Zindex,2); 92 94 R(1)=R(1)+avirt*R(3); 93 95 R(2)=R(2)+bvirt*R(3); -
trunk/src/proj_field.m
r1107 r1110 1086 1086 end 1087 1087 else % the z coordinate is set only by the field plane (by calibration) 1088 ProjData.ProjObjectCoord (3)=FieldData.PlaneCoord(3);1088 ProjData.ProjObjectCoord=FieldData.PlaneCoord; 1089 1089 end 1090 1090 if isfield(FieldData,'PlaneAngle') -
trunk/src/series/extract_rdvision.m
r1107 r1110 209 209 if check_xml 210 210 [success,errormsg] = copyfile(filexml,[fullfile(RootPath,logdir,Param.InputTable{iview,3}) '.xml']); %copy the original xml file in the upper folder 211 else 212 errormsg=[filexml ' missing']; 213 return 211 214 end 212 215 end -
trunk/src/series/time_series.m
r1107 r1110 508 508 509 509 % record the time: 510 if isempty(errormsg) 510 511 if isempty(time)% time not set by xml filer(s) 511 512 if isfield(Data{1},'Time') … … 516 517 else % time from ImaDoc prevails TODO: correct 517 518 DataOut.Time(index,1)=time(index);% 519 end 518 520 end 519 521 index -
trunk/src/toolbox_calib/go_calib_optim_iter.m
r926 r1110 30 30 %For now, if using a 3D calibration rig, quick_init is set to 1 for an easy initialization of the focal length 31 31 32 if ~exist('desactivated_images' ),32 if ~exist('desactivated_images','var') 33 33 desactivated_images = []; 34 end; 35 36 37 38 if ~exist('est_aspect_ratio'), 34 end 35 36 if ~exist('est_aspect_ratio','var') 39 37 est_aspect_ratio = 1; 40 end ;41 42 if ~exist('est_fc' );38 end 39 40 if ~exist('est_fc','var') 43 41 est_fc = [1;1]; % Set to zero if you do not want to estimate the focal length (it may be useful! believe it or not!) 44 end ;45 46 if ~exist('recompute_extrinsic' ),42 end 43 44 if ~exist('recompute_extrinsic','var') 47 45 recompute_extrinsic = 1; % Set this variable to 0 in case you do not want to recompute the extrinsic parameters 48 46 % at each iterstion. 49 end ;50 51 if ~exist('MaxIter' ),47 end 48 49 if ~exist('MaxIter','var') 52 50 MaxIter = 30; % Maximum number of iterations in the gradient descent 53 51 end; 54 52 55 if ~exist('check_cond' ),53 if ~exist('check_cond','var'), 56 54 check_cond = 1; % Set this variable to 0 in case you don't want to extract view dynamically 57 55 end; 58 56 59 if ~exist('center_optim' ),57 if ~exist('center_optim','var'), 60 58 center_optim = 1; %%% Set this variable to 0 if your do not want to estimate the principal point 61 59 end; 62 60 63 if exist('est_dist' ),61 if exist('est_dist','var'), 64 62 if length(est_dist) == 4, 65 63 est_dist = [est_dist ; 0]; … … 67 65 end; 68 66 69 if ~exist('est_dist' ),67 if ~exist('est_dist','var'), 70 68 est_dist = [1;1;1;1;0]; 71 69 end; 72 70 73 if ~exist('est_alpha' ),71 if ~exist('est_alpha','var'), 74 72 est_alpha = 0; % by default, do not estimate skew 75 73 end; … … 87 85 fprintf(1,'\n'); 88 86 89 if ~exist('nx' )&~exist('ny'),87 if ~exist('nx','var')&~exist('ny','var'), 90 88 fprintf(1,'WARNING: No image size (nx,ny) available. Setting nx=640 and ny=480. If these are not the right values, change values manually.\n'); 91 89 nx = 640; … … 116 114 end; 117 115 118 if ~exist('dont_ask' ),116 if ~exist('dont_ask','var'), 119 117 dont_ask = 0; 120 118 end; … … 161 159 if ~center_optim, % In the case where the principal point is not estimated, keep it at the center of the image 162 160 fprintf(1,'Principal point not optimized (center_optim=0). '); 163 if ~exist('cc' ),161 if ~exist('cc','var'), 164 162 fprintf(1,'It is kept at the center of the image.\n'); 165 163 cc = [(nx-1)/2;(ny-1)/2]; … … 228 226 % Initialization of the intrinsic parameters (if necessary) 229 227 230 if ~exist('cc' ),228 if ~exist('cc','var') 231 229 fprintf(1,'Initialization of the principal point at the center of the image.\n'); 232 230 cc = [(nx-1)/2;(ny-1)/2]; 233 231 alpha_smooth = 0.1; % slow convergence 234 end ;235 236 237 if exist('kc' ),238 if length(kc) == 4 ;232 end 233 234 235 if exist('kc','var') 236 if length(kc) == 4 239 237 fprintf(1,'Adding a new distortion coefficient to kc -> radial distortion model up to the 6th degree'); 240 238 kc = [kc;0]; 241 end ;242 end ;243 244 if ~exist('alpha_c' ),239 end 240 end 241 242 if ~exist('alpha_c','var') 245 243 fprintf(1,'Initialization of the image skew to zero.\n'); 246 244 alpha_c = 0; 247 245 alpha_smooth = 0.1; % slow convergence 248 end ;249 250 if ~exist('fc' ) && quick_init,246 end 247 248 if ~exist('fc','var') && quick_init 251 249 FOV_angle = 35; % Initial camera field of view in degrees 252 250 fprintf(1,['Initialization of the focal length to a FOV of ' num2str(FOV_angle) ' degrees.\n']); … … 254 252 est_fc = [1;1]; 255 253 alpha_smooth = 0.1; % slow 256 end ;257 258 259 if ~exist('fc' ),254 end 255 256 257 if ~exist('fc','var') 260 258 % Initialization of the intrinsic parameters: 261 259 fprintf(1,'Initialization of the intrinsic parameters using the vanishing points of planar patterns.\n') … … 263 261 alpha_smooth = 0.1; % slow convergence 264 262 est_fc = [1;1]; 265 end ;263 end 266 264 267 265 -
trunk/src/uvmat.m
r1108 r1110 3419 3419 if ~isempty(errormsg) 3420 3420 msgbox_uvmat('ERROR',errormsg); 3421 return 3421 3422 end 3422 3423 pause(1.02-get(handles.speed,'Value'));% wait for next image … … 3494 3495 end 3495 3496 UvData=get(handles.uvmat,'UserData'); 3496 if ishandle(handles.UVMAT_title) %remove title panel on uvmat 3497 if ishandle(handles.UVMAT_title) %remove title panel on uvmat (which appears at the first openning of the GUI) 3497 3498 delete(handles.UVMAT_title) 3498 3499 end … … 3998 3999 set(handles.Objects,'Visible','on') 3999 4000 %if no projection object exists, create a default one 4000 if isempty(UvData.ProjObject{1}) 4001 if isempty(UvData.ProjObject{1})% if no projection object is specified 4001 4002 set(handles.ListObject,'Value',1) 4002 4003 set(handles.ListObject,'String',{'plane'}) … … 4015 4016 UvData.ProjObject{1}.CoordUnit=UvData.Field.CoordUnit; 4016 4017 end 4017 elseif isfield(UvData,'Z') 4018 %elseif isfield(UvData,'Z') 4019 else 4018 4020 %multilevel case (single menuplane in a 3D space) 4019 4021 if isfield(UvData,'CoordType')&& isequal(UvData.CoordType,'phys') && isfield(UvData,'XmlData')
Note: See TracChangeset
for help on using the changeset viewer.