UBathy (v2.0): A Software to Obtain the Bathymetry from Video Imagery
Abstract
:1. Introduction
2. Methods and Software Description
- Software characteristics. UBathy is an open source software developed in (also open source) Python3 and available at GitHub platform. It runs on any platform with a standard installation of Python3.9 (i.e., with “The Python Standard Library”) and OpenCV, NumPy, SciPy and matplotlib modules. The code is complemented with an example case so that any user can fully execute it. A guided example is included to run on Jupyter Notebook to facilitate its use to non-experienced users. The software is suitable for users who are familiar with coastal image processing.
- Videos sources. A novel aspect of UBathy is that allows to directly process videos of raw camera images in addition to usual planview videos. In the first case (raw images), the videos can be acquired typically from fixed video monitoring stations (“Argus” type, [14]) but also from new CoastSnap stations [21]. For their processing, only the calibration of the camera is needed, without any further post-processing, together with the position of the mean water level at the time of the recording. Videos of planviews can normally come from fixed video monitoring stations or from the processing of drone flights. For planview videos it is necessary to know their georeference and the position of the mean water level.
- Mode decomposition. The extraction of the wave modes and corresponding wave periods is performed by global analysis of the images. The software allows, at user’s request, to decompose the videos in time (wave periods) and space (wave phase) using EOF, following [12], or DMD [13]. In addition, the user can also reduce the signal noise of the videos by applying an RPCA [19]. The wavenumber estimation uses local adjustments of the wave phase.
- Bathymetry estimation. The bathymetry is obtained by fitting the surface waves dispersion relationship with the wavenumbers and frequencies of the different modes, taking into account the different mean water levels. Another novel aspect of this software is the flexibility to obtain the bathymetry by assembling videos that: (1) cover different parts of the coastal area, (2) do not need to be recorded synchronously and with the same sea level and, (3) are made of different types of images (planviews and raw images). In addition to the bathymetry obtained from the above analysis, a Kalman filter is used to obtain the bathymetry at a given time by accumulating the results obtained up to that time.
- Step 0:
- Video and data setup. The video frames, data for image georeferencing and mean water level during the recording of the videos are provided.
- Step 1:
- Generation of meshes. Generation of the spatial meshes to express the mode decomposition, the wavenumbers and the bathymetry.
- Step 2:
- Mode decomposition. The wave is decomposed into different modes, with the corresponding wave period and spatial phase.
- Step 3:
- Wavenumber computation. The spatial phase of each mode is analyzed to extract the wavenumbers in the spatial domain.
- Step 4:
- Bathymetry estimation. Estimation of the bathymetry from the set of periods and wavenumbers of different videos.
- Step 5:
- Kalman filtering. Determination of the bathymetry evolution by time filtering the bathymetry results obtained from videos at different times.
2.1. Methodological Background
2.1.1. Generation of Meshes
2.1.2. Mode Decomposition
2.1.3. Wavenumber Computation
2.1.4. Bathymetry Estimation
2.1.5. Kalman Filtering
2.2. Software Implementation
2.2.1. Video and Data Setup
2.2.2. Generation of Meshes
2.2.3. Mode Decomposition
2.2.4. Wavenumber Computation
2.2.5. Bathymetry Estimation
2.2.6. Kalman Filtering
3. Results and Discussion
3.1. Bathymetry Estimation
3.1.1. Generation of Meshes
3.1.2. Mode Decomposition
3.1.3. Wavenumber Computation
3.1.4. Bathymetry Estimation
3.2. Kalman Filtering
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
EOF | Empirical orthogonal functions |
DMD | Dynamic mode decomposition |
FFT | Fast Fourier transform |
RANSAC | Random sample consensus approach |
RPCA | Robust principal component algorithm |
Appendix A. Software Source Code
- Software name: UBathy
- Developers: Gonzalo Simarro, Daniel Calvete
- Contact address:[email protected]
- Cost: free
- License: Creative Commons Attribution 4.0 International
- Availability:https://doi.org/10.5281/zenodo.7360216
- Year first available: 2022
- New developments:https://github.com/Ulises-ICM-UPC/UBathy (accessed on 10 November 2022)
- Hardware requirements: PC, server.
- System requirements: Windows, Linux, Mac.
- Program language: Python (3.9)
- Dependencies: OpenCV, NumPy, SciPy and matplotlib modules.
- Program size: 100 KB
- Documentation: README in GitHub repository and example in an editable Jupyter Notebook.
References
- Davidson, M.; Van Koningsveld, M.; de Kruif, A.; Rawson, J.; Holman, R.; Lamberti, A.; Medina, R.; Kroon, A.; Aarninkhof, S. The CoastView project: Developing video-derived Coastal State Indicators in support of coastal zone management. Coast. Eng. 2007, 54, 463–475. [Google Scholar] [CrossRef]
- Kroon, A.; Davidson, M.; Aarninkhof, S.; Archetti, R.; Armaroli, C.; Gonzalez, M.; Medri, S.; Osorio, A.; Aagaard, T.; Holman, R.; et al. Application of remote sensing video systems to coastline management problems. Coast. Eng. 2007, 54, 493–505. [Google Scholar] [CrossRef]
- Calvete, D.; Coco, G.; Falqués, A.; Dodd, N. (Un)predictability in rip channel systems. Geophys. Res. Lett. 2007, 34, 1–5. [Google Scholar] [CrossRef] [Green Version]
- Arriaga, J.; Rutten, J.; Ribas, F.; Falqués, A.; Ruessink, G. Modeling the long-term diffusion and feeding capability of a mega-nourishment. Coast. Eng. 2017, 121, 1–13. [Google Scholar] [CrossRef] [Green Version]
- Birkemeier, W.; Mason, C. The crab: A unique nearshore surveying vehicle. J. Surv. Eng. 1984, 110, 1–7. [Google Scholar] [CrossRef]
- Hughes Clarke, J.; Mayer, L.; Wells, D. Shallow-water imaging multibeam sonars: A new tool for investigating seafloor processes in the coastal zone and on the continental shelf. Mar. Geophys. Res. 1996, 18, 607–629. [Google Scholar] [CrossRef]
- Irish, J.; White, T. Coastal engineering applications of high-resolution lidar bathymetry. Coast. Eng. 1998, 35, 47–71. [Google Scholar] [CrossRef]
- Almar, R.; Bergsma, E.; Maisongrande, P.; de Almeida, L. Wave-derived coastal bathymetry from satellite video imagery: A showcase with Pleiades persistent mode. Remote Sens. Environ. 2019, 231, 111263. [Google Scholar] [CrossRef]
- Holman, R.; Plant, N.; Holland, T. CBathy: A robust algorithm for estimating nearshore bathymetry. J. Geophys. Res. Ocean 2013, 118, 2595–2609. [Google Scholar] [CrossRef]
- Holman, R.A.; Brodie, K.L.; Spore, N.J. Surf Zone Characterization Using a Small Quadcopter: Technical Issues and Procedures. IEEE Trans. Geosci. Remote Sens. 2017, 55, 2017–2027. [Google Scholar] [CrossRef]
- Bell, P. Shallow water bathymetry derived from an analysis of X-band marine radar images of waves. Coast. Eng. 1999, 37, 513–527. [Google Scholar] [CrossRef]
- Simarro, G.; Calvete, D.; Luque, P.; Orfila, A.; Ribas, F. UBathy: A new approach for bathymetric inversion from video imagery. Remote Sens. 2019, 11, 2722. [Google Scholar] [CrossRef] [Green Version]
- Gawehn, M.; De Vries, S.; Aarninkhof, S. A self-adaptive method for mapping coastal bathymetry on-the-fly from wave field video. Remote Sens. 2021, 13, 4742. [Google Scholar] [CrossRef]
- Holman, R.; Stanley, J. The history and technical capabilities of Argus. Coast. Eng. 2007, 54, 477–491. [Google Scholar] [CrossRef]
- Honegger, D.; Haller, M.; Holman, R. High-resolution bathymetry estimates via X-band marine radar: 1. beaches. Coast. Eng. 2019, 149, 39–48. [Google Scholar] [CrossRef]
- Simarro, G.; Calvete, D.; Plomaritis, T.A.; Moreno-Noguer, F.; Giannoukakou-Leontsini, I.; Montes, J.; Durán, R. The influence of camera calibration on nearshore bathymetry estimation from UAV videos. Remote Sens. 2021, 13, 150. [Google Scholar] [CrossRef]
- Holman, R.; Bergsma, E. Updates to and performance of the cbathy algorithm for estimating nearshore bathymetry from remote sensing imagery. Remote Sens. 2021, 13, 3996. [Google Scholar] [CrossRef]
- Schmid, P.J. Dynamic mode decomposition of numerical and experimental data. J. Fluid Mech. 2010, 656, 5–28. [Google Scholar] [CrossRef] [Green Version]
- Candes, E.; Li, X.; Ma, Y.; Wright, J. Robust principal component analysis? J. ACM 2011, 58, 1–37. [Google Scholar] [CrossRef]
- Fischler, M.; Bolles, R. Random sample consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography. Commun. ACM 1981, 24, 381–395. [Google Scholar] [CrossRef]
- Harley, M.D.; Kinsela, M.A. CoastSnap: A global citizen science program to monitor changing coastlines. Cont. Shelf Res. 2022, 245, 104796. [Google Scholar] [CrossRef]
- Askham, T.; Zheng, P.; Aravkin, A.; Kutz, J.N. Robust and Scalable Methods for the Dynamic Mode Decomposition. SIAM J. Appl. Dyn. Syst. 2022, 21, 60–79. [Google Scholar] [CrossRef]
- Simarro, G.; Orfila, A. Improved explicit approximation of linear dispersion relationship for gravity waves: Another discussion. Coast. Eng. 2013, 80, 15. [Google Scholar] [CrossRef]
- Simarro, G.; Calvete, D. UBathy: A Software to Obtain Bathymetry from Video Imagery; Version 2.0.0; CERN: Geneva, Switzerland, 2022. [Google Scholar] [CrossRef]
- de Swart, R.; Ribas, F.; Simarro, G.; Guillén, J.; Calvete, D. The role of bathymetry and directional wave conditions on observed crescentic bar dynamics. Earth Surf. Process. Landforms 2021, 46, 3252–3270. [Google Scholar] [CrossRef]
- Ribas, F.; Simarro, G.; Arriaga, J.; Luque, P. Automatic shoreline detection from video images by combining information from different methods. Remote Sens. 2020, 12, 3717. [Google Scholar] [CrossRef]
- Simarro, G.; Bryan, K.; Guedes, R.; Sancho, A.; Guillen, J.; Coco, G. On the use of variance images for runup and shoreline detection. Coast. Eng. 2015, 99, 136–147. [Google Scholar] [CrossRef]
- Simarro, G.; Ribas, F.; Álvarez, A.; Guillén, J.; Chic, O.; Orfila, A. ULISES: An open source code for extrinsic calibrations and planview generations in coastal video monitoring systems. J. Coast. Res. 2017, 33, 1217–1227. [Google Scholar] [CrossRef]
Variable | parameters.json | Unit | Example | Ranges | |
---|---|---|---|---|---|
generation of meshes | delta_M | m | - | ||
delta_K | m | - | |||
delta_B | m | - | |||
mode decomposition | time_step | s | 30 | [1–60] | |
time_windows | s | [30–150] | |||
min_period | s | 3 | - | ||
max_period | s | 15 | - | ||
candes_iter | - | 50 | [40–80] | ||
- | DMD_or_EOF | - | “DMD” | “DMD” or “EOF” | |
DMD_rank | - | 6 | [5–10] | ||
EOF_variance | - | [0.010–0.100] | |||
wavenumber computation | min_depth | m | - | ||
max_depth | m | - | |||
nRadius_K | - | 3 | [2–5] | ||
cRadius_K | - | [0.40–0.60] | |||
nRANSAC_K | - | 50 | [25–100] | ||
bathymetry estimation | stdGammaC | - | [0.050–0.150] | ||
cRadius_B | - | [0.10–0.30] | |||
Kalman filtering | Kalman_ini | yyyyMMddhhmm | 202007250800 | - | |
Kalman_fin | yyyyMMddhhmm | 202008010900 | - | ||
Q | var_per_day | m/day | [0.05–0.25] |
Videos of 160 s | Videos of 600 s | |||||
---|---|---|---|---|---|---|
Case | Points | Biasm | RMSEm | Points | Biasm | RMSEm |
all | 5609 | 6174 | ||||
only | 5270 | 6134 | ||||
only | 5282 | 6026 | ||||
only | 5105 | 5977 |
Videos of 160 s | |||
---|---|---|---|
Case | Points | Bias m | RMSE m |
RANSAC, | 5609 | ||
no RANSAC, | 4420 | ||
no RANSAC, | 5427 | ||
no RANSAC, | 5989 | ||
no RANSAC, | 4502 |
Videos of 160 s | Videos of 600 s | |||||
---|---|---|---|---|---|---|
Case | Points | Biasm | RMSEm | Points | Biasm | RMSEm |
no Kalman | 4119 | 4429 | ||||
1 day | 4346 | 4469 | ||||
2 days | 4364 | 4477 | ||||
3 days | 4394 | 4480 | ||||
4 days | 4394 | 4480 | ||||
5 days | 4412 | 4488 | ||||
6 days | 4419 | 4493 | ||||
7 days | 4419 | 4493 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Simarro, G.; Calvete, D. UBathy (v2.0): A Software to Obtain the Bathymetry from Video Imagery. Remote Sens. 2022, 14, 6139. https://doi.org/10.3390/rs14236139
Simarro G, Calvete D. UBathy (v2.0): A Software to Obtain the Bathymetry from Video Imagery. Remote Sensing. 2022; 14(23):6139. https://doi.org/10.3390/rs14236139
Chicago/Turabian StyleSimarro, Gonzalo, and Daniel Calvete. 2022. "UBathy (v2.0): A Software to Obtain the Bathymetry from Video Imagery" Remote Sensing 14, no. 23: 6139. https://doi.org/10.3390/rs14236139
APA StyleSimarro, G., & Calvete, D. (2022). UBathy (v2.0): A Software to Obtain the Bathymetry from Video Imagery. Remote Sensing, 14(23), 6139. https://doi.org/10.3390/rs14236139