OpenPIV / openpiv-python

OpenPIV is an open source Particle Image Velocimetry analysis software written in Python and Cython
http://www.openpiv.net
GNU General Public License v3.0
229 stars 141 forks source link

Tomographic PIV #287

Open ErichZimmer opened 1 year ago

ErichZimmer commented 1 year ago

Is your feature request related to a problem? Please describe. As we incorporate more advanced PIV algorithms, I would like to expand OpenPIV-Python into the volumetric PIV realm through tomographic reconstruction algorithms.

Describe the solution you'd like Tomographic reconstruction algorithms have been around for a decade, plus or minus some. This means that there are multiple reconstruction algorithms such as direct methods (Multiplicative Line of Sight, Minimum Line of Sight) and algebraic methods (Algebraic Reconstruction Technique, Multiplicative Algebraic Reconstruction Technique). However, the two algorithms I will be focusing on are Multiplicative Line of Sight (MLOS) and Multiplicative Algebraic Reconstruction Technique (MART). Before implementing reconstruction techniques, first we need a way to calibrate the camera system (e.g., direct linear transformation or polynomials). The most common calibration models are the pinhole camera model and 3rd order polynomials (Kähler et. al., 2016). For this purpose, the pinhole camera model would be preferable due to its simplicity in calibrating a volume. After performing the calibration, an initial guess for particle positions is made by the MLOS algorithm. After the initial guess, we can iteratively refine the particle locations using MART with the weighting matrix being calculated on the fly for considerable memory savings (Atkinson et. al., 2008). In the end, a tomographic reconstruction algorithm using a MLOS initial guess and iterative MART seems the most appropriate way to proceed due to its performance and lower memory requirements (necessary for consumer-grade laptops and desktops).

Here is an example theoretical work flow.

Additional context As mentioned above, a good camera calibration is required in order for volumetric reconstruction to provide meaningful results. For this purpose, the pinhole camera model is considered although polynomials seem to perform adequately as well (Paolillo et. al., 2021). To further refine calibration errors, volume self-calibration and its derivatives should be used (Wieneke, 2008; Wieneke, 2018). In the end, calibrations errors should remain below 0.4 pixels and ideally around 0.1 pixels (Elsinga et. al., 2006).

References Atkinson, Callum & Dillon-Gibbons, Craig & Herpin, Sophie & Soria, Julio. (2008). Reconstruction techniques for tomographic piv (tomo-piv) of a turbulent boundary layer. 2008-1.

Discetti, Stefano & Natale, Andrea & Astarita, Tommaso. (2013). Spatial filtering improved tomographic PIV. Experiments in Fluids. 54. 1-13. 10.1007/s00348-013-1505-7.

Elsinga, G. E., Scarano, F., Wieneke, B., & van Oudheusden, B. W. (2006). Tomographic particle image velocimetry. Experiments in Fluids, 41(6), 933–947. 10.1007/s00348-006-0212-z

Kähler, Christian & Astarita, Tommaso & Vlachos, Pavlos & Sakakibara, Jun & Hain, Rainer & Discetti, Stefano & Foy, Roderick & Cierpka, Christian. (2016). Main results of the 4th International PIV Challenge. Experiments in Fluids. 57. 10.1007/s00348-016-2173-1.

Paolillo, G., & Astarita, T. (2021). On the PIV/PTV uncertainty related to calibration of camera systems with refractive surfaces. Measurement Science and Technology, 32(9), 094006. 10.1088/1361-6501/abf3fc

Wieneke, B. (2008). Volume self-calibration for 3D particle image velocimetry. Experiments in Fluids, 45(4), 549–556. 10.1007/s00348-008-0521-5

Wieneke, B. (2018). Improvements for volume self-calibration. Measurement Science and Technology. 29. 10.1088/1361-6501/aacd45.

