Changeset 337
 Timestamp:
 Dec 16, 2011, 3:45:03 PM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/civ_matlab.m
r331 r337 54 54 check_civ1=1;% test for further use of civ1 results 55 55 % caluclate velocity data (y and v in indices, reverse to y component) 56 [xtable ytable utable vtable ctable F result_conv errormsg] = civ (Param.Civ1); 56 [xtable1 ytable1 utable1 vtable1 ctable1 F1 result_conv1 errormsg1] = civ (Param.Civ1); 57 58 % to try the reverse_pair method, uncomment below 59 % Param.Civ1.reverse_pair=1; 60 % [xtable2 ytable2 utable2 vtable2 ctable2 F2 result_conv2 errormsg2] = civ (Param.Civ1); 61 62 xtable=[xtable1; xtable2]; 63 ytable=[ytable1; ytable2]; 64 utable=[utable1; utable2]; 65 vtable=[vtable1; vtable2]; 66 ctable=[ctable1; ctable2]; 67 F=[F1; F2]; 68 result_conv=[result_conv1; result_conv2]; 69 errormsg=[errormsg1; errormsg2]; 70 71 % xtable=mean(xtable1,xtable2); 72 % ytable=mean(ytable1,ytable2); 73 % utable=mean(utable1,utable2); 74 % vtable=mean(vtable1,vtable2); 75 57 76 if ~isempty(errormsg) 58 77 return … … 389 408 390 409 %% prepare images 391 if ischar(par_civ.ImageA) 392 par_civ.ImageA=imread(par_civ.ImageA); 393 end 394 if ischar(par_civ.ImageB) 395 par_civ.ImageB=imread(par_civ.ImageB); 396 end 410 if isfield(par_civ,'reverse_pair') 411 if par_civ.reverse_pair 412 if ischar(par_civ.ImageB) 413 temp=par_civ.ImageA; 414 par_civ.ImageA=imread(par_civ.ImageB); 415 end 416 if ischar(temp) 417 par_civ.ImageB=imread(temp); 418 end 419 end 420 else 421 if ischar(par_civ.ImageA) 422 par_civ.ImageA=imread(par_civ.ImageA); 423 end 424 if ischar(par_civ.ImageB) 425 par_civ.ImageB=imread(par_civ.ImageB); 426 end 427 end 428 397 429 [npy_ima npx_ima]=size(par_civ.ImageA); 398 430 if ~isequal(size(par_civ.ImageB),[npy_ima npx_ima]) … … 503 535 504 536 % if (x <= (size(result_conv,1)1)) && (y <= (size(result_conv,1)1)) && (x >= 1) && (y >= 1) 505 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion Israel Institute of Technology537 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ï¿œ Israel Institute of Technology 506 538 %http://urapiv.wordpress.com 507 539 peaky = y; … … 539 571 for j=1:1 540 572 %following 15 lines based on 541 %H. Nobach ÆM. Honkanen (2005)573 %H. Nobach ï¿œ M. Honkanen (2005) 542 574 %Twodimensional Gaussian regression for subpixel displacement 543 575 %estimation in particle image velocimetry or particle position 544 576 %estimation in particle tracking velocimetry 545 %Experiments in Fluids (2005) 38: 511 515577 %Experiments in Fluids (2005) 38: 511ï¿œ515 546 578 c10(j+2,i+2)=i*log(result_conv(y+j, x+i)); 547 579 c01(j+2,i+2)=j*log(result_conv(y+j, x+i));
Note: See TracChangeset
for help on using the changeset viewer.