Changeset 856 for trunk/src/mouse_motion.m
- Timestamp:
- Jan 26, 2015, 12:37:56 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r855 r856 64 64 end 65 65 test_piv=0; 66 if isfield(FigData,'CivHandle') 66 if isfield(FigData,'CivHandle')% look for handle of the civ_input GUI 67 67 if ~ishandle(FigData.CivHandle) 68 68 delete(hObject) … … 70 70 return 71 71 end 72 hhciv=guidata(FigData.CivHandle); 72 hhciv=guidata(FigData.CivHandle);% list of handles in the GUI civ_input 73 73 test_piv=1; 74 74 end … … 236 236 % case of PIV correlation display 237 237 if test_piv 238 par=read_GUI(hhciv.Civ1); 239 [dd,ind_pt]=min(abs(Field.X-xy(1,1))+abs(Field.Y-xy(1,2))); 238 [dd,ind_pt]=min(abs(Field.X-xy(1,1))+abs(Field.Y-xy(1,2))); 239 if (isfield(hhciv,'TestCiv2')&& get(hhciv.TestCiv2,'Value'))% if TestCiv2 is activated 240 CivOption='Civ2'; 241 Param.CheckCiv1=0; 242 par_civ=read_GUI(hhciv.Civ2);%read the Civ2 panel in civ_input 243 par_civ.Civ1_SubRange=Field.Civ1_SubRange; 244 par_civ.Civ1_NbCentres=Field.Civ1_NbCentres; 245 par_civ.Civ1_Coord_tps=Field.Civ1_Coord_tps; 246 par_civ.Civ1_U_tps=Field.Civ1_U_tps; 247 par_civ.Civ1_V_tps=Field.Civ1_V_tps; 248 par_civ.Civ1_Dt=Field.Civ1_Dt; 249 shiftx=Field.ShiftX(ind_pt); 250 shifty=Field.ShiftY(ind_pt); 251 else 252 CivOption='Civ1'; 253 Param.CheckCiv2=0; 254 par_civ=read_GUI(hhciv.Civ1);%read the Civ1 panel in civ_input 255 shiftx=par_civ.SearchBoxShift(1); 256 shifty=par_civ.SearchBoxShift(2); 257 end 240 258 xround=Field.X(ind_pt); 241 259 yround=Field.Y(ind_pt); 242 par.Grid=[xround yround];260 243 261 % mark the correlation box with a rectangle 244 par.ImageA=Field.A; 245 par.ImageB=Field.B; 246 par.ImageHeight=size(par.ImageA,1); 247 par.ImageWidth=size(par.ImageA,2); 248 Param.ActionInput.Civ1=par; 249 ibx2=floor((par.CorrBoxSize(1)-1)/2); 250 iby2=floor((par.CorrBoxSize(2)-1)/2); 251 isx2=floor((par.SearchBoxSize(1)-1)/2); 252 isy2=floor((par.SearchBoxSize(2)-1)/2); 253 shiftx=par.SearchBoxShift(1); 254 shifty=par.SearchBoxShift(2); 262 ibx2=floor((par_civ.CorrBoxSize(1)-1)/2); 263 iby2=floor((par_civ.CorrBoxSize(2)-1)/2); 264 isx2=floor((par_civ.SearchBoxSize(1)-1)/2); 265 isy2=floor((par_civ.SearchBoxSize(2)-1)/2); 255 266 hhh=findobj(CurrentAxes,'Tag','PIV_box_marker'); 256 267 hhhh=findobj(CurrentAxes,'Tag','PIV_search_marker'); … … 268 279 set(hhhh,'Position',[xround-isx2+shiftx yround-isy2+shifty 2*isx2 2*isy2]) 269 280 end 281 282 % perform the PIV calculation as the single point xround yround 283 Param.CheckFix1=0; 284 Param.CheckPatch1=0;%desactivate all calculations except Civ2 or Civ1 270 285 Param.Action.RUN=1; 271 286 Param.ActionInput.ListCompareMode='PIV'; 287 par_civ.ImageA=Field.A; 288 par_civ.ImageB=Field.B; 289 par_civ.ImageHeight=size(par_civ.ImageA,1); 290 par_civ.ImageWidth=size(par_civ.ImageA,2); 291 par_civ.Grid=[xround yround];% PIV calculation with a single point 292 Param.ActionInput.(CivOption)=par_civ; 293 294 % .ImageA: first image for correlation (matrix) 295 % .ImageB: second image for correlation(matrix) 296 % .CorrBoxSize: 1,2 vector giving the size of the correlation box in x and y 297 % .SearchBoxSize: 1,2 vector giving the size of the search box in x and y 298 % .SearchBoxShift: 1,2 vector or 2 column matrix (for civ2) giving the shift of the search box in x and y 299 % .CorrSmooth: =1 or 2 determines the choice of the sub-pixel determination of the correlation max 300 % .ImageWidth: nb of pixels of the image in x 301 % .Dx, Dy: mesh for the PIV calculation 302 % .Grid: grid giving the PIV calculation points (alternative to .Dx .Dy) 303 % .Mask: name of a mask file or mask image matrix itself 304 % .MinIma: thresholds for image luminosity 305 % .MaxIma 306 % .CheckDeformation=1 for subpixel interpolation and image deformation (linear transform) 307 % .DUDX: matrix of deformation obtained from patch at each grid point 308 % .DUDY 309 % .DVDX: 310 % .DVDY 311 272 312 [Data,errormsg,result_conv]= civ_series(Param); 273 313 if ~isempty(errormsg)
Note: See TracChangeset
for help on using the changeset viewer.