Raffel, M. & Willert, Christian & Wereley, Steve & Kompenhans, Juergen. (2007). Particle Image Velocimetry: A Practical Guide. 10.1007/978-3-540-72308-0.

alexlib commented 1 year ago

on the way we could think about stereoscopic PIV implementation that uses the same calibration model

alexlib commented 1 year ago

Let me also mention here @Nitzandah, who might be able to help.

ErichZimmer commented 1 year ago

On a side note for direct volume reconstruction methods (e.g., MLOS, MinLOS), I decided to focus on the reconstruction method discussed by Bilsky et. al.'s paper over the Maximum Entropy (MENT) reconstruction technique. It promises similar computation performance to MLOS (being somewhat slower), but handles ghost particles much better. With less ghost particles, there would be less weighting values to be calculated under the MART optimization along with a higher quality reconstruction. However, I will still keep the MLOS reconstruction implementation in the tomographic PIV module due to some concerns over the MENT reconstruction algorithm's quality of reconstruction when there are greater than 6 cameras in the camera system.

References and Further Reading Bilsky, Artur & Lozhkin, V & Markovich, Dmitriy & Tokarev, Mikhail. (2013). A maximum entropy reconstruction technique for tomographic particle image velocimetry. Measurement Science and Technology. 24. 045301. 10.1088/0957-0233/24/4/045301.

Klinner, Joachim. (2017). Development and assessment of volume resolving velocimetry for turbomachinery test facilities.

Minerbo, G. (1979). Ment: A maximum entropy algorithm for reconstructing a source from projection data. Computer Graphics and Image Processing. 10.1016/0146-664X(79)90034-0

ErichZimmer commented 2 weeks ago

Hi all, here is a progress update.

I decided to change the algorithms utilized in the Tomo-PIV module. Instead of using a MART algorithm, I will now be implementing the SMART algorithm due to its lower memory requirements under the assumption of sparse volumetric data. SMART requires a non-uniform predictor to operate efficiently, which would be generated by either the MLOS or MENT reconstruction techniques. With MENT, a lower amount of SMART iterations would likely be needed since MENT provides a more accurate and precise reconstruction of the underdetermined inverse problem compared to MLOS. Additionally, 15 iterations of the SMART algorithm is roughly equivalent in computational time to 5 MART iterations while acquiring a reconstruction quality similar to MART. Additionally, optical transfer functions can be very efficiently applied to the SMART algorithm with very little computational costs while obtaining substantial reconstruction improvements. Finally, for large quantities of data, the MENT algorithm may already suffice, especially when it requires around 25 seconds to reconstruct a volume and perhaps 80 seconds with some additional SMART iterations to redistribute the energy from ghost particles to real particles.

Another reconstruction technique I have been thinking about is using and enhanced iterative particle reconstruction (IPR) (Jahn et. al., 2021) to determine particle intensity and locations and interpolate blobs into a discretized volume, similar to blob enhanced tomographic PIV (Castrillo et. al., 2016). This method of reconstructing particles would obtain very low ghost particles even at particle densities higher than 0.1 particles per pixel and should allow for extended volumes in the case of large-scale tomographic PIV (MART and SMART may develop artifacts with large volume depths due to an undersampling of voxels the further the voxel is away from the camera system). In theory, the enhanced IPR algorithm with superimposed gaussian-approximated blobs would allow for high quality particle reconstructions and cross-correlation results. Of course, this is bordering the particle tracking velocimetry territory, but the blob enhanced PIV algorithm is already quite similar (e.g., extract particle locations and super-impose a gaussian-approximated particle in the discretized volume). Note, this is all theoretical; it may simply be a big bust at the end.

Further Reading: Castrillo, G., Cafiero, G., Discetti, S., & Astarita, T. (2016). Blob-enhanced reconstruction technique. Measurement Science and Technology, 27.

Jahn, T., Schanz, D., & Schröder, A. (2021). Advanced iterative particle reconstruction for Lagrangian particle tracking. Experiments in Fluids, 62.