Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
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

En prévision de l'arrivée de la forge institutionnelle INRAE, nous vous invitons à créer vos nouveaux projets sur la forge MIA.

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

Managing source images · Changes

Page history
Update Managing source images authored 7 months ago by Guillaume  Bodart's avatar Guillaume Bodart
Hide whitespace changes
Inline Side-by-side
Showing
with 93 additions and 2 deletions
+93 -2
User-manual/Managing-source-images.md
View page @ cc1a6717
......@@ -97,6 +97,97 @@ With $I$ as the intensity in grayscale at the point with coordinates (x,y). The
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
To ensure that stabilization is performed on the banks, the user defines a "flow" area in which no points of interest will be extracted.
![image110](uploads/dd51334bb23e1434f871ac6092a0dbd0/image110.jpeg){width="700px"}
## :mag: Point Matching
The next step is to match the points from image 1 with those from image 2. We then use the SURF descriptor, which is essentially the "identity card" of each point. It contains several pieces of information:
- Point scale (its "size")
- Orientation
- Distribution of gradients in its neighborhood
The neighborhood is defined based on the size of the point, and the gradients are expressed relative to its orientation. As a result, the SURF descriptor is robust to rotation, translation, and zoom. Points with similar SURF descriptors are then matched. In the image below, the matches are indicated by a red line. For each point, the diameter of the circle represents the size of the point of interest, and the line indicates its orientation.
![image111](uploads/57ee640201deb1d36e2b63f424cc63b1/image111.png){width="400px"}
Sometimes incorrect matches (or false matches) are made. To discard them, we use the ORSA method (Moisan 2004). False matches are identified using a stochastic process associated with epipolar geometry constraints (not detailed here).
## :mag: Estimating the Transformation
We now have sets of matched points, meaning we know the position of each point on image 1 and image 2. The next step is to determine the transformation matrix $H$ that allows us to go from positions $X$ to $X'$.
```math
X=H \cdot X^{\prime}=\left(\begin{array}{lll}
h_1 & h_2 & h_3 \\
h_4 & h_5 & h_6 \\
h_7 & h_8 & h_9
\end{array}\right) \cdot\left(\begin{array}{c}
x^{\prime} \\
y^{\prime} \\
1
\end{array}\right)
```
Each matched point is used as a control point. The values of the homography matrix coefficients $H$ are then approximated using them. The DLT (Direct Linear Transform) method is used to rearrange the above equation and estimate $H$ using the pairs of control points. Indeed, there is no unique solution to the problem, so the best-fitting solution is determined for all the control points.
:clap: **End of deep dive** :nerd_face:
#
</details>
The **_Images 🡪 Image Stabilization Settings_** menu provides access to the stabilization module.
![image26](uploads/45531697cf9d07aceb00fb30227b348a/image26.png){width="600px"}
In this panel, the **_Enable the stabilization module_** checkbox activates or deactivates the stabilization of the source images.
![image27](uploads/00b9dbd27a3023ba6acb90923feef0b9/image27.png) ![image28](uploads/124ed161005c32106be07b46e407147e/image28.png)
Next, it is necessary to define the extent of one or more **_Flow Zones_** or **_Fixed Zones_** by clicking the **_Interactive Input_** button and entering the positions of the polygon vertices on a source image. A flow zone corresponds to moving patterns that should not be used as points of interest by the stabilization algorithm. Conversely, a fixed zone includes fixed patterns that can be used as points of interest by the stabilization algorithm. A **_Flow Zone_** layer is added to the 2D view **_Source Image Space_**.
![image29](uploads/20340469de1e213c9ed6625d167e5e08/image29.png)
![image30](uploads/60db49f971f9a0234b41ff047516b415/image30.png)
By default, the point of interest density is **_Medium_**, and the transformation model is **_Similarity_**. Two models are proposed: **_Similarity_** and **_Perspective_**. The choice depends on the magnitude of camera movements and the "quality" of the banks.
- Small movements (<10 pixels): prefer the **_Similarity_** model.
- Large movements (>10 pixels): prefer the **_Perspective_** model.
- Poor "quality": choose **_High_** point density.
- Good "quality": choose **_Low_** point density.
> The **"quality"** of the banks refers mainly to **texture and contrast**. The more textured and contrasting the environment, with visible edges/corners, the better the bank will be for stabilization.
> - A smooth concrete slab without roughness will be seen as a poor "quality" bank.
> - Banks made of vegetation + rocks + trees + shadows will be of very high quality.
The **point density** affects the **calculation time**: the lower the density, the faster the stabilization process.
> The banks/flow ratio in the image is an important parameter to consider.
> The test case presented earlier is ideal: **the flow represents about 1/3 of the image**, leaving enough banks. The environment is also sufficiently **textured** and has many edges. In such a case, a **_Low_** density can be used.
>
> It is not recommended to use **Low** density with the **Perspective** model. This model is more sensitive, so errors can occur if there are too few control points.
To ensure proper stabilization, **the banks should represent at least ¼ of the image**, on both sides of the flow (i.e., 50% flow, 50% banks).
Finally, you must **_Validate_** or **_Cancel_** the defined settings. The **_Apply_** button has no function here. The stabilization settings are reported in the gauging reports.
The **_Images 🡪 Stabilize Images_** command launches the calculation of the stabilized images, which will then be used for orthorectification (see the next section). The stabilization process can be interrupted.
![image32](uploads/c840c7ff8521f0509e4b762d069067b1/image32.png)
The stabilized images can be viewed one by one in the 2D View **_Source Image Space_** by first clicking on the "Shaky Hand" icon ![image33](uploads/48c0fc90bf7ac3dba71eea3d5c11c0b9/image33.png).
![image34](uploads/acfae0dae4d991be07d5938586a9d7b5/image34.png)
The **_File 🡪 Export 🡪 Export Stabilized Images_** command allows the export of stabilized images.
![image35](uploads/5b415fee705c2f1b71bb4852ef8565f7/image35.png)
![image36](uploads/699af72f35c98518a69184501529a0a0/image36.png)
#
-> [**Next Section: 5. Image Orthorectification**](User-Manual/Image-Orthorectification)
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. Managing source images
  5. Image orthorectification
  6. Tracers velocity computation
  7. Post-processing of velocity results
  8. Display-velocity-results
  9. Discharge computation
  10. Data export
  11. Relaunch existing study computations
  12. Known bugs and workarounds
  13. Advanced
  14. References

Menu

Explore Projects Groups Topics Snippets