Changeset 437 for trunk/src/civ_matlab.m
- Timestamp:
- Jun 4, 2012, 12:03:58 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ_matlab.m
r435 r437 209 209 210 210 Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch1_Rho','Patch1_Threshold','Patch1_SubDomain'}]; 211 Data.Patch1_Rho=Param.Patch1. SmoothingParam;211 Data.Patch1_Rho=Param.Patch1.FieldSmooth; 212 212 Data.Patch1_Threshold=Param.Patch1.MaxDiff; 213 213 Data.Patch1_SubDomain=Param.Patch1.SubdomainSize; … … 263 263 par_civ2.ImageB=par_civ1.ImageB; 264 264 end 265 ibx2=ceil(par_civ2. Bx/2);266 iby2=ceil(par_civ2. By/2);265 ibx2=ceil(par_civ2.CorrBoxSize(1)/2); 266 iby2=ceil(par_civ2.CorrBoxSize(2)/2); 267 267 isx2=ibx2+4;% search ara +-4 pixels around the guess 268 268 isy2=iby2+4; … … 308 308 mask=imread(par_civ2.Mask); 309 309 end 310 par_civ2.Search x=2*isx2+1;311 par_civ2.Search y=2*isy2+1;312 par_civ2.S hiftx=Shiftx(nbval>=1)./nbval(nbval>=1);313 par_civ2.Shifty=Shifty(nbval>=1)./nbval(nbval>=1);314 par_civ2.Grid=[GridX(nbval>=1)-par_civ2.S hiftx/2 GridY(nbval>=1)-par_civ2.Shifty/2];% grid taken at the extrapolated origin of the displacement vectors310 par_civ2.SearchBoxSize(1)=2*isx2+1; 311 par_civ2.SearchBoxSize(2)=2*isy2+1; 312 par_civ2.SearchBoxShift=[Shiftx(nbval>=1)./nbval(nbval>=1) Shifty(nbval>=1)./nbval(nbval>=1)]; 313 % par_civ2.SearchBoxShift(2)=Shifty(nbval>=1)./nbval(nbval>=1); 314 par_civ2.Grid=[GridX(nbval>=1)-par_civ2.SearchBoxShift(:,1)/2 GridY(nbval>=1)-par_civ2.SearchBoxShift(:,2)/2];% grid taken at the extrapolated origin of the displacement vectors 315 315 if par_civ2.CheckDeformation 316 316 par_civ2.DUDX=DUDX./nbval; … … 392 392 if isfield (Param,'Patch2') 393 393 Data.ListGlobalAttribute=[Data.ListGlobalAttribute {'Patch2_Rho','Patch2_Threshold','Patch2_SubDomain'}]; 394 Data.Patch2_Rho=Param.Patch2. SmoothingParam;394 Data.Patch2_Rho=Param.Patch2.FieldSmooth; 395 395 Data.Patch2_Threshold=Param.Patch2.MaxDiff; 396 396 Data.Patch2_SubDomain=Param.Patch2.SubdomainSize; … … 454 454 455 455 %% prepare grid 456 ibx2=ceil(par_civ. Bx/2);457 iby2=ceil(par_civ. By/2);458 isx2=ceil(par_civ.Search x/2);459 isy2=ceil(par_civ.Search y/2);460 shiftx=round(par_civ.S hiftx);461 shifty=-round(par_civ.S hifty);% sign minus because image j index increases when y decreases456 ibx2=ceil(par_civ.CorrBoxSize(1)/2); 457 iby2=ceil(par_civ.CorrBoxSize(2)/2); 458 isx2=ceil(par_civ.SearchBoxSize(1)/2); 459 isy2=ceil(par_civ.SearchBoxSize(2)/2); 460 shiftx=round(par_civ.SearchBoxShift(:,1)); 461 shifty=-round(par_civ.SearchBoxShift(:,2));% sign minus because image j index increases when y decreases 462 462 if isfield(par_civ,'Grid') 463 463 if ischar(par_civ.Grid)%read the drid file if the input is a file name … … 466 466 end 467 467 else% automatic measurement grid 468 ibx2=ceil(par_civ.Bx/2);469 iby2=ceil(par_civ.By/2);470 isx2=ceil(par_civ.Searchx/2);471 isy2=ceil(par_civ.Searchy/2);468 % ibx2=ceil(par_civ.Bx/2); 469 % iby2=ceil(par_civ.By/2); 470 % isx2=ceil(par_civ.Searchx/2); 471 % isy2=ceil(par_civ.Searchy/2); 472 472 miniy=max(1+isy2+shifty,1+iby2); 473 473 minix=max(1+isx2-shiftx,1+ibx2); … … 609 609 if ~isempty(y) && ~isempty(x) 610 610 try 611 if par_civ. Rho==1611 if par_civ.CorrSmooth==1 612 612 [vector,F(ivec)] = SUBPIXGAUSS (result_conv,x,y); 613 elseif par_civ. Rho==2613 elseif par_civ.CorrSmooth==2 614 614 [vector,F(ivec)] = SUBPIX2DGAUSS (result_conv,x,y); 615 615 end
Note: See TracChangeset
for help on using the changeset viewer.