1 / 12

Instructor: Lichuan Gui lichuan-gui@uiowa lcgui

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 lichuan-gui@uiowa.edu http:// lcgui.net. Lecture 27. Bias Error of Correlation Interrogation.

mabli
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. 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 27. Bias Error of Correlation Interrogation

  3. Bias Error of Correlation Interrogation Performance of FFT-based correlation Reduced effective correlation region with increasing magnitude of (m, n) A : Effective correlation region B,C,D: Periodically Padded regions - The reliability & accuracy decrease with increasing particle image displacement (m*,n*) - The evaluated particle image displacement has smaller magnitude than that of the true value

  4. Bias Error of Correlation Interrogation Individuale reading of X: Mean value 0 RMS fluctuation (random error) RMS error Bias & random errors for measuring variable X N times

  5. Bias Error of Correlation Interrogation Probability density function (PDF)    Bias & random errors for measuring variable X N times PDF for measuring displacement 0.5 pixels

  6. Bias Error of Correlation Interrogation f=32x32 Correlation interrogation with Gaussian window mask Gui et al 2000, A digital mask technique for reducing the bias error of the correlation-based PIV interrogation algorithm. Exp. Fluids 29, 30-35

  7. Bias Error of Correlation Interrogation Correlation interrogation with Gaussian window mask Matlab function for Gaussian window mask File name: wmask.m function [gm]=wmask(go) % INPUT: go - original evaluation sample % OUTPUT: gm - masked evaluation sample [M N]=size(go); for i=1:M for j=1:N gm(i,j)=exp(-4*((i-M/2)*(i-M/2)/(M*M/4)+(j-N/2)*(j-N/2)/(N*N/4)))*go(i,j); end end Test image pair: http://lcgui.net/ui-lecture/lecture27/lecture27-image01.bmp http://lcgui.net/ui-lecture/lecture27/lecture27-image02.bmp - simulated single-exposed PIV recording pair of 10241024 pixels - given uniform particle image displacement: x=3.5, y=5.5 pixels

  8. Class project: example of Matlab functions for PIV recording evaluation Test function “correlation.m” with simulated PIV recordings Test main program: clear; A1=imread('01.bmp'); % input image file A2=imread('02.bmp'); % input image file g1=img2xy(A1); % convert image to gray value distribution g2=img2xy(A2); % convert image to gray value distribution [C m n]=correlation(g1,g2); D=xy2img(C); % convert correlation function to image imshow(D); % display correlation function [cm vxvy]=peaksearch(C,m,n,12,0,0) % particle image displacement Vy=-5.3235 Vx=-3.4449 Correlation function 02.bmp 01.bmp

  9. Class project: corrected Matlab functions File name: correlation.m % compute correlation function - begin gfft1=fft2(gg2); gfft2=conj(fft2(gg1)); C=real(ifft2(gfft1.*gfft2)); % compute correlation function - end % determine coordinates in correlation plane - begin for i=1:M2 for j=1:N2 m(i,j)=i-M2/2-1; n(i,j)=j-N2/2-1; end end % determine coordinates in correlation plane - end % periodical reconstruction of correlation function - begin for i=1:M2/2 C1(i,1:N2)=C(i+M2/2,1:N2); end for i=M2/2+1:M2 C1(i,1:N2)=C(i-M2/2,1:N2); end for j=1:N2/2 c(1:M2,j)=C1(1:M2,j+N2/2); end for j=N2/2+1:N2 c(1:M2,j)=C1(1:M2,j-N2/2); end % periodical reconstruction of correlation function - end function[c m n]=correlation(g1,g2) [M N]=size(g1); % determine size of evaluation sample % determine window size for FFT - begin for k=3:12 if 2^k>=M & 2^k>=N break; end end M2=2^k; N2=2^k; % determine window size for FFT - end % average gray value padding - begin gm1=mean(mean(g1)); gm2=mean(mean(g2)); for i=1:M2 for j=1:N2 if i<=M & j<=N gg1(i,j)=g1(i,j); gg2(i,j)=g2(i,j); else gg1(i,j)=gm1; gg2(i,j)=gm2; end end end % average gray value padding - end

  10. Class project: corrected Matlab functions File name: xy2img.m function [A]=xy2img(G) % A - image % G - gray value distribution [nxny]=size(G); Gmax=max(max(G)); Gmin=min(min(G)); for x=1:nx for y=1:ny A(ny-y+1,x)=uint8(double(G(x,y)-Gmin)/double(Gmax-Gmin)*245+5); end end % Uint8 - convert to 8-bit unsigned integer % Int8 - convert to 8-bit signed integer

  11. Bias Error of Correlation Interrogation Main program to test Gaussian window mask A1=imread('lecture27-image01.bmp'); % input image file A2=imread('lecture27-image02.bmp'); % input image file G1=img2xy(A1); % convert image to gray value distribution G2=img2xy(A2); % convert image to gray value distribution Mg=64; % interrogation grid width Ng=64; % interrogation grid height M=64; % interrogation window width N=64; % interrogation window height [nxny]=size(G1); row=ny/Mg-1; % grid row number col=nx/Mg-1; % grid column number sr=10; % search radius for i=1:col for j=1:row x=i*Mg; y=j*Mg; g1=sample(G1,M,N,x,y); % evaluation samples g2=sample(G2,M,N,x,y); g1=wmask(g1);% apply Gaussian window mask [C m n]=correlation(g1,g2); [cm vxvy]=peaksearch(C,m,n,sr,0,0); % particle image displacement U(i,j)=vx; V(i,j)=vy; X(i,j)=x; Y(i,j)=y; end end quiver(X,Y,U,V); % plot vector map mean(mean(U))-3.5 % bias of x-component mean(mean(V))-5.5 % bias of y-component Unmasked: Masked:

More Related