A Hybrid PIV/Optical Flow Method for Incompressible Turbulent Flows
Abstract
:1. Introduction
2. Software Workflow and Main Features
2.1. Workflow and Hybridization Options
- Variant 1—“dense hybrid PIV-OpF”—employs dense optical flow as the last PIV step, either with dense Lucas–Kanade or with dense Liu–Shen combined with Lucas–Kanade. This option will provide densified velocity vector maps with 1 velocity vector per image pixel.
- Variant 2—“sub-pixel OpF”—employs optical flow as a substitution for the cross-correlation peak reconstruction and sub-pixel interpolation to find the coordinates of the peak. This is only valid for local optical flow methods like Lucas–Kanade. It directly extracts the sub-pixel movement from the original image by considering the pixels in the vicinity of the center of each IA, thus constituting an alternative to the PIV sub-pixel.
- Variant 3—“sparse hybrid PIV-OpF”—is similar to variant 1 but keeps only the velocity vectors of the center of each IA. We refer to this as sparse optical flow (1 velocity vector per each IA), thus keeping the original PIV vector resolution but allowing sub-pixel resolution. This supports both local and global optical flow methods, where a half-pixel warp is performed to obtain velocity pixels aligned with the center of each IA.
2.2. PIV Key Steps—Cross-Correlation and Sub-Pixel Interpolation
2.3. OpF Methods
2.4. Hybridization of OpF and PIV after Correlation Steps
2.5. Vector Inheritance and Warping
2.5.1. Vector Inheritance
2.5.2. IA Image Warping
2.6. Vector Validation and Substitution
3. Verification and Validation of the Hybrid PIV-OpF Software
3.1. Strategy
3.2. Synthetic Data
3.2.1. Comparison of Correlation-Based PIV Implemented in QuickLabPIV-ng with State-of-the-Art PIV
3.2.2. Accuracy of QuickLabPIV-ng by Flow Type
3.2.3. Overall (All Flows) Accuracy Span
3.2.4. Spatial Error Distribution
3.3. Laboratory Databases
3.3.1. Description of Databases and Validation Criteria
- Cylinder database: The images were obtained from a flow around a wall-mounted smooth circular cylinder. The flow is characterized by the Reynolds number based on the cylinder diameter, equal to 1750, where d is the cylinder diameter, is the approaching velocity, and is the kinematic viscosity. The measured plane corresponds to the horizontal plane (longitudinal-spanwise direction) located at of the flow depth. The database is composed of 4500 poor-quality PIV image pairs having a resolution. The particle spot sizes are not within the optimal PIV range, being on the smaller side, and the particle concentration is also low. There is a background pattern in the PIV images, and there is a cable harness that oscillates during the PIV recording (Figure 14a). This is an image quality that should also prove difficult for OpF, since OpF is known to also have difficulties with average particle diameters smaller than px. Still, we wish to compare the performance of hybrid PIV with this image database, for which we have two validations: obtain the expected peak in the energy spectrum in the cylinder’s wake and find the expected properties of undisturbed flow.
- Boundary layer database: A database composed of 4500 fair-quality PIV image pairs with a resolution, acquired from a turbulent open-channel flow over a glass bead fixed bed. The acquired data correspond to a vertical plane (longitudinal bed-normal direction) located at the channel center line. The images have a static background pattern, as shown in Figure 14b. The seeding quality is on the average side. This database is to be validated in accordance with the known features of boundary layer flows.
- Plunging flow database: The images were obtained from a complex flow in a dam break flume setup. The measured plane corresponds to a vertical plane (longitudinal bed-normal direction) located in the breach region at cm from the channel side wall. The database is composed of 1817 PIV image pairs, with a resolution of , adequate particle spot sizes, and good image quality with a higher particle concentration than the other two databases. The images have no special background pattern (Figure 14c); however, there are two regions that tend to form large air bubbles, which can affect the measurements.
3.3.2. Cylinder Database
3.3.3. Boundary Layer Database
3.3.4. Plunging Flow Database
4. Methods and Materials
displayFlowField=false; closeFlowField=true;
flows={′uniform′ ′parabolic′ ′stagnation′ ...; ′rankine_vortex′ ′rk_uniform′}; bitDepths=[8]; deltaXFactor=[0.05 0.10 0.25]; particleRadius=[0.5 1.0 1.5 3.0]; Ni=[1 6 12 16]; noiseLevel=[0 5 15]; outOfPlaneStdDeviation=[0.025 0.050 0.100]; numberOfRuns=10;
generatePIVImagesWithAllParametersCombinations;
5. Conclusions and Recommendations for Further Analysis
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
OpF | Optical flow |
PSD | Power spectral density |
GUI | Graphical User Interface |
References
- Scarano, F. Tomographic PIV: Principles and practice. Meas. Sci. Technol. 2012, 24, 012001. [Google Scholar] [CrossRef]
- Aleixo, R.; Soares-Frazão, S.; Zech, Y. Velocity-field measurements in a dam-break flow using a PTV Voronoï imaging technique. Exp. Fluids 2011, 50, 1633–1649. [Google Scholar] [CrossRef]
- Capart, H.; Young, D.; Zech, Y. Voronoï imaging methods for the measurement of granular flows. Exp. Fluids 2002, 32, 121–135. [Google Scholar] [CrossRef]
- Horn, B.K.; Schunck, B.G. Determining optical flow. Artif. Intell. 1981, 17, 185–203. [Google Scholar] [CrossRef]
- Lucas, B.D.; Kanade, T. An Iterative Image Registration Technique with an Application to Stereo Vision. In Proceedings of the 7th International Joint Conference on Artificial Intelligence, IJCAI’81, Vancouver, BC, Canada, 24–28 August 1981; Volume 2, pp. 674–679. [Google Scholar]
- Aubert, G.; Deriche, R.; Kornprobst, P. Computing Optical Flow via Variational Techniques. SIAM J. Appl. Math. 1999, 60, 156–182. [Google Scholar] [CrossRef]
- Farnebäck, G. Two-Frame Motion Estimation Based on Polynomial Expansion. In Image Analysis; Bigun, J., Gustavsson, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2003; pp. 363–370. [Google Scholar] [CrossRef]
- Tomasi, C.; Kanade, T. Detection and Tracking of Point Features; Technical Report CMU-CS-91–132, Carnnegie Mellon University. 1991. Available online: https://www.ri.cmu.edu/pub_files/pub2/tomasi_c_1991_1/tomasi_c_1991_1.pdf (accessed on 25 March 2024).
- Anandan, P. A computational framework and an algorithm for the measurement of visual motion. Int. J. Comput. Vis. 1989, 2, 283–310. [Google Scholar] [CrossRef]
- Wills, J.; Agarwal, S.; Belongie, S. A Feature-based Approach for Dense Segmentation and Estimation of Large Disparity Motion. Int. J. Comput. Vis. 2006, 68, 125–143. [Google Scholar] [CrossRef]
- Ohta, Y.; Kanade, T. Stereo by Intra- and Inter-Scanline Search Using Dynamic Programming. IEEE Trans. Pattern Anal. Mach. Intell. 1985, PAMI-7, 139–154. [Google Scholar] [CrossRef]
- Adam, P.; Burg, B.; Zavidovique, B. Dynamic programming for region based pattern recognition. In Proceedings of the ICASSP ’86. IEEE International Conference on Acoustics, Speech, and Signal Processing, Tokyo, Japan, 7–11 April 1986; Volume 11, pp. 2075–2078. [Google Scholar] [CrossRef]
- Heeger, D.J. Optical flow using spatiotemporal filters. Int. J. Comput. Vis. 1988, 1, 279–302. [Google Scholar] [CrossRef]
- Fleet, D.J.; Jepson, A.D. Computation of component image velocity from local phase information. Int. J. Comput. Vis. 1990, 5, 77–104. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Fischer, P.; Ilg, E.; Häusser, P.; Hazirbas, C.; Golkov, V.; Smagt, P.v.d.; Cremers, D.; Brox, T. FlowNet: Learning Optical Flow with Convolutional Networks. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 2758–2766. [Google Scholar] [CrossRef]
- Ren, Z.; Yan, J.; Ni, B.; Liu, B.; Yang, X.; Zha, H. Unsupervised Deep Learning for Optical Flow Estimation. In Proceedings of the AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017; Volume 31. [Google Scholar]
- Quénot, G.; Pakleza, J.; Kowalewski, T.A. Particle image velocimetry with optical flow. Exp. Fluids 1998, 25, 177–189. [Google Scholar] [CrossRef]
- Ruhnau, P.; Kohlberger, T.; Schnörr, C.; Nobach, H. Variational optical flow estimation for particle image velocimetry. Exp. Fluids 2005, 38, 21–32. [Google Scholar] [CrossRef]
- Corpetti, T.; Heitz, D.; Arroyo, G.; Mémin, E.; Santa-Cruz, A. Fluid experimental flow estimation based on an optical-flow scheme. Exp. Fluids 2006, 40, 80–97. [Google Scholar] [CrossRef]
- Ruhnau, P.; Schnörr, C. Optical Stokes flow estimation: An imaging-based control approach. Exp. Fluids 2007, 42, 61–78. [Google Scholar] [CrossRef]
- Heitz, D.; Héas, P.; Mémin, E.; Carlier, J. Dynamic consistent correlation-variational approach for robust optical flow estimation. Exp. Fluids 2008, 45, 595–608. [Google Scholar] [CrossRef]
- Heitz, D.; Mémin, E.; Schnörr, C. Variational fluid flow measurements from image sequences: Synopsis and perspectives. Exp. Fluids 2010, 48, 369–393. [Google Scholar] [CrossRef]
- Le Besnerais, G.; Champagnat, F. Dense optical flow by iterative local window registration. In Proceedings of the IEEE International Conference on Image Processing 2005, Genoa, Italy, 11–14 September 2005; Volume 1, p. I-137. [Google Scholar] [CrossRef]
- Champagnat, F.; Plyer, A.; Le Besnerais, G.; Leclaire, B.; Davoust, S.; Le Sant, Y. Fast and accurate PIV computation using highly parallel iterative correlation maximization. Exp. Fluids 2011, 50, 1169–1182. [Google Scholar] [CrossRef]
- Liu, T.; Shen, L. Fluid flow and optical flow. J. Fluid Mech. 2008, 614, 253–291. [Google Scholar] [CrossRef]
- Schmidt, B.E.; Sutton, J.A. High-resolution velocimetry from tracer particle fields using a wavelet-based optical flow method. Exp. Fluids 2019, 60, 37. [Google Scholar] [CrossRef]
- Page, W.E.; Schmidt, B.E.; Sutton, J.A. Experimental Assessment of Wavelet-based Optical Flow Velocimetry (wOFV) as Applied to Tracer Particle Images from Free Shear Flows. In AIAA Scitech 2020 Forum; American Institute of Aeronautics and Astronautics, Inc.: Reston, VA, USA, 2020. [Google Scholar] [CrossRef]
- Yang, Z.; Johnson, M. Hybrid particle image velocimetry with the combination of cross-correlation and optical flow method. J. Vis. 2017, 20, 625–638. [Google Scholar] [CrossRef]
- Głomb, G.; Świrniak, G. A hybrid method for velocity field of fluid flow estimation based on optical flow. In Optical Measurement Systems for Industrial Inspection XI; Lehmann, P., Osten, W., Júnior, A.A.G., Eds.; International Society for Optics and Photonics, SPIE: Bellingham, WA, USA, 2019; Volume 11056, pp. 969–980. [Google Scholar] [CrossRef]
- Seong, J.H.; Song, M.S.; Nunez, D.; Manera, A.; Kim, E.S. Velocity refinement of PIV using global optical flow. Exp. Fluids 2019, 60, 174. [Google Scholar] [CrossRef]
- Brox, T.; Bruhn, A.; Papenberg, N.; Weickert, J. High Accuracy Optical Flow Estimation Based on a Theory for Warping. In Proceedings of the Computer Vision—ECCV 2004, Prague, Czech Republic, 11–14 May 2004; Pajdla, T., Matas, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2004; pp. 25–36. [Google Scholar]
- Liu, T.; Salazar, D.M.; Fagehi, H.; Ghazwani, H.; Montefort, J.; Merati, P. Hybrid Optical-Flow-Cross-Correlation Method for Particle Image Velocimetry. J. Fluids Eng. 2020, 142, 054501. [Google Scholar] [CrossRef]
- Liu, T.; Salazar, D. OpenOpticalFlow_PIV: An Open Source Program Integrating Optical Flow Method with Cross-Correlation Method for Particle Image Velocimetry. J. Open Res. Softw. 2021, 9, 3. [Google Scholar] [CrossRef]
- Ouyang, Z.; Yang, H.; Huang, Y.; Zhang, Q.; Yin, Z. A circulant-matrix-based hybrid optical flow method for PIV measurement with large displacement. Exp. Fluids 2021, 62, 233. [Google Scholar] [CrossRef]
- Mendes, L.P.N.; Ricardo, A.M.C.; Bernardino, A.J.M.; Ferreira, R.M.L. A comparative study of optical flow methods for fluid mechanics. Exp. Fluids 2021, 63, 7. [Google Scholar] [CrossRef]
- Ricardo, A.M.; Koll, K.; Franca, M.J.; Schleiss, A.J.; Ferreira, R.M.L. The terms of turbulent kinetic energy budget within random arrays of emergent cylinders. Water Resour. Res. 2014, 50, 4131–4148. [Google Scholar] [CrossRef]
- Mendes, L.; Bernardino, A.; Ferreira, R.M. piv-image-generator: An image generating software package for planar PIV and Optical Flow benchmarking. SoftwareX 2020, 12, 100537. [Google Scholar] [CrossRef]
- Raffel, M.; Willert, C.; Wereley, S.; Kompenhans, J. Particle Image Velocimetry—A Practical Guide; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar] [CrossRef]
- Guo, H. A Simple Algorithm for Fitting a Gaussian Function. In Streamlining Digital Signal Processing; John Wiley & Sons, Ltd.: Hoboken, NJ, USA, 2012; Chapter 31; pp. 297–305. [Google Scholar] [CrossRef]
- Mendes, L.; Bernardino, A.; Ferreira, R. Synthetic PIV Image Generator with Ground-Truth. 2020. Available online: https://git.qoto.org/CoreRasurae/piv-image-generator (accessed on 25 March 2024).
- Norberg, C. Fluctuating lift on a circular cylinder: Review and new measurements. J. Fluids Struct. 2003, 17, 57–96. [Google Scholar] [CrossRef]
- Tennekes, H.; Lumley, J.L. A First Course in Turbulence; MIT Press: Cambridge, MA, USA, 1972. [Google Scholar]
Method Name | Absolute Error (Mean) | Relative Error (Mean) |
---|---|---|
PIV warping | dBpx | dB |
PIV warping, final sub-pixel Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Method Name | Absolute Error (Mean) | Relative Error (Mean) |
---|---|---|
PIV warping | dBpx | dB |
PIV warping, final sub-pixel Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Method Name | Absolute Error (Mean) | Relative Error (Mean) |
---|---|---|
PIV warping | dBpx | dB |
PIV warping, final sub-pixel Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Method Name | Absolute Error (Mean) | Relative Error (Mean) |
---|---|---|
PIV warping | dBpx | dB |
PIV warping, final sub-pixel Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Method Name | Absolute Error (Mean) | Relative Error (Mean) |
---|---|---|
PIV warping | dBpx | dB |
PIV warping, final sub-pixel Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Lucas–Kanade | dBpx | dB |
Hybrid PIV with Liu–Shen combined with Lucas–Kanade | dBpx | dB |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Mendes, L.P.N.; Ricardo, A.M.C.; Bernardino, A.J.M.; Ferreira, R.M.L. A Hybrid PIV/Optical Flow Method for Incompressible Turbulent Flows. Water 2024, 16, 1021. https://doi.org/10.3390/w16071021
Mendes LPN, Ricardo AMC, Bernardino AJM, Ferreira RML. A Hybrid PIV/Optical Flow Method for Incompressible Turbulent Flows. Water. 2024; 16(7):1021. https://doi.org/10.3390/w16071021
Chicago/Turabian StyleMendes, Luís P. N., Ana M. C. Ricardo, Alexandre J. M. Bernardino, and Rui M. L. Ferreira. 2024. "A Hybrid PIV/Optical Flow Method for Incompressible Turbulent Flows" Water 16, no. 7: 1021. https://doi.org/10.3390/w16071021
APA StyleMendes, L. P. N., Ricardo, A. M. C., Bernardino, A. J. M., & Ferreira, R. M. L. (2024). A Hybrid PIV/Optical Flow Method for Incompressible Turbulent Flows. Water, 16(7), 1021. https://doi.org/10.3390/w16071021