|
|
# Table of Contents
|
|
|
|
|
|
[**6. Calculation of Tracer Displacement Velocity**](#calculation-of-tracer-displacement-velocity)
|
|
|
|
|
|
- [Principles](#book-principles)
|
|
|
- [Manual Velocity Calculation](#point_right-manual-velocity-calculation)
|
|
|
- [Displacement Calculation Parameters](#gear-displacement-calculation-parameters)
|
|
|
- [Calculation Grid](#round_pushpin-calculation-grid)
|
|
|
- [Tracer Displacement Velocity Calculation](#tracer-displacement-velocity-calculation)
|
|
|
|
|
|
#
|
|
|
|
|
|
# :book: Principles
|
|
|
|
|
|
The **LSPIV** method uses a **statistical cross-correlation method** on orthorectified images to **determine the movement of surface-visible tracers**.
|
|
|
|
|
|
<details><summary><b> :mag_right: Further Details :tools: </b></summary>
|
|
|
<br>
|
|
|
|
|
|
# :mag: Principles of Tracer Displacement Velocity Measurement
|
|
|
|
|
|
A statistical cross-correlation analysis is performed on orthorectified images to determine the movement of visible tracers on the surface. The **_Fudaa-LSPIV_** software uses an optimized algorithm for large-scale spatial applications with potentially low image resolutions. The correlation between an interrogation window (IA) centered on a point _a<sub>ij</sub>_ in one image and the same IA centered on a point _b<sub>ij</sub>_ in the next image, separated by a time interval of ∆t seconds, is calculated. The [size of the interrogation window is adjustable](#displacement-calculation-parameters) in **_Fudaa-LSPIV_**. The correlation coefficient _R(a<sub>ij</sub>, b<sub>ij</sub>)_ is calculated as follows:
|
|
|
|
|
|
```math
|
|
|
R\left( a_{i,j},b_{i,j} \right) = \frac{\sum_{i = 1}^{M_{i}}{\sum_{j = 1}^{M_{j}}\left\lbrack \left( A_{ij} - \overline{A_{ij}} \right)\left( B_{ij} - \overline{B_{ij}} \right) \right\rbrack}}{\left\lbrack \sum_{i = 1}^{Mi}{\sum_{j = 1}^{Mj}{\left( A_{ij} - \overline{A_{ij}} \right)^{2}\sum_{i = 1}^{Mi}{\sum_{j = 1}^{Mj}\left( B_{ij} - \overline{B_{ij}} \right)^{2}}}} \right\rbrack^{1/2}}
|
|
|
```
|
|
|
where $M_i$ and $M_j$ are the sizes of the interrogation window (in pixels), and $A_{ij}$ and $B_{ij}$ are the intensity distributions of the pixels in the two interrogation windows. This calculation is performed only for points $b_{ij}$ within a [search window (SA for Searching Area) defined by the user](Manuel-utilisateur/Calcul-de-la-vitesse-de-déplacement-des-traceurs#displacement-calculation-parameters), which helps save computation time. It is assumed that the most probable displacement of the flow from the point $a_{ij}$ during the time $\Delta t$ corresponds to the maximum correlation, with the option to define a required minimum correlation.
|
|
|
|
|
|
![image114](uploads/fe03235d4d9c3242bcc9ecb886c2e534/image114.png)
|
|
|
|
|
|
Since the calculation precision is at the pixel level, it is useful to perform sub-pixel interpolation. Let $b_i, j_i$ represent the position of the maximum correlation. In **_Fudaa-LSPIV_**, a one-dimensional Gaussian fitting is applied along the i and j axes to obtain a displacement precision of the order of 0.2 pixels, as expressed by:
|
|
|
|
|
|
|
|
|
```math
|
|
|
\Delta i = \frac{\ln(b_{i - 1,j}) - ln(b_{i + 1,j})}{2\left\lbrack \\ln{(b_{i + 1,j}) - 2\ln(b_{i,j}) + \ln{(b}_{i - 1,j})} \right\rbrack} \quad \Delta j = \frac{\ln(b_{i,j-1}) - ln(b_{i,j+1})}{2\left\lbrack \\ln{(b_{i,j+1}) - 2\ln(b_{i,j}) + \ln{(b}_{i,j-1})} \right\rbrack}
|
|
|
```
|
|
|
|
|
|
The sub-pixel position of the maximum correlation is then calculated as $b_{i+\Delta i, j+\Delta j}$.
|
|
|
|
|
|
Surface velocities are calculated from the displacements $b_{i+\Delta i, j+\Delta j}-a_{ij}$ divided by $\Delta t$. The calculation is repeated iteratively over the entire image for each node of the [calculation grid](Manuel-utilisateur/Calcul-de-la-vitesse-de-déplacement-des-traceurs#calculation-grid). This results in a 2D surface velocity field, "instantaneous" (between two successive images).
|
|
|
|
|
|
:clap: **End of approfondissements** :nerd_face:
|
|
|
|
|
|
#
|
|
|
|
|
|
Additionally, some velocities can be determined manually. This is particularly useful for comparing with the velocities calculated by LSPIV and validating them.
|
|
|
|
|
|
# :point_right: Manual Velocity Calculation
|
|
|
|
|
|
![image58](uploads/97d6b2e35e435d652d4018fe36486724/image58.png){width="600px"}
|
|
|
|
|
|
- The **_Analyse LSPIV 🡪 Vitesses calculées manuellement..._** menu opens the interface for manually determining the movement of tracers:
|
|
|
- Click the button ![image59](uploads/130eb72fed2e1ca218c611004d08ebeb/image59.png)
|
|
|
- Select the position of a tracer on an image
|
|
|
- Select the position of this tracer on any image in the sequence (next or previous), scrolling through the images using the F11/F12 keys (forward/backward).
|
|
|
|
|
|
The images and selected positions are listed in the table.
|
|
|
|
|
|
![image60](uploads/f977900a7c69ce1ae708992ec4b76606/image60.png)
|
|
|
|
|
|
It is possible to use the manual velocities for the flow rate calculation by checking the **Combine with average velocities** box.
|
|
|
|
|
|
Once the manual selection of tracer positions is completed, clicking the **_Validate_** button displays the results of the velocities in the **_Manual Velocities_** layer:
|
|
|
|
|
|
![image61](uploads/297e6a9b6ea271a6907099c010d087c0/image61.png)
|
|
|
|
|
|
# :gear: Displacement Calculation Parameters
|
|
|
|
|
|
Two methods are available to define the parameters for calculating the displacements of tracers:
|
|
|
|
|
|
- The **_Analyse LSPIV_** 🡪 **_Paramètres de Calcul 🡪 Définir_** menu opens the **_Displacement Calculation Parameters_** interface. Several parameters need to be entered:
|
|
|
|
|
|
![image62](uploads/57544052faaab716bf75176190b35f78/image62.png)
|
|
|
|
|
|
- The **_size of the interrogation area_** (IA for Interrogation Area), in meters or pixels (linked units), see the page on [Principles of velocity measurement](#principes) for more details.
|
|
|
> :warning: This area should be large enough to encompass tracers but small enough to represent the flow (velocity gradients in an IA should be negligible). As good practice, the IA size should match the tracer size and the characteristic scale of the measured flow, while remaining small enough to allow for reasonable calculation time. A size of about 30-50 pixels is recommended (the size must be an even number).
|
|
|
|
|
|
The **_Apply_** button allows for a graphical visualization of the IA size on an orthorectified image. The user can choose the center position of the window by entering its coordinates in **_Center Position_** or by clicking on a pixel in the image after activating the **_Position_** button.
|
|
|
|
|
|
- The size of the search area (SA for Searching Area) in meters or pixels (linked units), see the page on [Principles of velocity measurement](#principes) for more details.
|
|
|
> :thumbsup: The search area is a rectangle defined around the center of the interrogation area. It corresponds to the zone where patterns are searched for on successive images. When the flow has a preferred direction, the search area can be elongated in that direction.
|
|
|
|
|
|
The SA is defined by 4 parameters: Sim, Sip, Sjm, and Sjp. The **_Apply_** button provides a graphical visualization of the SA size on an orthorectified image.
|
|
|
|
|
|
![image63](uploads/f585181828869a1b525301429cdfbb0c/image63.png)
|
|
|
|
|
|
- The button ![image64](uploads/ba89ab12adbdd87b1cd620c8d9f5d881/image64.png) applies the configuration to the first image pair and displays the velocity results with statistics (min/max/mean/median) to test the parameters.
|
|
|
- The displacement calculation parameters are stored in the **_outputs.dir\\PIV_param.dat_** file upon validation.
|
|
|
- The button ![image24](uploads/ef7d97f41af6ee6681fb6d0f323ef29f/image24.png) shows a tooltip providing recommendations on velocity calculation parameters.
|
|
|
|
|
|
- The **_Analyse LSPIV_** 🡪 **_Paramètres de Calcul 🡪 Importer_** menu allows for loading the displacement calculation parameters from an existing study using the **_PIV_param.dat_** file. This file follows the format shown below:
|
|
|
|
|
|
![image65](uploads/9489bba281b6792118b04f71ca555231/image65.png){width="550px"}
|
|
|
|
|
|
# :round_pushpin: Calculation Grid
|
|
|
|
|
|
The calculation grid represents all the points for which a velocity will be calculated. For more details, see the [Principles of velocity measurement](#principes) page. Two methods are available for defining the calculation grid:
|
|
|
|
|
|
- The **_Analyse LSPIV_** 🡪 **_Grid Points 🡪 Define_** menu opens the interface for defining the **_Grid Contour_** for tracer displacements.
|
|
|
- The grid contour is a quadrilateral defined by its four corners through clicks on the orthoimage.
|
|
|
- The grid density is defined by a spacing step on the opposite sides of the quadrilateral.
|
|
|
- The **_Apply_** button allows for a graphical display of the grid on the orthoimage.
|
|
|
|
|
|
The calculation grid is stored in the **_outputs.dir\\grid.dat_** file, and the grid parameters are stored in the **_outputs.dir\\grid_param.dat_** file upon validation.
|
|
|
|
|
|
![image66](uploads/6f5f2d6e36f7dbfb2ca1e488aa8f0a97/image66.png){width="550px"}
|
|
|
|
|
|
![image67](uploads/b6ff8a00350b5d7aa7812bf5c75cb48e/image67.png){width="650px"}
|
|
|
|
|
|
- The **_Analyse LSPIV_** 🡪 **_Grid Points 🡪 Import_** menu allows for loading a calculation grid from an existing study using a **_grid.dat_** file. This text file contains a list of the I,J coordinates of all grid nodes in the orthoimage reference system.
|
|
|
|
|
|
# :stopwatch: Calculation of Tracer Displacement Velocities
|
|
|
|
|
|
The **_Analyse LSPIV🡪 Calculate Instantaneous Results_** menu starts the statistical analysis of tracer displacements for all image pairs in the sequence. For more details, see the [Principles of velocity measurement](#principes) page.
|
|
|
|
|
|
An "instantaneous" velocity field (at the time interval between two images) is obtained for all consecutive image pairs. Thus, for N selected images, N-1 velocity fields are obtained, stored in the **_vel_raw_** folder.
|
|
|
|
|
|
The **_Raw Results (B)_** layer group is created.
|
|
|
|
|
|
![image68](uploads/7bf272478da0fd36ef09786e820a0067/image68.png)
|
|
|
|
|
|
It allows visualizing the velocities calculated for image pairs in the form of a vector field (**_Velocities B_**), streamlines (**_Particles B_**, [see how to calculate them here](#_Calcul_des_lignes)), or contour plots (**_Isosurfaces B_**). More details on [visualizing and configuring velocity layers here](#r%C3%A9f%C3%A9rences-bibliographiques). The graphical interface allows linking the visualization of images and calculated velocities via the **_Link/Unlink Images and Velocities_** button.
|
|
|
|
|
|
![image69](uploads/e35652b2f4fc8d57e9a200320b09d1e1/image69.png)
|
|
|
|
|
|
#
|
|
|
-> [**Next section: 7. Post-processing of calculated velocities**](Manuel-utilisateur/Post-traitement-des-vitesses-calculées) |
|
|
\ No newline at end of file |