1 / 29

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

jayme-bowen
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 35. Particle image identification & tracking

  3. Particle Image Identification Purposes - To determined image specifics for particle tracking - To analyze particle size and distribution in flows - To separated phases according to image size - To mask unexpected objects in the flow field - To mask flow boundaries - Others

  4. Particle Image Identification Step 1: Preprocess particle images - Increase contrast of the PIV recording - Increase brightness of dark images - Binarize particle images

  5. Particle Image Identification Step 2: Identify particle images (method in EDPIV) - Number every image pixel and give a large number to background pixels - Reconstruct number field with minimum in 3×3 neighborhood of image pixels - Iterate until no changes can be made

  6. F H  Particle Image Specifics - Particle image position (xs,ys) determined at center of mass - Particle size in pixels (F) - Average brightness of all pixels belong to one image (H) - Particle shape coefficient, e.g. roundness =F/(R2max)

  7. Particle Image Specifics - Insect image identification example

  8. 1. Original 2. Binary 3. Big particles 4. Expanded 5. Inverted Create Phase Mask

  9. Original Mask Effect Pasted Mask Effect Painting Tools Paste – help for generating masks

  10. Original Line cut Effect Effect Painting Tools Line - help for identifying big particles

  11. Original Fill boundary with 0 Fill flow field with 250 Painting Tools Fill – Used to create a boundary mask

  12. - Information from particle image identification Recording pair: 1st frame 2nd frame Particle image number: l1=1,2,···, L1 l2=1,2,···, L2 Size in pixels of particle images F1(l1) F2(l2) Average brightness H1(l1) H2(l2) Shape coefficient 1(l1) 2(l2) Position of particle image x1 (l1),y1 (l1) x2 (l2),y2 (l2) - Tracking function Tracking of Big Particle images Tow-frame tracking of big particles - Weighting coefficients: F +H +=1

  13. - Pairing criterion: - Deformation limits: - Particle image displacement: Tracking of Big Particle images Tow-frame tracking of big particles

  14. 1st frame 2nd frame Tracking results Tracking of Big Particle images Example

  15. Tracking of Insect Motion Example: Tracking fire ant in successive image frames Fire ant trace Fire ant speed time history

  16. B One pixel for one particle C Maxima search Erosion B B C C Combine Position of LID particle images

  17. Evaluation with large window Evaluation at identified particles Evaluation of LID recordings • Individual particle image pattern tracking LID recordings LID recordings with small interrogation window

  18. Simulated PIV recording pair of uniform flow Particle image diameter: 24 pixels Particle image displacement: Sx=2.3, Sy=1.5 pixels Particle tracking results RMS error=0.25 pixels Pattern tracking results 4x4-pixel pattern RMS error=0.06 pixels Tracking of small particle images - Nearest displacement criterion (distance between particles >> displacement) - Pairing with help of neighbor particle images (e.g. Okamoto et al. 1995) - Multi-frame tracking (e.g. Hassan & Canaan 1991 ) - Displacement determined according to particle image center positions - Individual particle image pattern tracking recommended for LID PIV

  19. References • GuiL, Merzkirch W, Shu JZ (1997) Evaluation of low image density PIV recordings with the MQD method and application to the flow in a liquid bridge. Journal of Flow Visualization and Image Processing, vol. 4: 333-343  • Gui L and Seiner JM (2009) Application of an Image Tracking Algorithm in Fire Ant Motion Experiment. Algorithms 2, no. 2:735-749

  20. Fast computation of unsharp mask - Compute Gsm(x,y) close to the edges of the image forx  r+1 or x> nx-r or y< r+1 or y>ny-r A

  21. Fast computation of unsharp mask - Compute Gsm(x,y) away from the edges of the image

  22. Fast computation of unsharp mask function [F]=unsharpmask(G,fr) % G - gray value distribution of the image [nxny]=size(G); % fr- radius of the filter G=double(G); for y=1:ny for x=1:nx nr=0; % used to count pixels in effective area A Gm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny% limit calculation in the image Gm(x,y)=Gm(x,y)+double(G(x+i,y+j)); nr=nr+1; end end end Gm(x,y)=Gm(x,y)/nr; % average gray value end end F=double(G)-double(Gm); % remove unsharp mask • y A • ny • x • nx

  23. Fast computation of unsharp mask function [F]=unsharpmask2(G,fr) % G - gray value distribution of the image [nxny]=size(G); % fr- radius of the filter G=double(G); for y=1:ny for x=1:fr+1 nr=0; Gsm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny Gsm(x,y)=Gsm(x,y)+G(x+i,y+j); nr=nr+1; end end end Gsm(x,y)=Gsm(x,y)/nr; end end • r+1

  24. Fast computation of unsharp mask function [F]=unsharpmask2(G,fr) % G - gray value distribution of the image [nxny]=size(G); % fr- radius of the filter G=double(G); for y=1:ny for x=1:fr+1 nr=0; Gsm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny Gsm(x,y)=Gsm(x,y)+G(x+i,y+j); nr=nr+1; end end end Gsm(x,y)=Gsm(x,y)/nr; end End for y=1:ny for x=nx-fr:nx nr=0; Gm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny Gm(x,y)=Gm(x,y)+G(x+i,y+j); nr=nr+1; end end end Gm(x,y)=Gm(x,y)/nr; end end • nx-r • r+1

  25. Fast computation of unsharp mask for y=1:fr for x=fr+2:nx-fr-1 nr=0; Gm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny Gm(x,y)=Gm(x,y)+G(x+i,y+j); nr=nr+1; end end end Gm(x,y)=Gm(x,y)/nr; end end • r • nx-r-1 • r+2

  26. Fast computation of unsharp mask for y=1:fr for x=fr+2:nx-fr-1 nr=0; Gm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny Gm(x,y)=Gm(x,y)+G(x+i,y+j); nr=nr+1; end end end Gm(x,y)=Gm(x,y)/nr; end end for y=ny-fr:ny for x=fr+2:nx-fr-1 nr=0; Gm(x,y)=0; for i=-fr:fr for j=-fr:fr if x+i>0 & x+i<=nx & y+j>0 & y+j<=ny Gm(x,y)=Gm(x,y)+G(x+i,y+j); nr=nr+1; end end end Gm(x,y)=Gm(x,y)/nr; end end • r • nx-r-1 • r+2

  27. Fast computation of unsharp mask nr=(2*fr+1)*(2*fr+1); for y=fr+1:ny-fr-1 for x=fr+2:nx-fr-1 D=0; x1=x-fr-1; x2=x+fr; for j=-fr:fr D=D-G(x1,y+j)+G(x2,y+j); end Gm(x,y)=Gm(x-1,y)+D/nr; end End F=G-Gm; % function output • ny-r-1 • r+1 • nx-r-1 • r+2

  28. Fast computation of unsharp mask Test program clear; A=imread('D001_1.bmp'); % input image file G=img2xy(A); % convert image to gray value distribution fr=5; F=unsharpmask2(G,fr); D=xy2img(F); imshow(D);

More Related