- Timestamp:
- Jul 25, 2012, 6:11:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r498 r502 157 157 hhuvmat=guidata(huvmat);%handles of elements in the GUI uvmat 158 158 FileExt=get(hhuvmat.FileExt,'String'); 159 check_input=0;160 if ~isempty(FileExt)161 if ~isempty(imformats(FileExt(2:end))) ||strcmpi(FileExt,'.avi')162 check_input=1;163 end164 end165 if ~check_input166 msgbox_uvmat('ERROR','open an image with uvmat to perform calibration')167 return168 end159 % check_input=0; 160 % if ~isempty(FileExt) 161 % if ~isempty(imformats(FileExt(2:end))) ||strcmpi(FileExt,'.avi') 162 % check_input=1; 163 % end 164 % end 165 % % if ~check_input 166 % msgbox_uvmat('ERROR','open an image with uvmat to perform calibration') 167 % return 168 % end 169 169 170 170 %% read the current calibration points … … 236 236 % RootFile=''; 237 237 if ~isempty(hhuvmat.RootPath)&& ~isempty(hhuvmat.RootFile) 238 % testhandle=1;239 238 RootPath=get(hhuvmat.RootPath,'String'); 240 SubDir=get(hhuvmat.SubDir,'String'); 241 % RootFile=get(hhuvmat.RootFile,'String'); 242 % filebase=fullfile(RootPath,RootFile); 243 outputfile=[fullfile(RootPath,SubDir) '.xml'];%xml file associated with the currently displayed image 239 SubDirBase=regexprep(get(hhuvmat.SubDir,'String'),'\..+$',''); 240 outputfile=[fullfile(RootPath,SubDirBase) '.xml'];%xml file associated with the currently displayed image 244 241 else 242 SubDirBase=''; 245 243 question={'save the calibration data and point coordinates in'}; 246 244 def={fullfile(RootPath,'ObjectCalib.xml')}; … … 275 273 end 276 274 UserData=get(handles.geometry_calib,'UserData'); 277 if isfield(UserData,'XmlInputFile')&&~strcmp(UserData.XmlInputFile, outputfile)&&~exist(outputfile,'file') 278 [success,message]=copyfile(UserData.XmlInputFile,outputfile);%copy the old xml file to a new one with the new convention 279 end 275 276 % get the timing from the xml file using the old convention if appropriate 277 if ~exist(outputfile,'file') && ~isempty(SubDirBase) 278 oldxml=[fullfile(RootPath,SubDirBase,get(hhuvmat.RootFile,'String')) '.xml']; 279 if exist(oldxml,'file') 280 [success,message]=copyfile(oldxml,outputfile);%copy the old xml file to a new one with the new convention 281 end 282 end 280 283 errormsg=update_imadoc(GeometryCalib,outputfile);% introduce the calibration data in the xml file 281 284 if ~strcmp(errormsg,'') … … 1365 1368 [s,errormsg]=imadoc2struct(fileinput,'GeometryCalib'); 1366 1369 if ~isempty(errormsg) 1367 msgbox_uvmat('ERROR', ['Error for reading ' fileinput ': ' errormsg])1370 msgbox_uvmat('ERROR',errormsg) 1368 1371 return 1369 1372 end
Note: See TracChangeset
for help on using the changeset viewer.