- Timestamp:
- May 13, 2013, 8:46:23 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/update_imadoc.m
r630 r634 45 45 t=set(t,1,'name','ImaDoc'); 46 46 % in case of movie (avi file), copy timing info in the new xml file 47 %[pp,outputroot]=fileparts(outputfile);47 [pp,outputroot]=fileparts(outputfile); 48 48 % imainfo=[]; 49 %if exist(fullfile(pp,[outputroot '.avi']),'file')50 %FileName=fullfile(pp,[outputroot '.avi']);51 %hhh=which('videoreader');52 %if isempty(hhh)%use old video function of matlab53 %imainfo=aviinfo(FileName);54 %imainfo.FrameRate=imainfo.FramesPerSecond;55 %imainfo.NumberOfFrames=imainfo.NumFrames;56 %else %use video function videoreader of matlab57 %imainfo=get(videoreader(FileName));58 %end59 %if ~isempty(imainfo)60 %[t,uid_camera]=add(t,1,'element','Camera');61 %Camera.TimeUnit='s';62 %Camera.BurstTiming.Time=0;63 %Camera.BurstTiming.Dti=1/imainfo.FrameRate;64 %Camera.BurstTiming.NbDti=imainfo.NumberOfFrames-1;65 %t=struct2xml(Camera,t,uid_camera);66 %end67 %end49 if exist(fullfile(pp,[outputroot '.avi']),'file') 50 FileName=fullfile(pp,[outputroot '.avi']); 51 hhh=which('videoreader'); 52 if isempty(hhh)%use old video function of matlab 53 imainfo=aviinfo(FileName); 54 imainfo.FrameRate=imainfo.FramesPerSecond; 55 imainfo.NumberOfFrames=imainfo.NumFrames; 56 else %use video function videoreader of matlab 57 imainfo=get(videoreader(FileName)); 58 end 59 if ~isempty(imainfo) 60 [t,uid_camera]=add(t,1,'element','Camera'); 61 Camera.TimeUnit='s'; 62 Camera.BurstTiming.Time=0; 63 Camera.BurstTiming.Dti=1/imainfo.FrameRate; 64 Camera.BurstTiming.NbDti=imainfo.NumberOfFrames-1; 65 t=struct2xml(Camera,t,uid_camera); 66 end 67 end 68 68 [t,uid_calib]=add(t,1,'element',StructName); 69 69 end
Note: See TracChangeset
for help on using the changeset viewer.