EGU General Assembly 2021
© Author(s) 2021. This work is distributed under
the Creative Commons Attribution 4.0 License.

Using computer vision to monitor varying water levels: an exploratory laboratory experience

Jorge Isidoro1,4, Ricardo Martins2, and João de Lima4,3
Jorge Isidoro et al.
  • 1Civil Engineering Department, Institute of Engineering, University of Algarve, Faro, Portugal (
  • 2Centre for Environmental and Marine Studies (CESAM), Department of Environment and Planning, University of Aveiro, Aveiro, Portugal (
  • 3Civil Engineering Department, Faculty of Sciences and Technology, University of Coimbra, Coimbra, Portugal (
  • 4Marine and Environmental Sciences Centre (MARE), Coimbra, Portugal

Monitoring water levels is fundamental in a variety of fields within geosciences, hydraulics, and hydrology. Examples of this can be found in the field in rivers, reservoirs, or surface runoff while, at a much lower scale, in the laboratory, e.g., open channel flow. This is an area of ​​great complexity, due to the large diversity of spatial and temporal scales of hydraulic systems and phenomena such as the non-linearity of fluid mechanics, sediment or pollutant transport, turbulence, the interactions between water and solid surfaces (natural or artificial), or atmospheric boundary conditions. The last decade has brought important advances in techniques associated with the acquisition and analysis of images, techniques encompassed in what is currently called “computer vision”.

In this work, a methodology based on image treatment and segmentation techniques was developed, which allows the detection of the free flow water surface over time in laboratory conditions using simple video equipment.

The objective of this work was to develop and validate an algorithm for detecting the free water surface with high temporal resolution. Other specific objectives were: (i) to validate the algorithm against measurements in a steady-state flow; (ii) to test the algorithm for accentuated oscillations of the free surface resulting from different bed geometries, slope, and discharge; and (iii) to assert the feasibility of the systematic use of non-specialized and inexpensive video equipment as a level measuring device, without compromising its accuracy.

All laboratory work took place at the Laboratory of Hydraulics, Water Resources and Environment of the Department of Civil Engineering of the Faculty of Sciences and Technology of the University of Coimbra. The channel has dimensions of 4.00m × 0.15m (L×W) and the slope is adjustable. Water is supplied to the channel, in a closed circuit, from a reservoir by means of a pump and piping system, and the flow controlled by a ball valve. The algorithm developed for detecting the free surface is based on the acquisition, treatment, analysis, and segmentation of images. MATLAB® was used to code functions to recognize the edges present in an image by the image intensity gradient as well as the best-defined segment present in the image, which, in this case, corresponds to the free water surface.

How to cite: Isidoro, J., Martins, R., and de Lima, J.: Using computer vision to monitor varying water levels: an exploratory laboratory experience, EGU General Assembly 2021, online, 19–30 Apr 2021, EGU21-13721,, 2021.

Corresponding displays formerly uploaded have been withdrawn.