Changeset 1068 for trunk/src/series/civ_series.m
- Timestamp:
- Jul 9, 2019, 10:10:18 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r1065 r1068 89 89 end 90 90 % estimated CPUTime 91 Data.CPUTime=1; % 1 minute per field pair 91 CPUtime_unit=0.01;%estimated time for a multiplication (in microsecond) 92 if isfield(Param.SeriesData,'FileInfo')&&isfield(Param.SeriesData.FileInfo{1},'Height')&&isfield(Param.SeriesData.FileInfo{1},'Width') 93 pixnbre=Param.SeriesData.FileInfo{1}.Height*Param.SeriesData.FileInfo{1}.Width; % total number of pxels for input images 94 CPUtime=0; 95 if isfield(Data.ActionInput,'Civ1') 96 %BoxSize=Data.ActionInput.Civ1.CorrBoxSize(1)*Data.ActionInput.Civ1.CorrBoxSize(2); 97 tic 98 testboxa=rand(Data.ActionInput.Civ1.CorrBoxSize(1),Data.ActionInput.Civ1.CorrBoxSize(2)); 99 testboxb=rand(Data.ActionInput.Civ1.SearchBoxSize(1),Data.ActionInput.Civ1.SearchBoxSize(2)); 100 anss=conv2(testboxa,testboxb); 101 CPUtime_unit=toc; 102 nb_box=pixnbre/(Data.ActionInput.Civ1.Dx*Data.ActionInput.Civ1.Dy); 103 %nbpos=Data.ActionInput.Civ1.SearchBoxSize-Data.ActionInput.Civ1.CorrBoxSize; 104 CPUtime=2*CPUtime_unit*nb_box%*BoxSize*nbpos(1)*nbpos(2);% adjustement factor 2 used 105 end 106 if isfield(Data.ActionInput,'Patch1') 107 CPUtime=2*CPUtime; 108 end 109 if isfield(Data.ActionInput,'Civ2') 110 tic 111 testboxa=rand(Data.ActionInput.Civ2.CorrBoxSize(1),Data.ActionInput.Civ2.CorrBoxSize(2)); 112 testboxb=rand(Data.ActionInput.Civ2.SearchBoxSize(1),Data.ActionInput.Civ2.SearchBoxSize(2)); 113 anss=conv2(testboxa,testboxb); 114 CPUtime_unit=toc; 115 nb_box=pixnbre/(Data.ActionInput.Civ2.Dx*Data.ActionInput.Civ2.Dy); 116 %BoxSize=Data.ActionInput.Civ2.CorrBoxSize(1)*Data.ActionInput.Civ2.CorrBoxSize(2); 117 %nbpos=Data.ActionInput.Civ2.SearchBoxSize-Data.ActionInput.Civ2.CorrBoxSize; 118 CPUtime=CPUtime+2*CPUtime_unit*nb_box;%*BoxSize*nbpos(1)*nbpos(2); 119 end 120 if isfield(Data.ActionInput,'Patch2') 121 CPUtime=(4/3)*CPUtime; 122 end 123 Data.CPUTime=ceil(CPUtime/6); % estimated CPU time per field pair in minute 124 Data.CPUTime=Data.CPUTime/10; % displqy CPU time with 1 digit beyond dot 125 end 92 126 return 93 127 end
Note: See TracChangeset
for help on using the changeset viewer.