1 / 26

Instructor: Lichuan Gui lichuan-gui@uiowa lcgui

Students are encouraged to attend the class. You may not be able to understand by just reading the lecture notes. Measurements in Fluid Mechanics 058:180:001 (ME:5180:0001) Time & Location: 2:30P - 3:20P MWF 218 MLH Office Hours: 4:00P – 5:00P MWF 223B-5 HL. Instructor: Lichuan Gui

palila
Download Presentation

Instructor: Lichuan Gui lichuan-gui@uiowa lcgui

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Students are encouraged to attend the class. You may not be able to understand by just reading the lecture notes. Measurements in Fluid Mechanics058:180:001 (ME:5180:0001)Time & Location: 2:30P - 3:20P MWF 218 MLHOffice Hours: 4:00P – 5:00P MWF 223B-5 HL Instructor: Lichuan Gui lichuan-gui@uiowa.edu http://lcgui.net

  2. Lecture 32. Erroneous Vector Identification& Correction

  3. Evaluation results with 6464-pixel window Double exposed PIV recording Erroneous Vectors Example: Air flow near a pipe wall

  4. Identify vectors larger than a threshold Remove vectors larger than the threshold Identification Erroneous Vectors Range limit validation

  5. 1 2 3 4 5 6 7 8 9 3 9 6 5 7 2 4 1 8 7 8 9 3 2 8 7 5 6 9 4 1 4 5 6 1 2 3 4 5 6 7 8 9 1 2 3 Validation criterion: Identification Erroneous Vectors Median filter (3x3)

  6. Identification Erroneous Vectors Effect of median filter Original vector map Filtered vector map

  7. Identification Erroneous Vectors 3D Median filter - Successively recorded PIV image pairs - Time interval between recording pairs t much smaller than flow variation period - Median of 27 vectors - Good for non-uniformly seeded flow |Vc-Vm| Vg

  8. Validation criterion: Identification Erroneous Vectors Reversibility of particle image pattern tracking

  9. Local maxima Evaluation function with strong noises Possible displacements Correction of Erroneous Vectors Possible particle image displacements

  10. Sm Possible vectors Target vector Correction of Erroneous Vectors Target vector method

  11. Possible vectors Reversed vectors Correction of Erroneous Vectors Maximal reversibility method

  12. Correction of Erroneous Vectors Effect of target vector error correction Filtered vector map Corrected vector map

  13. Further Error Reduction Use small search radius =31 pixels, 873 valid vectors =17 pixels, 897 valid vectors

  14. Further Error Reduction Use window shift =17 pixels, no window shift =12 pixels, xs=13 pixels, ys=0

  15. Further Error Reduction Use iterated evaluation (w. window shift) W/o iteration, 947 valid vectors Iterated evaluation, 953 valid vectors

  16. Further Error Reduction Process digital image before evaluation W/o iteration, unsharp mask (r=11) Iterated evaluation, unsharp mask (r=11)

  17. Matlabfunction for erroneous vector identification File name: errordetection.m function[valid]=errordetection(U,V,dU,dV) % U - horizontal particle image displacement % V - vertical particle image displacement % dU(1) - minimal horizontal particle image displacement % dU(2) - maximal horizontal particle image displacement % dU(3) - error tolerance of horizontal particle image displacement % dV(1) - minimal vertical particle image displacement % dV(2) - maximal vertical particle image displacement % dV(3) - error tolerance of vertical particle image displacement % Valid - validation index of the particle image displacement % 1 for valid vector, 0 for evaluation error [nxny]=size(U); % determine number of rows & collumns of interrogation grid for i=1:nx % range filtering begin for j=1:ny if U(i,j)>=dU(1) & U(i,j)<=dU(2) & V(i,j)>=dV(1) & V(i,j)<=dV(2) valid1(i,j)=1; else valid1(i,j)=0; end end end % range filtering end

  18. Matlabfunction for erroneous vector identification File name: errordetection.m for i=1:nx % median filter begin for j=1:ny if valid1(i,j)==0 % skip detected errors valid(i,j)=0; continue; end % skip detected errors nr=0; % search for valid vectors in 3x3 neighborhood for p=-1:1 for q=-1:1 if i+p>=1 & i+p<=nx & j+q>=1 & j+q<=ny & valid1(i+p,j+q)==1 nr=nr+1; u(nr)=U(i+p,j+q); v(nr)=V(i+p,j+q); end end end % search for valid vectors in 3x3 neighborhood if nr<3 % skip vector without enough valid neighbors valid(i,j)=0; continue; end % skip vector without enough valid neighbors

  19. Matlabfunction for erroneous vector identification File name: errordetection.m for p=1:nr-1 % determine median vector for q=p+1:nr if u(q)>u(p) um=u(p); u(p)=u(q); u(q)=um; end if v(q)>v(p) vm=v(p); v(p)=v(q); v(q)=vm; end end end nm=int16(nr/2); um=u(nm); vm=v(nm); % determine median vector if abs(U(i,j)-um)<=dU(3) & abs(V(i,j)-vm)<=dV(3) % detect wrong vector valid(i,j)=1; else valid(i,j)=0; end % detect wrong vector end end % median filter end

  20. Matlabfunction for local vector interpolation File name: interpolation.m function[U V valid2]=interpolation(U,V, valid1) [nxny]=size(U); for i=1:nx for j=1:ny if valid1(i,j)==1 valid2(i,j)=1; continue; end nr=0; um=0; vm=0; for p=-1:1 for q=-1:1 if i+p>=1 & i+p<=nx & j+q>=1 & j+q<=ny & valid1(i+p,j+q)==1 nr=nr+1; um=um+U(i+p,j+q); vm=vm+V(i+p,j+q); end end end if nr>0 valid2(i,j)=1; U(i,j)=um/nr; V(i,j)=vm/nr; else valid2(i,j)=0; end end end % U - horizontal particle image displacement % V - vertical particle image displacement % valid - validation index of the particle image displacement

  21. Example of Matlab program for evaluating double exposed recording D001_1.bmp Main program clear; A=imread('D001_1.bmp'); % input image file G=img2xy(A); % convert image to gray value distribution Mg=32; % interrogation grid width Ng=32; % interrogation grid height M1=64; % initial interrogation window width N1=64; % initial interrogation window height M2=48; % final interrogation window width N2=48; % final interrogation window height sr1=15; % initial search radius sr2=6; % final search radius NN=6; % iteration number dU=[0 20 3]; % parameters for error detection dV=[-5 5 3]; % parameters for error detection [nxny]=size(G); % determine size of the image row=ny/Mg-1; % number of grid rows col=nx/Mg-1; % number of grid columns for nn=1:NN % iteration begin M=(nn-1)*(M2-M1)/(NN-1)+M1; % determine window width N=(nn-1)*(N2-N1)/(NN-1)+N1; % determine window height sr=(nn-1)*(sr2-sr1)/(NN-1)+sr1; % determine search radius if nn>1 [U V valid]=interpolation(U,V, valid); % interpolation for window shift [U V valid]=interpolation(U,V, valid); % interpolation for window shift end

  22. Example of Matlab program for evaluating double exposed recording D001_1.bmp for i=1:col for j=1:row if nn==1 % determine window shift wsx=sr; wsy=0; else if valid(i,j)>0 wsx=U(i,j); wsy=V(i,j); if sr>int16(wsx) % adjust search radius for double exposed recording sr=int16(wsx); end end end x=i*Mg; % determine horizontal coordinate of interrogation point y=j*Ng; % determine vertical coordinate of interrogation point g1=sample3(G,M,N,x-wsx/2,y-wsy/2); % evaluation sample with backward wondow shift g2=sample3(G,M,N,x+wsx/2,y+wsy/2); % evaluation sample with forward wondow shift [C m n]=correlation(g1,g2); % claculatingcorraltion function [cm vxvy]=peaksearch(C,m,n,sr,0,0); % determine particle image displacement U(i,j)=vx+wsx; % adjust particle image displacement with window shift V(i,j)=vy+wsy; % adjust particle image displacement with window shift X(i,j)=x; % record evaluation coordinate Y(i,j)=y; % record evaluation coordinate end end valid=errordetection(U,V,dU,dV); % detect evaluation errors end % iteration end

  23. Example of Matlab program for evaluating double exposed recording D001_1.bmp for i=1:col % remove evaluation errors for j=1:row if valid(i,j)==0 U(i,j)=0; V(i,j)=0; end end end quiver(X,Y,U,V); Unsharp mask filter may be used for further improvement

  24. Example of Matlab program for evaluating single exposed recording pair Main program clear; A1=imread('A001_1.bmp'); % input image file A2=imread('A001_2.bmp'); % input image file G1=img2xy(A1); % convert image to gray value distribution G2=img2xy(A2); % convert image to gray value distribution Mg=16; % interrogation grid width Ng=16; % interrogation grid height M=32; % interrogation window width N=32; % interrogation window height sr1=12; % initial search radius sr2=6; % final search radius NN=6; % iteration number dU=[-12 12 3]; % parameters for error detection dV=[-12 12 3]; % parameters for error detection [nxny]=size(G1); % determine size of the image row=ny/Mg-1; % number of grid rows col=nx/Mg-1; % number of grid columns for nn=1:NN % iteration begin sr=int16((nn-1)*(sr2-sr1)/(NN-1)+sr1); % determine search radius if nn>1 [U V valid]=interpolation(U,V, valid); % interpolation for window shift [U V valid]=interpolation(U,V, valid); % interpolation for window shift end

  25. Example of Matlab program for evaluating single exposed recording pair for i=1:col % remove evaluation errors for j=1:row if valid(i,j)==0 U(i,j)=0; V(i,j)=0; end end end quiver(X,Y,U,V); % plot vector map for i=1:col for j=1:row if nn==1 % determine window shift wsx=0; wsy=0; else if valid(i,j)>0 wsx=U(i,j); wsy=V(i,j); end end x=i*Mg; % determine horizontal coordinate of interrogation point y=j*Ng; % determine vertical coordinate of interrogation point g1=sample3(G1,M,N,x-wsx/2,y-wsy/2); % evaluation sample with backward window shift g2=sample3(G2,M,N,x+wsx/2,y+wsy/2); % evaluation sample with forward window shift [C m n]=correlation(g1,g2); % calculating correlation function [cm vxvy]=peaksearch(C,m,n,sr,0,0); % determine particle image displacement U(i,j)=vx+wsx; % adjust particle image displacement with window shift V(i,j)=vy+wsy; % adjust particle image displacement with window shift X(i,j)=x; % record evaluation coordinate Y(i,j)=y; % record evaluation coordinate end end valid=errordetection(U,V,dU,dV); % detect evaluation errors end % iteration end

  26. CDIC may be used for further improvement

More Related