Changeset 1161 for trunk/src/series
- Timestamp:
- Jul 19, 2024, 5:57:46 AM (5 months ago)
- Location:
- trunk/src/series
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_3D.m
r1160 r1161 314 314 return 315 315 end 316 %for z_index=2:floor((NbSlice-1)/par_civ1.Dz)% loop on slices316 % loop on slices 317 317 for z_index=2:floor((NbSlice-SearchRange_z)/par_civ1.Dz)% loop on slices 318 par_civ1.ImageA=circshift(par_civ1.ImageA,-par_civ1.Dz );%shift the indices in the image block upward by par_civ1.Dz319 par_civ1.ImageB=circshift(par_civ1.Image A,-par_civ1.Dz);318 par_civ1.ImageA=circshift(par_civ1.ImageA,-par_civ1.Dz,1);%shift the indices in the image block upward by par_civ1.Dz 319 par_civ1.ImageB=circshift(par_civ1.ImageB,-par_civ1.Dz,1); 320 320 for iz=1:par_civ1.Dz %read the new images at the end of the image block 321 j_image_index=j1_series_Civ1(z_index*par_civ1.Dz+SearchRange_z-par_civ1.Dz+iz ,1)321 j_image_index=j1_series_Civ1(z_index*par_civ1.Dz+SearchRange_z-par_civ1.Dz+iz+1,1) 322 322 ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(1,ifield),[],j_image_index);% 323 323 A= read_image(ImageName_A,FileType_A); … … 330 330 [Data.Civ1_X(z_index,:,:),Data.Civ1_Y(z_index,:,:), Data.Civ1_U(z_index,:,:), Data.Civ1_V(z_index,:,:),Data.Civ1_W(z_index,:,:),... 331 331 Data.Civ1_C(z_index,:,:), Data.Civ1_FF(z_index,:,:), result_conv, errormsg] = civ3D (par_civ1); 332 333 332 if ~isempty(errormsg) 334 333 disp_uvmat('ERROR',errormsg,checkrun) … … 523 522 Data.CivStage=4; 524 523 end 525 % else 526 % SubRange= par_civ2.Civ1_SubRange; 527 % NbCentres=par_civ2.Civ1_NbCentres; 528 % Coord_tps=par_civ2.Civ1_Coord_tps; 529 % U_tps=par_civ2.Civ1_U_tps; 530 % V_tps=par_civ2.Civ1_V_tps; 531 % Civ1_Dt=par_civ2.Civ1_Dt; 532 % Civ2_Dt=par_civ2.Civ1_Dt; 533 % Data.ListVarName={}; 534 % Data.VarDimName={}; 535 % end 524 536 525 Shiftx=zeros(size(par_civ2.Grid,1),1);% shift expected from civ1 data 537 526 Shifty=zeros(size(par_civ2.Grid,1),1); 538 527 nbval=zeros(size(par_civ2.Grid,1),1);% nbre of interpolated values at each grid point (from the different patch subdomains) 539 if par_civ2.CheckDeformation 540 DUDX=zeros(size(par_civ2.Grid,1),1); 541 DUDY=zeros(size(par_civ2.Grid,1),1); 542 DVDX=zeros(size(par_civ2.Grid,1),1); 543 DVDY=zeros(size(par_civ2.Grid,1),1); 544 end 528 545 529 NbSubDomain=size(SubRange,3); 546 530 for isub=1:NbSubDomain% for each sub-domain of Patch1 … … 555 539 Shiftx(ind_sel)=Shiftx(ind_sel)+EM*U_tps(1:nbvec_sub+3,isub);%velocity shift estimated by tps from civ1 556 540 Shifty(ind_sel)=Shifty(ind_sel)+EM*V_tps(1:nbvec_sub+3,isub); 557 if par_civ2.CheckDeformation558 [EMDX,EMDY] = tps_eval_dxy(epoints,ctrs);%2D matrix of distances between extrapolation points epoints and spline centres (=site points) ctrs559 DUDX(ind_sel)=DUDX(ind_sel)+EMDX*U_tps(1:nbvec_sub+3,isub);560 DUDY(ind_sel)=DUDY(ind_sel)+EMDY*U_tps(1:nbvec_sub+3,isub);561 DVDX(ind_sel)=DVDX(ind_sel)+EMDX*V_tps(1:nbvec_sub+3,isub);562 DVDY(ind_sel)=DVDY(ind_sel)+EMDY*V_tps(1:nbvec_sub+3,isub);563 end564 541 end 565 542 end … … 924 901 correl_xy=conv2(subima2,flip(flip(subima1,2),1),'valid'); 925 902 result_conv(kz,:,:)=correl_xy; 926 max_xy(kz)=max(max(correl_xy)); 927 [yk(kz),xk(kz)]=find(correl_xy >=0.999*max_xy(kz),1);%find the indices of the maximum, use 0.999 to avoid rounding errors903 max_xy(kz)=max(max(correl_xy)); 904 [yk(kz),xk(kz)]=find(correl_xy==max_xy(kz),1);%find the indices of the maximum, use 0.999 to avoid rounding errors 928 905 end 929 906 [corrmax,dz]=max(max_xy); … … 990 967 FF=false; 991 968 peakz=z;peaky=y;peakx=x; 992 %if z < npz && z > 1 && y < npy && y > 1 && x < npx && x > 1993 %f0 = log(result_conv(z,y,x));994 %f1 = log(result_conv(z-1,y,x));995 %f2 = log(result_conv(z+1,y,x));996 %peakz = peakz+ (f1-f2)/(2*f1-4*f0+2*f2);997 % 998 %f1 = log(result_conv(z,y-1,x));999 %f2 = log(result_conv(z,y+1,x));1000 %peaky = peaky+ (f1-f2)/(2*f1-4*f0+2*f2);1001 % 1002 %f1 = log(result_conv(z,y,x-1));1003 %f2 = log(result_conv(z,y,x+1));1004 %peakx = peakx+ (f1-f2)/(2*f1-4*f0+2*f2);1005 %else1006 %FF=true;1007 %end969 if z < npz && z > 1 && y < npy && y > 1 && x < npx && x > 1 970 f0 = log(result_conv(z,y,x)); 971 f1 = log(result_conv(z-1,y,x)); 972 f2 = log(result_conv(z+1,y,x)); 973 peakz = peakz+ (f1-f2)/(2*f1-4*f0+2*f2); 974 975 f1 = log(result_conv(z,y-1,x)); 976 f2 = log(result_conv(z,y+1,x)); 977 peaky = peaky+ (f1-f2)/(2*f1-4*f0+2*f2); 978 979 f1 = log(result_conv(z,y,x-1)); 980 f2 = log(result_conv(z,y,x+1)); 981 peakx = peakx+ (f1-f2)/(2*f1-4*f0+2*f2); 982 else 983 FF=true; 984 end 1008 985 1009 986 vector=[peakx-floor(npx/2)-1 peaky-floor(npy/2)-1 peakz-floor(npz/2)-1]; -
trunk/src/series/civ_input.m
r1156 r1161 132 132 [~,~,~,~,~,~,~,~,NomTypeImaA]=fileparts_uvmat(Data.Civ1_ImageA); 133 133 % [~,~,~,~,~,~,~,~,NomTypeImaB]=fileparts_uvmat(Data.Civ1_ImageB); 134 else 134 elseif isfield(Data,'Civ2_ImageA') 135 135 series('display_file_name',hhseries,Data.Civ2_ImageA,'append');%append the image series to the input list 136 136 [~,~,~,~,~,~,~,~,NomTypeImaA]=fileparts_uvmat(Data.Civ2_ImageA); … … 415 415 %% Civ1 parameters 416 416 %Param.CheckCiv1=1; 417 Param.Civ1.CorrBoxSize=[ 25 251];418 Param.Civ1.SearchBoxSize=[ 55 555];417 Param.Civ1.CorrBoxSize=[31 31 1]; 418 Param.Civ1.SearchBoxSize=[61 61 5]; 419 419 Param.Civ1.SearchBoxShift=[0 0]; 420 420 Param.Civ1.CorrSmooth=1; … … 432 432 %% Patch1 parameters 433 433 %Param.CheckPatch1=1; 434 Param.Patch1.FieldSmooth=20 ;435 Param.Patch1.MaxDiff= 2;434 Param.Patch1.FieldSmooth=200; 435 Param.Patch1.MaxDiff=1.5; 436 436 Param.Patch1.SubDomainSize=125; 437 437 … … 452 452 453 453 %% Patch2 parameters 454 Param.Patch2.FieldSmooth= 5;455 Param.Patch2.MaxDiff=1 .5000;454 Param.Patch2.FieldSmooth=20; 455 Param.Patch2.MaxDiff=1; 456 456 Param.Patch2.SubDomainSize=250; 457 Param.Patch2.TestPatch2=0;458 457 459 458 fill_GUI(Param,handles.civ_input)% fill the elements of the GUI series with the input parameters … … 706 705 end 707 706 mode_value=get(handles.ListPairMode,'Value'); 708 if isempty(mode_value) 707 if isempty(mode_value)|| mode_value>numel(mode_list) 709 708 mode_value=1; 710 709 end … … 835 834 mode_list=get(handles.ListPairMode,'String'); 836 835 mode_value=get(handles.ListPairMode,'Value'); 837 if isempty(mode_value) 836 if isempty(mode_value)||mode_value>numel(mode_list) 838 837 mode_value=1; 839 838 end -
trunk/src/series/civ_series.m
r1160 r1161 1052 1052 par_civ.CorrSmooth=2;% use SUBPIX2DGAUSS (take into account more points near the max) 1053 1053 end 1054 1054 1055 1055 if par_civ.CorrSmooth~=0 % par_civ.CorrSmooth=0 implies no civ computation (just input image and grid points given) 1056 1056 for ivec=1:nbvec … … 1130 1130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1131 1131 corrmax= max(max(result_conv)); 1132 result_conv=(result_conv/corrmax)*255; %normalize, peak=always 255 1132 1133 %result_conv=(result_conv/corrmax); %normalize, peak=always 255 1133 1134 %Find the correlation max, at 255 1134 [y,x] = find(result_conv== 255,1);1135 [y,x] = find(result_conv==corrmax,1); 1135 1136 subimage2_crop=image2_crop(y:y+2*iby2/mesh,x:x+2*ibx2/mesh);%subimage of image 2 corresponding to the optimum displacement of first image 1136 1137 sum_square=sum_square*sum(sum(subimage2_crop.*subimage2_crop));% product of variances of image 1 and 2 … … 1169 1170 end 1170 1171 end 1171 result_conv=result_conv*corrmax/(255*sum_square);% keep the last correlation matrix for output 1172 result_conv=result_conv*corrmax/sum_square;% keep the last (not normalised) correlation matrix for output 1173 1174 %------------------------------------------------------------------------ 1175 % --- Find the maximum of the correlation function with subpixel resolution 1176 % make a fit with a gaussian curve from the three correlation values across the max, along each direction. 1177 % OUPUT: 1178 % vector = optimum displacement vector with subpixel correction 1179 % FF =flag: =0 OK 1180 % =1 , max too close to the edge of the search box (1 pixel margin) 1181 % INPUT: 1182 % result_conv: 2D correlation fct 1183 % x,y: position of the maximum correlation at integer values 1184 1185 function [vector,FF] = SUBPIXGAUSS (result_conv,x,y) 1186 %------------------------------------------------------------------------ 1187 % vector=[0 0]; %default 1188 FF=true;% error flag for vector truncated by the limited search box 1189 [npy,npx]=size(result_conv); 1190 1191 peaky = y; peakx=x; 1192 if y < npy && y > 1 && x < npx-1 && x > 1 1193 FF=false; % no error by the limited search box 1194 max_conv=result_conv(y,x);% max correlation 1195 peak2noise= max(4,max_conv/std(reshape(result_conv,1,[])));% ratio of max conv to standard deviation of correlations (estiamtion of noise level), set to value 4 if it is too low 1196 result_conv=result_conv*peak2noise/max_conv;% renormalise the correlation with respect to the noise 1197 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (=0 by discretisation, to avoid divergence in the log) 1198 1199 f0 = log(result_conv(y,x)); 1200 f1 = log(result_conv(y-1,x)); 1201 f2 = log(result_conv(y+1,x)); 1202 peaky = peaky+ (f1-f2)/(2*f1-4*f0+2*f2); 1203 f1 = log(result_conv(y,x-1)); 1204 f2 = log(result_conv(y,x+1)); 1205 peakx = peakx+ (f1-f2)/(2*f1-4*f0+2*f2); 1206 end 1207 1208 vector=[peakx-floor(npx/2)-1 peaky-floor(npy/2)-1]; 1172 1209 1173 1210 %------------------------------------------------------------------------ 1174 1211 % --- Find the maximum of the correlation function after interpolation 1175 % OUPUT: 1176 % vector = optimum displacement vector with subpixel correction 1177 % F =flag: =0 OK 1178 % =-2 , warning: max too close to the edge of the search box (1 pixel margin) 1179 % INPUT: 1180 % x,y: position of the maximum correlation at integer values 1181 1182 function [vector,F] = SUBPIXGAUSS (result_conv,x,y) 1212 function [vector,FF] = SUBPIX2DGAUSS (result_conv,x,y) 1183 1213 %------------------------------------------------------------------------ 1184 1214 % vector=[0 0]; %default 1185 F=0; 1186 [npy,npx]=size(result_conv); 1187 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (=0 by discretisation, to avoid divergence in the log) 1188 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ??? Israel Institute of Technology 1189 %http://urapiv.wordpress.com 1190 peaky = y;peakx=x; 1191 % if y < npy && y > 1 && x < npx-1 && x > 1 1192 % f0 = log(result_conv(y,x)); 1193 % f1 = log(result_conv(y-1,x)); 1194 % f2 = log(result_conv(y+1,x)); 1195 % peaky = peaky+ (f1-f2)/(2*f1-4*f0+2*f2); 1196 % f1 = log(result_conv(y,x-1)); 1197 % f2 = log(result_conv(y,x+1)); 1198 % peakx = peakx+ (f1-f2)/(2*f1-4*f0+2*f2); 1199 % else 1200 % F=1; % warning flag for vector truncated by the limited search box 1201 % end 1202 1203 vector=[peakx-floor(npx/2)-1 peaky-floor(npy/2)-1]; 1204 1205 %------------------------------------------------------------------------ 1206 % --- Find the maximum of the correlation function after interpolation 1207 function [vector,F] = SUBPIX2DGAUSS (result_conv,x,y) 1208 %------------------------------------------------------------------------ 1209 % vector=[0 0]; %default 1210 F=1; 1215 FF=true; 1211 1216 peaky=y; 1212 1217 peakx=x; 1213 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log)1214 1218 [npy,npx]=size(result_conv); 1215 1219 if (x < npx) && (y < npy) && (x > 1) && (y > 1) 1216 F=0; 1220 FF=false; 1221 max_conv=result_conv(y,x);% max correlation 1222 peak2noise= max(4,max_conv/std(reshape(result_conv,1,[])));% ratio of max conv to standard deviation of correlations (estiamtion of noise level), set to value 4 if it is too low 1223 result_conv=result_conv*peak2noise/max_conv;% renormalise the correlation with respect to the noise 1224 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (=0 by discretisation, to avoid divergence in the log) 1217 1225 for i=-1:1 1218 1226 for j=-1:1 1219 %following 15 lines based on 1220 %H. Nobach ??? M. Honkanen (2005) 1221 %Two-dimensional Gaussian regression for sub-pixel displacement 1222 %estimation in particle image velocimetry or particle position 1223 %estimation in particle tracking velocimetry 1224 %Experiments in Fluids (2005) 38: 511???515 1227 %following 15 lines based on H. Nobach and M. Honkanen (2005) 1228 % Two-dimensional Gaussian regression for sub-pixel displacement 1229 % estimation in particle image velocimetry or particle position 1230 % estimation in particle tracking velocimetry 1231 % Experiments in Fluids (2005) 38: 511-515 1225 1232 c10(j+2,i+2)=i*log(result_conv(y+j, x+i)); 1226 1233 c01(j+2,i+2)=j*log(result_conv(y+j, x+i)); … … 1235 1242 c20=(1/6)*sum(sum(c20)); 1236 1243 c02=(1/6)*sum(sum(c02)); 1237 deltax=(c11*c01-2*c10*c02)/(4*c20*c02-c11 ^2);1238 deltay=(c11*c10-2*c01*c20)/(4*c20*c02-c11 ^2);1244 deltax=(c11*c01-2*c10*c02)/(4*c20*c02-c11*c11); 1245 deltay=(c11*c10-2*c01*c20)/(4*c20*c02-c11*c11); 1239 1246 if abs(deltax)<1 1240 1247 peakx=x+deltax; -
trunk/src/series/extract_rdvision.m
r1149 r1161 122 122 if exist(filexml,'file') 123 123 [XmlData,errormsg]=imadoc2struct(filexml); 124 if ~isempty(errormsg) 124 if isempty(errormsg) 125 msgbox_uvmat('CONFIRMATION',[filexml ' used' ]); 126 else 125 127 msgbox_uvmat('ERROR',errormsg); 126 128 return -
trunk/src/series/stereo_civ.m
r1152 r1161 38 38 %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 39 39 40 function [Data,errormsg,result_conv ]= stereo_civ(Param)40 function [Data,errormsg,result_conv, XmlData]= stereo_civ(Param) 41 41 Data=[]; 42 42 errormsg=''; … … 85 85 WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series 86 86 87 %%%%%%%%%%%%%%%% Modif pour test %%%%%%%%%%%%%%%%%% 88 % CheckInputFile=isfield(Param,'InputTable');%= 1 in test use for TestCiv (no nc file involved) 89 CheckOutputFile = isfield(Param,'OutputSubDir') ; %= 1 in test use for TestPatch (no nc file produced) 90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 91 87 92 %% input files and indexing 88 93 MaxIndex_i=Param.IndexRange.MaxIndex_i; … … 95 100 time=[]; 96 101 for iview=1:size(Param.InputTable,1) 102 %XmlFileName=find_imadoc(Param.InputTable{iview,1},Param.InputTable{iview,2},Param.InputTable{iview,3},Param.InputTable{iview,5}); 97 103 XmlFileName=find_imadoc(Param.InputTable{iview,1},Param.InputTable{iview,2}); 98 104 if isempty(XmlFileName) … … 235 241 236 242 %% Output directory 237 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 243 OutputDir='/Test'; 244 if CheckOutputFile 245 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 246 end 247 238 248 239 249 ListGlobalAttribute={'Conventions','Program','CivStage'}; … … 252 262 end 253 263 if isempty(time)% time = index i by default 254 MaxIndex_i=max(i2_series_Civ1 );255 MaxIndex_j=max(j2_series_Civ1 );264 MaxIndex_i=max(i2_series_Civ1, [], 'all'); 265 MaxIndex_j=max(j2_series_Civ1, [], 'all'); 256 266 time=(1:MaxIndex_i)'*ones(1,MaxIndex_j); 257 267 time=[zeros(1,MaxIndex_j);time];% insert a first line of zeros … … 312 322 313 323 314 [A,Rangx,Rangy]=phys_ima(A,XmlData,1); 324 [A,Rangx,Rangy]=phys_ima(A,XmlData,1);%transform image A in phys coordinates 315 325 [Npy,Npx]=size(A{1}); 316 326 PhysImageA=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.png','_1a',i1_series_Civ1(ifield),[],1); … … 372 382 Data.Civ1_F=reshape(F,[],1); 373 383 384 %%%%%%%%%%%%%%%% ajout fonction test %%%%%%% 385 if ~isfield (Param.ActionInput,'Civ2') && ~isfield (Param.ActionInput,'Civ3') && ~isfield(Param.ActionInput,'Patch1') 386 [Data.Xmid, Data.Ymid, Data.Uphys, Data.Vphys, Data.Zphys, ... 387 Data.Yphys, Data.Xphys, Data.Error] = getPhysValues(Rangx, ... 388 Rangy, Npx, Npy, Data.Civ1_X, Data.Civ1_Y, Data.Civ1_U, ... 389 Data.Civ1_V, XmlData); 390 391 if ~isempty(errormsg) 392 disp_uvmat('ERROR',errormsg,checkrun) 393 return 394 end 395 end 396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 397 374 398 end 375 399 … … 414 438 return 415 439 end 416 417 Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch1_Rho','Patch1_Threshold','Patch1_SubDomain'}]; 440 441 %%%%%%%%%%%%%%%%%%%% modif fonction test %%%%%%%%%%%%%%%%%%%%%%% 442 try 443 Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch1_Rho','Patch1_Threshold','Patch1_SubDomain'}]; 444 catch 445 Data.ListGlobalAttribute={'Patch1_Rho','Patch1_Threshold','Patch1_SubDomain'}; 446 end 447 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 448 449 418 450 Data.Patch1_FieldSmooth=Param.ActionInput.Patch1.FieldSmooth; 419 451 Data.Patch1_MaxDiff=Param.ActionInput.Patch1.MaxDiff; 420 452 Data.Patch1_SubDomainSize=Param.ActionInput.Patch1.SubDomainSize; 421 nbvar=length(Data.ListVarName); 422 Data.ListVarName=[Data.ListVarName {'Civ1_U_smooth','Civ1_V_smooth','Civ1_SubRange','Civ1_NbCentres','Civ1_Coord_tps','Civ1_U_tps','Civ1_V_tps'}]; 423 Data.VarDimName=[Data.VarDimName {'nb_vec_1','nb_vec_1',{'nb_coord','nb_bounds','nb_subdomain_1'},'nb_subdomain_1',... 424 {'nb_tps_1','nb_coord','nb_subdomain_1'},{'nb_tps_1','nb_subdomain_1'},{'nb_tps_1','nb_subdomain_1'}}]; 453 454 %%%%%%%%%%%%%%%%%%% modif fonction test %%%%%%%%%%%%%%%%%%%%%%%% 455 try 456 nbvar=length(Data.ListVarName); 457 Data.ListVarName=[Data.ListVarName {'Civ1_U_smooth','Civ1_V_smooth','Civ1_SubRange','Civ1_NbCentres','Civ1_Coord_tps','Civ1_U_tps','Civ1_V_tps'}]; 458 Data.VarDimName=[Data.VarDimName {'nb_vec_1','nb_vec_1',{'nb_coord','nb_bounds','nb_subdomain_1'},'nb_subdomain_1',... 459 {'nb_tps_1','nb_coord','nb_subdomain_1'},{'nb_tps_1','nb_subdomain_1'},{'nb_tps_1','nb_subdomain_1'}}]; 460 catch 461 nbvar=0; 462 Data.ListVarName={'Civ1_U_smooth','Civ1_V_smooth','Civ1_SubRange','Civ1_NbCentres','Civ1_Coord_tps','Civ1_U_tps','Civ1_V_tps'}; 463 Data.VarDimName={'nb_vec_1','nb_vec_1',{'nb_coord','nb_bounds','nb_subdomain_1'},'nb_subdomain_1',... 464 {'nb_tps_1','nb_coord','nb_subdomain_1'},{'nb_tps_1','nb_subdomain_1'},{'nb_tps_1','nb_subdomain_1'}}; 465 end 466 467 if ~isfield(Param.ActionInput,'Civ1') 468 Data.Civ1_X = Param.Civ1_X ; 469 Data.Civ1_Y = Param.Civ1_Y ; 470 Data.Civ1_U = Param.Civ1_U ; 471 Data.Civ1_V = Param.Civ1_V ; 472 Data.Civ1_FF = Param.Civ1_FF ; 473 end 474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 475 425 476 Data.VarAttribute{nbvar+1}.Role='vector_x'; 426 477 Data.VarAttribute{nbvar+2}.Role='vector_y'; … … 436 487 end 437 488 [Data.Civ1_SubRange,Data.Civ1_NbCentres,Data.Civ1_Coord_tps,Data.Civ1_U_tps,Data.Civ1_V_tps,tild,Ures, Vres,tild,FFres]=... 438 filter_tps([Data.Civ1_X(ind_good) Data.Civ1_Y(ind_good)],Data.Civ1_U(ind_good),Data.Civ1_V(ind_good),[],Data.Patch1_SubDomainSize,Data.Patch1_FieldSmooth,Data.Patch1_MaxDiff); 489 filter_tps([Data.Civ1_X(ind_good) Data.Civ1_Y(ind_good)],Data.Civ1_U(ind_good),Data.Civ1_V(ind_good),[],Data.Patch1_SubDomainSize,Data.Patch1_FieldSmooth,Data.Patch1_MaxDiff); 490 439 491 Data.Civ1_U_smooth(ind_good)=Ures; 440 492 Data.Civ1_V_smooth(ind_good)=Vres; 441 493 Data.Civ1_FF(ind_good)=FFres; 442 Data.CivStage=3; 494 Data.CivStage=3; 495 496 if ~isfield (Param.ActionInput,'Civ2') && ~isfield (Param.ActionInput,'Civ3') 497 498 %%%%%%%%% modif fonction test %%%%%%%%%%%%%%%%% 499 try 500 [Data.Xmid, Data.Ymid, Data.Uphys, Data.Vphys, Data.Zphys, ... 501 Data.Yphys, Data.Xphys, Data.Error] = getPhysValues(Rangx, ... 502 Rangy, Npx, Npy, Data.Civ1_X, Data.Civ1_Y, Data.Civ1_U_smooth, ... 503 Data.Civ1_V_smooth, XmlData); 504 catch % si on a pas Rangx, Rangy, Npx, Npy on ouvre les images pour les recalculer 505 try 506 ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(ifield),[],j1_series_Civ1(ifield)); 507 [A{1},VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A_Civ1(ifield)); 508 ImageName_B=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ1(ifield),[],j2_series_Civ1(ifield)); 509 [A{2},VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B_Civ1(ifield)); 510 catch ME 511 if ~isempty(ME.message) 512 disp_uvmat('ERROR', ['error reading input image: ' ME.message],checkrun) 513 return 514 end 515 end 516 [A,Rangx,Rangy]=phys_ima(A,XmlData,1);%transform image A in phys coordinates 517 [Npy,Npx]=size(A{1}); 518 [Data.Xmid, Data.Ymid, Data.Uphys, Data.Vphys, Data.Zphys, ... 519 Data.Yphys, Data.Xphys, Data.Error] = getPhysValues(Rangx, ... 520 Rangy, Npx, Npy, Data.Civ1_X, Data.Civ1_Y, Data.Civ1_U_smooth, ... 521 Data.Civ1_V_smooth, XmlData); 522 end 523 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 524 525 if ~isempty(errormsg) 526 disp_uvmat('ERROR',errormsg,checkrun) 527 return 528 end 529 end 443 530 444 531 end 532 533 534 445 535 446 536 %% Civ2 … … 553 643 Data.Civ2_F=reshape(F,[],1); 554 644 Data.CivStage=Data.CivStage+1; 645 646 %%%%%%%%%%%%%%%% ajout fonction test %%%%%%% 647 if ~isfield (Param.ActionInput,'Civ3') && ~isfield(Param.ActionInput,'Patch2') 648 [Data.Xmid, Data.Ymid, Data.Uphys, Data.Vphys, Data.Zphys, ... 649 Data.Yphys, Data.Xphys, Data.Error] = getPhysValues(Rangx, ... 650 Rangy, Npx, Npy, Data.Civ2_X, Data.Civ2_Y, Data.Civ2_U, ... 651 Data.Civ2_V, XmlData); 652 653 if ~isempty(errormsg) 654 disp_uvmat('ERROR',errormsg,checkrun) 655 return 656 end 657 end 658 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 555 659 end 556 660 … … 612 716 Data.Civ2_FF(ind_good)=FFres; 613 717 Data.CivStage=Data.CivStage+1; 718 719 720 if ~isfield (Param.ActionInput,'Civ3') 721 [Data.Xmid, Data.Ymid, Data.Uphys, Data.Vphys, Data.Zphys, ... 722 Data.Yphys, Data.Xphys, Data.Error] = getPhysValues(Rangx, ... 723 Rangy, Npx, Npy, Data.Civ2_X, Data.Civ2_Y, Data.Civ2_U_smooth, ... 724 Data.Civ2_V_smooth, XmlData); 725 726 if ~isempty(errormsg) 727 disp_uvmat('ERROR',errormsg,checkrun) 728 return 729 end 730 end 731 614 732 end 615 733 … … 769 887 Data.CivStage=Data.CivStage+1; 770 888 771 % get z from u and v (displacements)772 Data.Xmid=Rangx(1)+(Rangx(2)-Rangx(1))*(Data.Civ3_X-0.5)/(Npx-1);%temporary coordinate (velocity taken at the point middle from imgae 1 and 2)773 Data.Ymid=Rangy(2)+(Rangy(1)-Rangy(2))*(Data.Civ3_Y-0.5)/(Npy-1);%temporary coordinate (velocity taken at the point middle from imgae 1 and 2)774 Data.Uphys=Data.Civ3_U_smooth*(Rangx(2)-Rangx(1))/(Npx-1);775 Data.Vphys=Data.Civ3_V_smooth*(Rangy(1)-Rangy(2))/(Npy-1);776 [Data.Zphys,Data.Xphys,Data.Yphys,Data.Error]=shift2z(Data.Xmid,Data.Ymid,Data.Uphys,Data.Vphys,XmlData); %Data.Xphys and Data.Xphys are real coordinate (geometric correction more accurate than xtemp/ytemp) 889 890 [Data.Xmid, Data.Ymid, Data.Uphys, Data.Vphys, Data.Zphys, ... 891 Data.Yphys, Data.Xphys, Data.Error] = getPhysValues(Rangx, ... 892 Rangy, Npx, Npy, Data.Civ3_X, Data.Civ3_Y, Data.Civ3_U_smooth, ... 893 Data.Civ3_V_smooth, XmlData); 894 777 895 if ~isempty(errormsg) 778 896 disp_uvmat('ERROR',errormsg,checkrun) … … 784 902 785 903 %% write result in a netcdf file if requested 904 786 905 if LSM ~= 1 % store all data 787 if exist('ncfile ','var')788 errormsg=struct2nc(ncfile ,Data);906 if exist('ncfile2','var') 907 errormsg=struct2nc(ncfile2,Data); 789 908 if isempty(errormsg) 790 disp([ncfile ' written'])909 disp([ncfile2 ' written']) 791 910 else 792 911 disp(errormsg) … … 794 913 end 795 914 else 915 916 796 917 % store only phys data 797 Data_light.ListVarName={'Xphys','Yphys','Zphys','Civ 3_C','DX','DY','Error'};918 Data_light.ListVarName={'Xphys','Yphys','Zphys','Civ_C','DX','DY','Error'}; 798 919 Data_light.VarDimName={'nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3','nb_vec_3'}; 799 920 Data_light.VarAttribute{1}.Role='coord_x'; … … 802 923 Data_light.VarAttribute{5}.Role='vector_x'; 803 924 Data_light.VarAttribute{6}.Role='vector_y'; 804 ind_good=find(Data.Civ3_FF==0); 805 Data_light.Zphys=Data.Zphys(ind_good); 806 Data_light.Yphys=Data.Yphys(ind_good); 807 Data_light.Xphys=Data.Xphys(ind_good); 808 Data_light.Civ3_C=Data.Civ3_C(ind_good); 809 Data_light.DX=Data.Uphys(ind_good); 810 Data_light.DY=Data.Vphys(ind_good); 811 Data_light.Error=Data.Error(ind_good); 925 926 % vrifie la dernire passe effectue 927 if isfield (Param.ActionInput,'Civ3') 928 try 929 ind_good=find(Data.Civ3_FF==0); 930 Data_light.Civ_C=Data.Civ3_C(ind_good); 931 catch 932 Data_light.Civ_C=Data.Civ3_C; 933 end 934 elseif isfield (Param.ActionInput,'Civ2') 935 try 936 ind_good=find(Data.Civ2_FF==0); 937 Data_light.Civ_C=Data.Civ2_C(ind_good); 938 catch 939 Data_light.Civ_C=Data.Civ2_C; 940 end 941 elseif isfield (Param.ActionInput,'Civ1') 942 try 943 ind_good=find(Data.Civ1_FF==0); 944 Data_light.Civ_C=Data.Civ1_C(ind_good); 945 catch 946 Data_light.Civ_C=Data.Civ1_C; 947 end 948 end 949 950 try 951 Data_light.Zphys=Data.Zphys(ind_good); 952 Data_light.Yphys=Data.Yphys(ind_good); 953 Data_light.Xphys=Data.Xphys(ind_good); 954 Data_light.DX=Data.Uphys(ind_good); 955 Data_light.DY=Data.Vphys(ind_good); 956 Data_light.Error=Data.Error(ind_good); 957 catch 958 Data_light.Zphys=Data.Zphys; 959 Data_light.Yphys=Data.Yphys; 960 Data_light.Xphys=Data.Xphys; 961 Data_light.DX=Data.Uphys; 962 Data_light.DY=Data.Vphys; 963 Data_light.Error=Data.Error; 964 end 965 966 812 967 if exist('ncfile2','var') 813 968 errormsg=struct2nc(ncfile2,Data_light); … … 827 982 end 828 983 829 984 end 830 985 831 986 % 'civ': function piv.m adapted from PIVlab http://pivlab.blogspot.com/ … … 1068 1223 end 1069 1224 result_conv=result_conv*corrmax/(255*sum_square);% keep the last correlation matrix for output 1225 end 1070 1226 1071 1227 %------------------------------------------------------------------------ … … 1098 1254 end 1099 1255 vector=[peakx-floor(npx/2)-1 peaky-floor(npy/2)-1]; 1256 end 1100 1257 1101 1258 %------------------------------------------------------------------------ … … 1141 1298 end 1142 1299 vector=[peakx-floor(npx/2)-1 peaky-floor(npy/2)-1]; 1300 end 1143 1301 1144 1302 %'RUN_FIX': function for fixing velocity fields: … … 1189 1347 end 1190 1348 1349 end 1191 1350 1192 1351 %------------------------------------------------------------------------ … … 1250 1409 j2_series=ind2*ones(1,size(i_series,2)); 1251 1410 check_bounds=zeros(size(i1_series));% no limitations due to min-max indices 1411 end 1252 1412 end 1253 1413 … … 1258 1418 % ymid+ v/2: set of apparent phys y coordinates in the ref plane, image B 1259 1419 % XmlData: content of the xml files containing geometric calibration parameters 1420 1421 1260 1422 function [z,Xphy,Yphy,Error]=shift2z(xmid, ymid, u, v,XmlData) 1261 1423 z=0; … … 1320 1482 Xphy=mean(xnew,1); 1321 1483 Yphy=mean(ynew,1); 1322 1323 1324 1325 1326 1484 end 1485 1486 function [Xmid, Ymid, Uphys, Vphys, Zphys, Yphys, Xphys, Error] ... 1487 = getPhysValues(Rangx, Rangy, Npx, Npy, Data_Civ_X, Data_Civ_Y, ... 1488 Data_Civ_U_smooth, Data_Civ_V_smooth, XmlData) 1489 1490 % get z from u and v (displacements) 1491 Xmid=Rangx(1)+(Rangx(2)-Rangx(1))*(Data_Civ_X-0.5)/(Npx-1);%temporary coordinate (velocity taken at the point middle from imgae 1 and 2) 1492 Ymid=Rangy(2)+(Rangy(1)-Rangy(2))*(Data_Civ_Y-0.5)/(Npy-1);%temporary coordinate (velocity taken at the point middle from imgae 1 and 2) 1493 Uphys=Data_Civ_U_smooth*(Rangx(2)-Rangx(1))/(Npx-1); 1494 Vphys=Data_Civ_V_smooth*(Rangy(1)-Rangy(2))/(Npy-1); 1495 [Zphys,Xphys,Yphys,Error]=shift2z(Xmid,Ymid,Uphys,Vphys,XmlData); %Data.Xphys and Data.Xphys are real coordinate (geometric correction more accurate than xtemp/ytempy 1496 1497 end -
trunk/src/series/stereo_input.m
r1129 r1161 1797 1797 set(handles.configSource,'String','NEW') 1798 1798 set(handles.OK,'BackgroundColor',[1 0 1]) 1799 1800 1799 1801 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1800 1802 %%%%%%%%%%%%%% TEST functions … … 1814 1816 Param.Action.RUN=1; 1815 1817 Param.ActionInput=read_GUI(handles.civ_input); 1816 if isfield(Param.ActionInput,'Fix1') 1817 Param.ActionInput=rmfield(Param.ActionInput,'Fix1'); 1818 end 1818 1819 1819 if isfield(Param.ActionInput,'Patch1') 1820 1820 Param.ActionInput=rmfield(Param.ActionInput,'Patch1'); … … 1829 1829 Param.ActionInput=rmfield(Param.ActionInput,'Patch2'); 1830 1830 end 1831 if isfield(Param ,'OutputSubDir')1832 Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series1831 if isfield(Param.ActionInput,'Civ3')%remove options that may be selected beyond Patch1 1832 Param.ActionInput=rmfield(Param.ActionInput,'Civ3'); 1833 1833 end 1834 if isfield(Param.ActionInput,'Fix3') 1835 Param.ActionInput=rmfield(Param.ActionInput,'Fix3'); 1836 end 1837 if isfield(Param.ActionInput,'Patch3') 1838 Param.ActionInput=rmfield(Param.ActionInput,'Patch3'); 1839 end 1840 % if isfield(Param,'OutputSubDir') 1841 % Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series 1842 % end 1834 1843 Param.ActionInput.Civ1.CorrSmooth=0;% launch Civ1 with no data point (to get the image names for A and B) 1835 [Data,errormsg ]=civ_series(Param);% get the civ1+fix1 results1836 if ~isempty(errormsg), return, end % rmq: error msg displayed in civ_series1844 [Data,errormsg, ~, xmlData]=stereo_civ(Param);% get the civ1+fix1 results 1845 % if ~isempty(errormsg), return, end % rmq: error msg displayed in civ_series 1837 1846 1838 1847 %% create image data ImageData for display 1839 1848 ImageData.ListVarName={'ny','nx','A'}; 1840 1849 ImageData.VarDimName= {'ny','nx',{'ny','nx'}}; 1841 ImageData.A=imread(Data.Civ1_ImageA); % read the first image 1850 1851 %%%%%%%%%%%%%%%%% modif fonction test %%%%%%%%%%% 1852 ImageData.VarAttribute{1}.Role='coord_y'; 1853 ImageData.VarAttribute{2}.Role='coord_x'; 1854 ImageData.VarAttribute{3}.Role='scalar'; 1855 1856 A{1}=imread(Data.Civ1_ImageA); % read the first image 1857 A{2}=imread(Data.Civ1_ImageB); % read the first image 1858 1859 phys_img = phys_ima(A,xmlData,1);%transform image A in phys coordinates 1860 ImageData.A = phys_img{1}; 1861 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1862 1842 1863 if ndims(ImageData.A)==3 %case of color image 1843 1864 ImageData.VarDimName= {'ny','nx',{'ny','nx','rgb'}}; … … 1856 1877 ViewData.PlotAxes.X=Data.Civ1_X'; 1857 1878 ViewData.PlotAxes.Y=Data.Civ1_Y'; 1858 ViewData.PlotAxes.B=imread(Data.Civ1_ImageB);%store the second image in the UserData of the GUI view_field 1879 1880 %%%%%%%%%%%%%%%%%%%%%%% 1881 ViewData.PlotAxes.B=phys_img{2};%store the second image in the UserData of the GUI view_field 1882 %%%%%%%%%%%%%%%%%%%%%%% 1883 1859 1884 set(hview_field,'UserData',ViewData)% store the info in the UserData of image view_field 1860 1885 … … 1897 1922 Param.Action.RUN=1; 1898 1923 Param.ActionInput=read_GUI(handles.civ_input); 1924 1899 1925 if isfield(Param.ActionInput,'Civ2')%remove options that may be selected beyond Patch1 1900 1926 Param.ActionInput=rmfield(Param.ActionInput,'Civ2'); … … 1906 1932 Param.ActionInput=rmfield(Param.ActionInput,'Patch2'); 1907 1933 end 1908 if isfield(Param ,'OutputSubDir')1909 Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series1934 if isfield(Param.ActionInput,'Civ3')%remove options that may be selected beyond Patch1 1935 Param.ActionInput=rmfield(Param.ActionInput,'Civ3'); 1910 1936 end 1937 if isfield(Param.ActionInput,'Fix3') 1938 Param.ActionInput=rmfield(Param.ActionInput,'Fix3'); 1939 end 1940 if isfield(Param.ActionInput,'Patch3') 1941 Param.ActionInput=rmfield(Param.ActionInput,'Patch3'); 1942 end 1943 % if isfield(Param,'OutputSubDir') 1944 % Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series 1945 % end 1946 1911 1947 ParamPatch1=Param.ActionInput.Patch1; %store the patch1 parameters 1912 1948 Param.ActionInput=rmfield(Param.ActionInput,'Patch1');% does not execute Patch 1913 [Data,errormsg]=civ_series(Param);% get the civ1+fix1 results 1949 1950 [Data,errormsg]=stereo_civ(Param);% get the civ1+fix1 results 1914 1951 bckcolor=get(handles.civ_input,'Color'); 1915 1952 set(handles.Civ1,'BackgroundColor',bckcolor)% indicate civ1 calculation is finished … … 1921 1958 Param.Civ1_V=Data.Civ1_V; 1922 1959 Param.Civ1_FF=Data.Civ1_FF; 1923 Param=rmfield(Param,'InputTable');%desactivate input file reading 1960 1961 %%%%% modif fonction test %%%%%% 1962 % Param=rmfield(Param,'InputTable');%desactivate input file reading 1963 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1964 1924 1965 if isfield(Param.ActionInput,'Civ1') 1925 1966 Param.ActionInput=rmfield(Param.ActionInput,'Civ1');%desactivate civ1: remove civ1 input param if relevant … … 1935 1976 for irho=1:7 1936 1977 Param.ActionInput.Patch1.FieldSmooth=SmoothingParam(irho); 1937 [Data,errormsg]= civ_series(Param);%apply the processing fct 1938 if ~isempty(errormsg) 1939 msgbox_uvmat('ERROR',errormsg) 1940 return 1941 end 1978 [Data,errormsg]= stereo_civ(Param);%apply the processing fct 1979 1980 %%%%%%%%%% modif fonction test %%%%%%%%%%%%%% 1981 % if ~isempty(errormsg) 1982 % msgbox_uvmat('ERROR',errormsg) 1983 % return 1984 % end 1985 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1986 1942 1987 ind_good=find(Data.Civ1_FF==0); 1943 1988 Civ1_U_Diff=Data.Civ1_U(ind_good)-Data.Civ1_U_smooth(ind_good); … … 1976 2021 Param.Action.RUN=1; 1977 2022 Param.ActionInput=read_GUI(handles.civ_input); 1978 if isfield(Param,'OutputSubDir') 1979 Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series 2023 2024 if isfield(Param.ActionInput,'Patch2') 2025 Param.ActionInput=rmfield(Param.ActionInput,'Patch2'); 1980 2026 end 2027 if isfield(Param.ActionInput,'Civ3')%remove options that may be selected beyond Patch1 2028 Param.ActionInput=rmfield(Param.ActionInput,'Civ3'); 2029 end 2030 if isfield(Param.ActionInput,'Fix3') 2031 Param.ActionInput=rmfield(Param.ActionInput,'Fix3'); 2032 end 2033 if isfield(Param.ActionInput,'Patch3') 2034 Param.ActionInput=rmfield(Param.ActionInput,'Patch3'); 2035 end 2036 2037 % if isfield(Param,'OutputSubDir') 2038 % Param=rmfield(Param,'OutputSubDir'); %remove output file option from civ_series 2039 % end 2040 1981 2041 Param.ActionInput.Civ2.CorrSmooth=0;% launch Civ2 with no data point (to get the image names for A and B) 1982 2042 set(handles.Civ1,'BackgroundColor',[1 1 0]) 1983 2043 set(handles.Fix1,'BackgroundColor',[1 1 0]) 1984 2044 set(handles.Patch1,'BackgroundColor',[1 1 0]) 1985 [Data,errormsg]=civ_series(Param);% get the civ1+fix1 results 2045 [Data,errormsg, ~, xmlData]=stereo_civ(Param);% get the civ1+fix1+patch1+civ2+fix2 results 2046 % if ~isempty(errormsg), return, end 1986 2047 1987 2048 %% create image data ImageData for display 1988 2049 ImageData.ListVarName={'ny','nx','A'}; 1989 2050 ImageData.VarDimName= {'ny','nx',{'ny','nx'}}; 1990 ImageData.A=imread(Data.Civ2_ImageA); % read the first image 2051 2052 %%%%%%%%%%%%%%%%% modif fonction test %%%%%%%%%%% 2053 ImageData.VarAttribute{1}.Role='coord_y'; 2054 ImageData.VarAttribute{2}.Role='coord_x'; 2055 ImageData.VarAttribute{3}.Role='scalar'; 2056 2057 A{1}=imread(Data.Civ2_ImageA); % read the first image 2058 A{2}=imread(Data.Civ2_ImageB); % read the first image 2059 2060 phys_img = phys_ima(A,xmlData,1);%transform image A in phys coordinates 2061 ImageData.A = phys_img{1}; 2062 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2063 1991 2064 if ndims(ImageData.A)==3 %case of color image 1992 2065 ImageData.VarDimName= {'ny','nx',{'ny','nx','rgb'}}; … … 2012 2085 % store info in the UserData of view-field 2013 2086 ViewData.CivHandle=handles.civ_input;% indicate the handle of the civ GUI in view_field 2014 ViewData.PlotAxes.B=imread(Data.Civ2_ImageB);%store the second image in the UserData of the GUI view_field 2087 2088 %%%%%%%%%%%% modif fonction test %%%%%%%%%%%%%%%%%%%%%%%%%% 2089 ViewData.PlotAxes.B=phys_img{2};%store the second image in the UserData of the GUI view_field 2090 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2091 2015 2092 ViewData.PlotAxes.X=Data.Civ2_X'; 2016 2093 ViewData.PlotAxes.Y=Data.Civ2_Y'; … … 2038 2115 set(corrfig,'name','image correlation') 2039 2116 set(corrfig,'DeleteFcn',{@closeview_field})% 2040 set(handles.TestCiv 1,'BackgroundColor',[1 0 0])2117 set(handles.TestCiv2,'BackgroundColor',[1 0 0]) 2041 2118 else 2042 set(handles.TestCiv 1,'BackgroundColor',[1 0 0])% paint button to red2119 set(handles.TestCiv2,'BackgroundColor',[1 0 0])% paint button to red 2043 2120 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 2044 2121 if ~isempty(corrfig) -
trunk/src/series/test_filter_tps.m
r1157 r1161 284 284 %plot rms difference and proportion of excluded vectors 285 285 figure(2) 286 cl a286 clf 287 287 if CivStage==3% civ1 288 288 ref=0.2; %recommanded value for diff rms
Note: See TracChangeset
for help on using the changeset viewer.