Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • F Fudaa Lspiv
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 34
    • Issues 34
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

La forge institutionnelle d'INRAE étant en production depuis le 10 juin 2025, nous vous invitons à y créer vos nouveaux projets.

  • Image Velocimetry
  • Fudaa Lspiv
  • Wiki
  • User manual
  • Managing source images

Managing source images · Changes

Page history
Update Managing source images authored Sep 24, 2024 by Guillaume  Bodart's avatar Guillaume Bodart
Show whitespace changes
Inline Side-by-side
User-manual/Managing-source-images.md 0 → 100644
View page @ cb60feee
# Table of Contents
[**4. Managing Source Images**](#managing-source-images)
- [Import a Sequence of Images](#camera-import-a-sequence-of-images)
- [Import a Video and Sequence It](#projector-import-a-video-and-sequence-it)
- [Stabilize an Image Sequence](#wave-stabilize-an-image-sequence)
#
The calculations performed in **_Fudaa-LSPIV_** are carried out on consecutive image sequences with a known and fixed time interval. The user can:
- Import an image sequence
- Import a video and sequence it in **_Fudaa-LSPIV_**
# :camera: Import a Sequence of Images
The **_Images 🡪 Manage Source Images_** menu opens the image management window. The **_Add_** button ![image12](uploads/6e8055b0b3bf287ef473563cde6cb0ff/image12.png) launches a file explorer allowing you to select the image sequence to analyze. All standard image formats are supported (png, tif, pgm, jpg, tiff, jpeg, gif, bmp...). The selected images appear in the image management window.
![image13](uploads/e8a5ef8ef5f6887b25c115da24a1fb6e/image13.png)
The **_Add_** button ![image12](uploads/f33f2e1aed1147e14205c6e26f934f66/image12.png) allows you to add new images to the same sequence. The **_Remove_** button ![image14](uploads/2530051d1af19ed51bb6953cc3791849/image14.png) allows you to remove one or more selected images. The **_Move Up_** button ![image15](uploads/4550edb5da32aeb10b9fa41b0066101f/image15.png) and **_Move Down_** button ![image16](uploads/e3b50ced87f720090d1756deb9efc37c/image16.png) allow you to change the order of the images in the sequence.
The user specifies either the **_time interval_** between two images or the **_number of images per second_**.
> By checking the **_Background_** box, the selected image is displayed by the software but is not used for LSPIV velocity calculations. This option can be applied if images showing reference points useful for orthorectification are not relevant for velocity field measurement (e.g., GRP images taken before or after the passage of flow tracers).
Once the selection is confirmed, the images are displayed in the **_Source Image Area_**.
![image17](uploads/1110907935e3d44a13d8145dc2fa0af4/image17.png)
The source images can be viewed using the **scroll list**:
![image18](uploads/3338941ac853b3a31a3a8f1861099d07/image18.png)
# :projector: Import a Video and Sequence It
The **_Images 🡪 Import Images from a Video_** menu opens the video import window:
![image19](uploads/732ce701617e378734a0950f7a1981c8/image19.png)
The ![image20](uploads/e1e453d222a23a1f9d48c892184cc82c/image20.png) button launches a file explorer allowing you to select the video to sequence.
![image21](uploads/c0534db3d6a344380714602adba5a37b/image21.png)
> All standard video formats are supported (avi, mov, mpeg...). The number of frames per second of the video is displayed along with the corresponding time interval in seconds.
>
> A preview of the video is displayed, allowing you to optimize the image sampling parameters. The current frame in the preview can be selected using the slider.
>
> The rank of the current frame out of the total number of frames in the video is displayed along with basic video information: duration, frames per second, corresponding time interval in seconds, and the size of the images (in pixels).
In the **_Sampling_** section, specify the video sequencing parameters:
- The **_size (Dimensions X and Y)_** of the images to be sampled, in pixels.
- The **_image sampling rate_**: keep 1 frame out of N.
- Or the **_time interval_** between two images. This value must be greater than the original time interval.
- If the entire video is not to be analyzed, specify the **_start and end times_** of the sequence of interest, in seconds. The start and end times can be set to the time of the current preview frame by pressing the ![image22](uploads/0aa349b028b478e68341a940ccf073a4/image22.png) button.
The sampling information is stored in the project and included in the gauging reports. The configuration file is named `user_extract.dat` and is located in the `outputs.dir` subfolder of the `.lspiv.zip` archive. It contains the start and end times (in seconds), the sampling parameter N (keep 1 frame out of N), the size of the extracted images (in pixels), and the file path to the video. Video parameters can be loaded from a `user_extract.dat` file using the ![image23](uploads/e45800d4910d516fd461b358acab76bf/image23.png) button.
The ![image24](uploads/9a0b1d426a6b7ec73858dad14d76a17f/image24.png) button displays a tooltip with recommendations on image sampling parameters.
Press **_Confirm_** to start sequencing. The progress of the calculation is displayed, and the image sampling operation can be interrupted if necessary. The first and last frames of the sequence are automatically deleted to avoid time interval errors. The sequence of `.png` images can be displayed in the image management window.
![image25](uploads/7e4e6f7e5ac433c51a66c25473923b6e/image25.png)
The **_Add_** button ![image12](uploads/fcd641856591769a5bb385e0e92df069/image12.png) allows you to add new images to the same sequence. The **_Remove_** button ![image14](uploads/f30aa5df9410c7fdc6c610bd3d243e14/image14.png) allows you to remove one or more selected images. The **_Move Up_** button ![image15](uploads/830778c6922ee00d32f6eab070f69698/image15.png) and **_Move Down_** button ![image16](uploads/a534f5404663427a9978db1693cce98c/image16.png) allow you to change the order of the images in the sequence. Once the selection is confirmed, the images are displayed in the **_Source Image Area_**.
![image17](uploads/825f1dce20cacee380d66ae79595d6bd/image17.png)
The source images can be viewed using the scroll list:
![image18](uploads/b0e81c1af99a8900e321d29fa62ab452/image18.png)
Among the imported images, some can be used only for the orthorectification step (check the background box) or only for velocity calculation.
![image25](uploads/8ebb1ad918ff42f10bf3b567fb6c9908/image25.png)
# :wave: Stabilize an Image Sequence
**Stabilization** aims to **realign all images in the burst to the first one**, eliminating the effects of any camera movement.
<details><summary><b> :mag_right: In-depth Explanation :tools: </b></summary>
<br>
# :mag: Principle of Stabilization
Remarkable points in the image—"edges" or "corners"—are areas where intensity variations (gradients) are significant in one or more directions. The SURF library (Oyallon, 2015) is used to extract points of interest. The idea is to retain only points where intensity variations are significant along both axes. We then use the determinant of the Hessian matrix (second derivatives), defined as:
```math
DoH=\operatorname{det}\left(\begin{array}{cc}
\frac{d^2 I(x, y)}{dx^2} & \frac{d^2 I(x, y)}{dxdy} \\
\frac{d^2 I(x, y)}{dxdy} & \frac{d^2 I(x, y)}{dy^2}
\end{array}\right)
```
With $I$ as the intensity in grayscale at the point with coordinates (x,y). The points of interest retained are those where the DoH exceeds a threshold $H$. The threshold value is automatically calculated to reach the desired number of points. We classify the number of points into three ranges:
Low point density: Number of points $\in \lbrack 300\ ;500\rbrack$
Medium point density: Number of points $\in \lbrack 1000\ ;2000\rbrack$
High point density: Number of points $\in \lbrack 3000\ ;6000\rbrack$
The density can be chosen via the Image Stabilization Parameters menu, and it determines the required computation time for image stabilization.
Next, each point is associated with a 128-element descriptor vector, which depends on the pixel values within a neighborhood of 8 to 16 pixels. We try to match the descriptors of the $N$ points between two images and eliminate false matches. The 25% of points with the most deviating descriptors are eliminated. The SURF function is launched by the image stabilization function in Fudaa-LSPIV with the following command:
\ No newline at end of file
Clone repository

Home

Manuel utilisateur (français)

  1. Généralités
  2. Démarrer avec Fudaa-LSPIV
  3. Commencer une étude Fudaa-LSPIV
  4. Gestion des images sources
  5. Orthorectification des images
  6. Calcul de la vitesse de déplacement des traceurs
  7. Post traitement des vitesses calculées
  8. Affichage des résultats de vitesse
  9. Calcul du débit
  10. Export des données
  11. Relancer les calculs d'une étude existante
  12. Bug connus et parades
  13. Approfondissements
  14. Références bibliographiques

User manual (English)

  1. General information
  2. Getting started with Fudaa-LSPIV
  3. Starting a Fudaa-LSPIV study
  4. Manage source images
  5. Image orthorectification
  6. Tracking speed calculation
  7. Post-processing of calculated speeds
  8. Display speed results
  9. Flow calculation
  10. Data export
  11. Relaunch existing study calculations
  12. Known bugs and workarounds
  13. Advanced
  14. Bibliographical references