# CoastCams: A MATLAB toolbox making accessible estimations of nearshore processes, mean water levels, and morphology from timestack images

Siegmund Nuyts, Rafael Almar, Denis Morichon, Solene Dealbera, Aritz Abalia, Jennifer Montano Munoz, Gregoire O. Abessolo, Vincent Regard

► To cite this version:

Siegmund Nuyts, Rafael Almar, Denis Morichon, Solene Dealbera, Aritz Abalia, et al. Coast-Cams: A MATLAB toolbox making accessible estimations of nearshore processes, mean water levels, and morphology from timestack images. Environmental Modelling and Software, 2023, 10.1016/j.envsoft.2023.105800. hal-04720458

HAL Id: hal-04720458

https://hal.science/hal-04720458v1

Submitted on 11 Oct 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_2.png" /></figure>

# CoastCams: A MATLAB toolbox making accessible estimations of nearshore processes, mean water levels, and morphology from timestack images

Siegmund Nuyts<sup>a, *</sup>, Rafael Almar<sup>b</sup>, Denis Morichon<sup>c</sup>, Solène Dealbera<sup>c</sup>, Aritz Abalia<sup>d</sup>, Jennifer Montaño Muñoz<sup>a, e</sup>, Grégoire O. Abessolo<sup>f</sup>, Vincent Regard<sup>a</sup>

<figure><img src="image_3.png" /></figure>

## ARTICLE INFO

### Keywords:

- Coastal monitoring

- Remote sensing

- Hydrodynamics

- Morphology

## ABSTRACT

CoastCams is an open-source collection of existing MATLAB scripts to quantify key wave parameters (e.g., wave height, wave period), mean water levels, and morphology (e.g., shoreline positions) in the nearshore environment. The repository performs the analysis on oblique orthorectified timestack images from land-based coastal monitoring systems. The proposed approach is a combination of several key parameters that aims to get a better understanding of nearshore processes by leveraging the strength of existing codes. CoastCams provides a unified and simplified method that is accessible for coastal managers, engineers, and scientists with a user-friendly and practical method to monitor and identify key drivers in coastal zone. In this paper, we present the standalone remote video-based method and validate the estimated hydro parameters with sensors deployed in the nearshore on a rocky platform in Socoa, France. The software is freely available on GitHub (https://github.com/NuytsSiegmund/CoastCams.git) and is accompanied by step-by-step README documentation.

## 1. Introduction

Coastal zones are dynamic systems which are exposed to various natural hazards (e.g., storm surges), to the effects of global climate change (e.g., sea level rise), and anthropogenic pressures (e.g., urbanisation) (Benveniste et al., 2019). The projected increase in these hazards and coastal urbanisation in the coming years (Li et al., 2018; Leaman et al., 2021), combined with rising sea levels, mean that coastal infrastructure and residents face growing threats, particularly when high tides coincide with intense storms (Oey and Chou, 2016). The response of coastal zones to these factors depends on the characteristics of the forcing agents and the internal properties of the dynamic coastal systems.

To better understand the changes affecting coastal zones, long-term observations of nearshore hydrodynamics, topography, and bathymetry are crucial. However, collecting reliable in-situ measurements in highly dynamic and complex coastal zones is challenging. The interaction of various coastal processes (e.g., tides, waves, currents) can cause rapid

changes in wave climate and sea levels at different spatial and temporal scales (Woodworth et al., 2019). Traditional in-situ measurements and survey techniques often provide spatially and temporally sparse datasets, failing to capture the dynamic behaviour of coastal processes. In addition, existing long-term coastal monitoring programmes, based on in-situ measurements, are limited to only a few sites worldwide (e.g., Barnard et al., 2015; Pianca et al., 2015; Turner et al., 2016). Ideally, coastal monitoring programmes should span years to decades and consider local environmental factors, such as coastal morphology, rates of sea level rise, and nearshore and swash dynamics (Farrell et al., 2021). However, the logistics of field monitoring, including time, cost, and travel, often hinder the collection of high-temporal-resolution datasets. Nonetheless, the advent of commercial, low-cost remote sensing techniques in coastal research has partially overcome this obstacle.

Remote sensing techniques, including radar, satellite imagery, and video cameras, have already successfully been employed in coastal monitoring to measure various parameters. For instance, they have been

<footnote><sup>a</sup> Géosciences Environnement Toulouse, GET, CNRS, UPS, Université de Toulouse, IRD, Toulouse, France</footnote>

<footnote><sup>b</sup> IRD, UMR LEGOS, Toulouse, France</footnote>

<footnote><sup>c</sup> Université de Pau et des Pays de L'Adour, E2S UPPA, SIAME, Anglet, 64600, France</footnote>

<footnote><sup>d</sup> AZTI Marine Research, Basque Research and Technology Alliance (BRTA), 20110, Pasaia, Spain</footnote>

<footnote><sup>e</sup> Auckland Council, Research and Evaluation Unit (RIMU), Level 23, 135 Albert Street, Auckland, 1010, New Zealand</footnote>

<footnote><sup>f</sup> Ecosystems and Fishery Resources Laboratory, Institute of Fisheries and Aquatic Sciences, University of Douala, BP 2701, Douala, Cameroon</footnote>

<footnote>* Corresponding author.</footnote>

<footnote>E-mail address: s.nuyts@deakin.edu.au (S. Nuyts).</footnote>
used for shoreline position detection (Boak and Turner, 2005), intertidal
beach morphology analysis (Uunk et al., 2010; Osorio et al., 2012),
(breaking) wave height estimation (Almar et al., 2012; Chen et al.,
2021), nearshore currents measurements (Radermacher et al., 2014;
Almar et al., 2016) swash zone water level assessment (Ibaceta et al.,
2018), coastal sea level monitoring (Abessolo Ondoa et al., 2019; Thuan
et al., 2019; Abessolo et al., 2020), as well as obtaining bathymetry
estimation through depth-inversion algorithms (Holman and Haller,
2011; Bergsma et al., 2016; Brodie et al., 2018), and wave celerity
(Holman et al., 2013). Other tools have also been developed to address
specific elements of coastal processes, such as sediment transport and
beach profile changes (Li et al., 2002), diffusion of pollution on coastal
waters (Yuan, 2007), and coastal flooding (Smith et al., 2012), to sup-
port coastal managers and decision makers. Furthermore, open-source
tools like CoastSat (Vos et al., 2019) and CASSIE (Almeida et al.,
2021) provide high-temporal-resolution datasets, albeit with lower
spatial resolution. However, accurately measuring multiple key pa-
rameters simultaneously remains a major challenge in comprehensively
monitoring coastal environments.

To address this gap in coastal monitoring, this study introduces CoastCams, an open-source MATLAB software toolkit designed for analysing timestack images collected from fixed video cameras along the coast. While previous efforts, such as the Coastal Imaging Research Network (CIRN), have made strides in providing tools for coastal analysis through a community-GitHub repository (Bruder and Brodie, 2020; Palmsten and Brodie, 2022), CoastCams offers a simplified and unified method to capture multiple key parameters simultaneously from timestack images that complement the existing capabilities of CIRN, including image georectification as well as creating timestack image. A timestack image is obtained by stacking a single cross-shore profile, over a period of time (e.g., 10 min), from snapshots of a region of interest to obtain a singular image. As such, timestack images display the time evolution at a given transect, with the vertical axis represent the cross-shore distance and the horizontal axis representing time (Simarro, 2015).

CoastCams builds upon the foundation laid by CIRN, while expand-
ing on the capabilities by making the codes accessible to estimate
nearshore processes, mean water levels, and morphological changes in a
unified and simplified manner that is accessible to a wide range of users,
i.e., from experts to novices. The toolkit is accompanied by a README
file, a suggested workflow, and recommendations resulting from a case
study discussed in this paper, allowing implementation on any coastline
worldwide. To demonstrate the potential of the toolkit, this study fo-
cuses on the validation of the calculated parameters. The case study
particularly focuses on the hydrodynamic outputs from the toolkit,
allowing CoastCams to be used as a ‘virtual’ tide gauge. More infor-
mation on specific calculations can be found in the code and the
accompanying README file.

The case study's location along a rocky platform proved advanta-
geous in eliminating the uncertainties associated with changing ba-
thymetry, ensuring the accuracy and reliability of the wave conditions
and mean water levels derived from the coastal monitoring system. This
successful validation against in-situ data from the sensors deployed in
the study area highlights the potential of CoastCams to effectively esti-
mate key parameters from coastal monitoring systems. Such positive
outcomes could lead to an extension of traditional in-situ data collection
approaches using in-situ sensors, providing researchers and coastal
managers with a cost-effective and efficient solution to increase the
spatial and temporal data coverage of nearshore processes, as it elimi-
nates the need for deploying and maintaining multiple in-situ sensors in
dynamic and challenging coastal zones.

2. Methodology

2.1. Environmental setting

The coastal monitoring system is deployed on the Fort of Socoa, west of the Saint-Jean-de-Luz bay in the Basque Country of France on the Atlantic Coast (Fig. 1). The system monitors the rocky platform to the west of the Fort of Socoa, which is backed by cliffs representative of the rocky environment along the Basque coast (Prémaillon et al., 2021). Given the north-western cliff orientation and strong refraction on the forereef, the coast at this location is predominately exposed to nearly normal waves induced by North Atlantic swells coming from WNW direction (Fig. 2). The cliff and rocky platform expose the so-called flysch marno-calcaire de Socoa (i.e., marl and limestone flysch formation) (Mulder et al., 2009), a metre-scaled layered lithology, dipping approximately 45°, which shapes the cliff face (Prémaillon et al., 2021).

## 2.2. Wave climate

The statistical analysis of deep-water wave data collected between 2011 and 2021, based on reanalysis data from the European Centre for Medium-Range Weather Forecast (ECMWF), reveals that the wave conditions in the vicinity of Socoa are characterised by a mean annual significant wave height $H_s = 1.36$ m, a mean annual wave period $T_p = 11.21$ s, and a mean annual wave direction of 315° (NW) (Fig. 2). The hydrodynamic characteristics of the area are dominated by semidiurnal tides, with a mean annual tidal range of 2.75 m (min = 0.88 m; max = 4.78 m). This classifies the study area as mesotidal.

## 2.3. Video camera system

The acquisition system comprises two cameras (43° 23′ 45.6324″ N, 1° 41′ 0.7548″ W), with different orientations to capture the rocky platform up to the toe of the cliffs (Camera 1) and offshore areas (Camera 2). The cameras use the KOSTASystem technology developed by AZTI (Liria et al., 2021). The camera calibration and orthorectification method applied to the cameras is based on the study of Holland et al. (1997), and involves a two-step calibration (i.e., intrinsic and extrinsic) to orthorectify the images on a uniform z-plane, obtaining the real xyz-coordinates in UTM, with vertical datum: Lowest Astronomical Tide (Table 1). The bottom-moored pressure sensors deployed during the field campaign (see Section 2.4) served as temporary Ground Control Points (GCPs), in combination of GCP targets at their location, and were positioned along the transect used for creating the timestack images. Their position was taken with a DGPS-RTK, with an accuracy of 5 mm for vertical positioning.

The images were captured using the SIRENA software (Nieto et al., 2010), which generates four types of images from each camera; (1) Snapshot: an instantaneous image; (2) Timex: a single image averaging multiple snapshot images over one period, typically 10 or 15 min, (3) Variance: similarly to timex images, variance images contain the standard deviation computed in time from the same set of snapshots used to generate the timex image; and (4) Timestamp: intensity values saved at each time step at a selected array of pixels (i.e. transect) from snapshot. For this study, only timestack images were used. A transect was considered for each camera along the rocky platform and offshore area in order to generate timestack images, at 2 Hz with a total of 14 min per timestack (Fig. 3). The fixed cross-shore resolution of the timestack images is 0.1 m per pixel (i.e., each pixel equals to 0.1 m length), resulting in a cross-shore distance of 69 m for Camera 1, and 430 m for Camera 2. The specific locations of the transect were chosen here as 1) The wave crest would arrive parallel to the coastline; 2) The environment serves as a typical location of the Basque country rocky cliffs; and 3) It is easily accessible on foot, which aided in the deployment of the pressure sensors.
<figure><img src="image_4.png" /><figcaption>**Fig. 1.** (Top) Location of the study area on the south-west coast of France; (Middle) Aerial photograph of Saint-Jean-de-Luz Bay detailing the Field of View of Camera 1 and Camera 2; and (Bottom) Field of View from Camera 1 (left) and Camera 2 (right) showing the Socoa cliffs.</figcaption></figure>

## 2.4. Field campaign sensors

The Eulerian pressure measurements used here are part of a larger sensor network deployed October 2021. The selected measurement points are five (EZP9 to EZP13) bottom-moored pressure sensors (RBR Virtuoso), located in the intertidal zone along a single transect from the toe of the cliff to the end of the rocky platform (Table 2, Fig. 4). All sensors are continuously recording bottom pressure at 8 Hz, in order to monitor wave climate and water levels. Both the sensors and the camera

cover the same transect, i.e., the continuously submerged rocky platform further offshore and the intertidal area. Incident wave conditions were measured by a Datawell wave buoy over 20 m water depth.

Pressure measurements were first corrected from atmospheric pressure, measured from a weather station approximately 300 m from the study site (i.e., Météo France Station of the semaphore of Socoa - 43°23'39.336" N, 1°41'12.264" W). The pressure time series were organised in 40-min bursts with 50% overlap and converted into free surface elevation using the linear reconstruction method described in
<figure><img src="image_5.png" /><figcaption>**Fig. 2.** Wave rose plot representing data between 2011 and 2021 at Socoa, with data from ECMWF.</figcaption></figure>

**Table 1**

Statistics of intrinsic (focal lengths, principal point, radial distortions, tangential distortions) and extrinsic (azimuth, tilt, roll) image parameters used for camera calibration.

<table><thead><tr><th colspan="2">Camera Parameters</th><th>Camera 1</th><th>Camera 2</th></tr></thead><tbody><tr><td rowspan="4">Intrinsic</td><td>Focal lengths (f<sub>∞</sub>, f<sub>y</sub>) [Pixels]</td><td>(1775.53, 1795.18)</td><td>(2108.65, 2133.84)</td></tr><tr><td>Principal Point (c<sub>x</sub>, c<sub>y</sub>) [Pixels]</td><td>(1231.5, 1027.5)</td><td>(967.5, 507.5)</td></tr><tr><td>Radial distortions (k<sub>1</sub>, k<sub>2</sub>) [ ]</td><td>(-0.321, 0.144)</td><td>(-0.089, 0.328)</td></tr><tr><td>Tangential distortions (p<sub>1</sub>, p<sub>2</sub>) [ ]</td><td>(0.002, -0.00)</td><td>(0.005, -0.004)</td></tr><tr><td rowspan="3">Extrinsic</td><td>Azimuth [°]</td><td>4.341</td><td>5.172</td></tr><tr><td>Tilt [°]</td><td>-0.138</td><td>-0.262</td></tr><tr><td>Roll [°]</td><td>-0.032</td><td>-0.067</td></tr></tbody></table>

Bonneton et al. (2018) (Equation (1)). Next, the spectrum densities were computed using discrete Fourier transform. Short waves (i.e., 0.04–0.4 Hz) components of the significant wave heights are calculated as:

$$H_s = 4 \sqrt{\int_{0.04Hz}^{0.4Hz} E(f) df} \qquad (1)$$

where E(f) denotes the spectrum density value at frequency f.

Finally, mean water depths were computed by averaging the free surface elevation times series for the same bursts and converted into mean water level with vertical reference to the sensors.

## 2.5. Quantification parameters

The timestack images were analysed using in-house (https://github.com/NuytsSiegmund/CoastCams.git) developed MATLAB scripts (version R2020b). The toolkit requires the following toolboxes in MATLAB.

* Image_toolbox;

* Map_toolbox

* Signal_toolbox; and

* Statistics_toolbox.

Fig. 5 shows the workflow of the different steps undertaken in this study and Table 3 gives a detailed overview of the different parameters that were quantified and their method. CoastCams is then an integration of these previously published methods, highlighted in Table 3 and in order to provide a unified and simplified approach. Note that georectified timestack images can be produced with the tools available at CIRN (Bruder and Brodie, 2020).

CoastCams outputs the wave climate parameters, mean water levels, and morphological parameters as a.txt file which can be used for further analysis in other applications.

## 3. Results

Fig. 6 highlights the key parameters from the timestack image estimations with the measurements from the sensors deployed during the

<figure><img src="image_6.png" /><figcaption>**Fig. 3.** a) FoV Camera 1 and location of transect (in red) to construct timestack image ‘e’; b) FoV Camera 2 and location of transect (in green) to construct timestack image ‘d’; and c) Orthorectified snapshot detailing the two transects.</figcaption></figure>
<table><caption>**Table 2**
Overview of the sensors deployed during the monitoring campaign in Socoa.</caption><caption>Overview Sensors Field Campaign</caption><thead><tr><th>Station</th><th>Time period</th><th>Longitude</th><th>Latitude</th><th>Elevation MSL [m]</th><th>Acquisition Frequency</th></tr></thead><tbody><tr><td>Datawell</td><td>05/10–06/11</td><td>1° 40' 54" W</td><td>43° 24' 30" N</td><td>-20</td><td>30 min</td></tr><tr><td>EZP9</td><td>06/10–19/10</td><td>1°41'6.9648" W</td><td>43°23'48.084" N</td><td>-1.81</td><td>8 Hz</td></tr><tr><td>EZP10</td><td>05/10–19/10</td><td>1°41'6.540" W</td><td>43°23'47.220" N</td><td>-1.58</td><td></td></tr><tr><td>EZP11</td><td>05/10–01/11</td><td>1°41'6.4716" W</td><td>43°23'47.148" N</td><td>-1.08</td><td></td></tr><tr><td>EZP12</td><td>05/10–19/10</td><td>1°41'6.2592" W</td><td>43°23'46.824" N</td><td>-1.35</td><td></td></tr><tr><td>EZP13</td><td>05/10–06/11</td><td>1°41'5.7804" W</td><td>43°23'46.176" N</td><td>-1.45</td><td></td></tr></tbody></table>

<figure><img src="image_7.png" /><figcaption>**Fig. 4.** (Top) Map detailing the sensor locations, and (Bottom) bathymetry profile of nearshore area in Socoa, sensor locations, and the full extent of the timestack image of Camera 1. Note that the characteristically flysh layer spacing is visible in both documents.</figcaption></figure>

field campaign. Note that these outputs focus on the hydro parameters as they can be correlated with the analysis from the pressure sensors but that multiple other parameters are analysed with the toolkit as well. In

**Fig. 6**, we present timestack image derived computations for breaking position, mean water level, $H_s$ and $T_p$. The computed mean water level, $H_s$ and $T_p$ are compared with records from the sensor closest to where
<figure><img src="image_8.png" /><figcaption>Fig. 5. Visual representation of the workflow carried out in this study.</figcaption></figure>

these parameters are calculated (e.g., the significant wave height from the timestack images is compared with the pressure sensor closest to the breakpoint location for each time step). The x-axis represents the time period of the field campaign, noting that timestack images were only available during daylight hours (6h–19h) but are shown here as a continuous dataset. Additionally, it is worth noting that occasionally the water level did not reach EZP13 (i.e., sensor closest to breakpoint location) and consequently did not record any data (e.g. 9, 10, and 11 October 2021). The overall distribution of the horizontal errors of the different parameters is presented in Section 3.1, 3.2, and 3.3.

### 3.1. Mean water level

The timestack image-derived mean water level and the in-situ observations have a coefficient of determination ($r^2$) of 0.95 and a Root Mean Square Error (RMSE) of 0.289 m. The overall distribution of the horizontal error for the mean water level is presented in Fig. 7. The Mean Absolute Error (MAE) is 0.55 m, with a standard deviation (Std) of 0.72 m, and a bias of 0 m. From Figs. 6 and 7, it is clear that the mean water level match in time but amplitudes are underestimated by the timestack image estimations compared to the measured values from sensor 13.

### 3.2. Significant wave height

The significant wave height estimated from the timestack images has a $r^2$ = 0.58 with the sensors (Fig. 6). It is only during energetic wave conditions that the timestack images fail to estimate the significant wave height correctly. Indeed, once the significant wave height reaches a height above 1 m, the estimations from the timestack images are not representative. This is mainly due to the length of the transect from Camera 1 and consequently the dimensions of the timestack image. As discussed in Table 2, the wave height is estimated in the breaker zones. As such, the breaker zone should ideally be located within the dimensions of the timestack image. It is, however, clear from Fig. 8 (top) that the breaker zone on 09 October 2021 at 7h45 extends beyond the dimension of the timestack image, resulting in an erroneous estimation of the significant wave height. On 13 October 2021 at 8h30, Fig. 8 (bottom), the significant wave height is indeed correctly estimated from the timestack image.

Fig. 9 details the correlation between the estimation of $H_s$ from the timestack images and the measurements from the pressure sensor. The overall $r^2$ value of $H_s$ is 0.58, with an RMSE = 0.408 m (Fig. 9 – in grey). Selecting the values of $H_s$ ($H_s < 1$ m) that in theory can be determined correctly by the dimensions of the timestack images, allows for a better

understanding of the estimation from this parameter. Fig. 9 (in orange) shows the estimations of $H_s$ that are not restricted by the timestack image dimensions. The $r^2$ increases to $r^2$ = 0.78 and the RMSE decreases to RMSE = 0.162 m, with a lower MAE (MAE = 0.16 m) and a lower standard deviation of Std = 0.17 m. Although the RMSE decreases and the $r^2$ increases, the bias shows that, on average, the estimated values are 0.09 m higher than the values from the pressure sensor. Conversely, after selecting $H_s < 1$ m, on average, the estimated $H_s$ is 0.09 m lower than the $H_s$ measured by the pressure sensors (bias = - 0.09 m).

### 3.3. Peak wave period

The estimation of the peak wave period from the timestack images has a $r^2$ = 0.53 with the measurements from the sensors (Fig. 10). Nevertheless, the peak wave period is approximately normal distributed, with MAE = 1.35 s and the standard deviation Std = 1.71 s, with the toolkit underrepresenting the estimations, on average, by 0.92 s (bias = - 0.92). However, there are a few outliers during lower peak periods ($T_p < 10$ s).

## 4. Discussion

The detailed analysis presented here of timestack image-derived wave climates, mean water levels, and morphological changes, indicates that this low-cost system is suitable for capturing patterns and trends of key parameters in the nearshore. The study conducted on a rocky platform in Socoa, France, provided a valuable opportunity to eliminate some of the uncertainties associated with estimating wave climates, water level changes, and morphological changes from coastal monitoring systems (e.g., changing of bathymetry on sandy coasts). Additionally, the sensors deployed in the cross-shore direction along the rocky platform during the field campaign allow for the identification of shortcomings and recommendations when implementing a similar setup in different locations, as well as the validation of the results.

Firstly, the data point used to derive mean water levels from the timestack images is located in the centre of the FoV of the camera and coincides with the location of pressure sensor EZP13. Fig. 11 indicates that the $r^2$ indeed decreases further away from the camera as well as an increasing RMSE. As a result, it is recommended to extract mean water levels close to the image centre of the camera, while taking into account bottom friction and, potentially, a changing bathymetry when implementing on sandy coasts. Note that the size of the timestack image used for cross-correlation calculations decreases in size in order to eliminate noise near the edge of the timestack images.
<table><caption>**Table 3**
Overview of the existing codes combined in the CoastCams toolkit.</caption><thead><tr><th>Parameter</th><th>Method</th><th>Outputs in CoastCams</th><th>Reference</th></tr></thead><tbody><tr><td>Breakpoint location</td><td>The breakpoint location refers to the location where waves start to break as they approach the shoreline. In this toolkit, the breakpoint location is determined on the timestack images by discriminating the pixel intensity of breaking waves compared to non-breaking waves. The pixel intensity of breaking waves is significantly higher than for non-breaking waves. A threshold is then determined to discriminate between breaking and non-breaking pixels. Pixels above the threshold are grouped by proximity and associated to individual breaking waves.</td><td>- Breakpoint Location [m]<br/>-Depth at breakpoint location [m]</td><td>Almar et al. (2012)</td></tr><tr><td>Wave breaker height</td><td>Once individual breakpoints are localised, the breaker height is extracted based on intensity signals and basic geometrical relations (e.g., length and angle of wave face). Note that wave height can only be determined at the breakpoint location.</td><td>- H<sub>g</sub>: significant wave height [m]<br/>- Dissipated Energy [Joule]<br/>- Roller length [m]</td><td></td></tr><tr><td>Wave celerity<br/>Wave period-</td><td>Initially, timestack images are pre-processed in order to improve the wave intensity signal using a pass-band filter between 0.05 and 0.5 Hz. This removes low-frequency (e.g., variations due to clouds) and high-frequency (e.g., camera adjustments) components. Afterwards, the signal is normalised by dividing the intensity wave signal with the local maximum. Secondly, a temporal cross-correlation method is applied in order to invert timestack images for water depth, which derives wave celerity from temporal cross-correlation. At each location X, a correlation is computed between time series of neighbouring locations ΔX, with a time lag ΔΦ. The use of the time lag ΔΦ results in the wavelength L for an associated wave period, then the wave celerity is computed according to C = L/T.</td><td>- C: wave Celerity [m/s]<br/>- T<sub>p</sub>: peak wave period [s]<br/>- T<sub>m</sub>: Mean wave period [s]<br/>- Wavelength<br/>- Water depth [m]</td><td>Almar et al. (2009)<br/>Almar et al. (2014)<br/>Abessolo Ondoa et al., 2016<br/>Thuan et al. (2019)</td></tr><tr><td>Shoreline Position</td><td>Shoreline positions are estimated using the difference in pixel</td><td>- Average shoreline position [m]</td><td>Andriolo, 2019</td></tr></tbody></table>

<table><caption>**Table 3 (continued)**</caption><thead><tr><th>Parameter</th><th>Method</th><th>Outputs in CoastCams</th><th>Reference</th></tr></thead><tbody><tr><td></td><td>intensity from the water compared to the rocky platform. Timestack images are converted into grayscale, resulting in dark pixels for the rocky platform and lighter pixels for shoreline edges. For sandy coasts, the toolkit also has the difference between the red- and blue- channel. This method calculates the difference in intensity between the red and blue colour channels of the timestack image. The blue channel will show stronger reflection from the water, while the red channel will show stronger reflections from the sand on the beach. By subtracting the blue channel from the red channel, the resulting image will have higher values at shoreline edges. The mean water levels are extracted as a time anomaly of the inverted depth at distinct locations along the timestack image. They are estimated based on the assumption that the reference points correspond to a known vertical distance on the timestack image, i.e., wave height, which has previously been estimated in the toolkit. It uses this information then to quantify sea level variations.</td><td>- Mean water level [m]<br/>- Relative tidal range [m]</td><td>Abessolo Ondoa et al., 2019<br/>Abessolo et al., 2020</td></tr><tr><td></td><td>Bathymetry is derived from the linear dispersion relation for free surface waves using the video-derived wave celerity and wave period. The linear dispersion for free surface waves is a relationship between wave frequency, wavelength, and water depth, and can consequently be used to estimate water depth and bathymetry.</td><td>- Bathymetry [m]</td><td>Bergsma and Almar (2018)<br/>Abessolo et al. (2020)</td></tr></tbody></table>

Secondly, it is recommended to select a transect in the cross-shore direction with a sufficient length in order to always cover the full extent of the breaker zone. Identifying the breaker zone on the timestack images is vital for correctly estimating the wave breaker height (i.e., significant wave height in the breaker zone). As demonstrated in Fig. 6, and the consequent analysis carried out in Section 3.2, indicates that $r^2$ significantly increases (i.e. from $r^2 = 0.58$ to $r^2 = 0.78$) and the RMSE decreases (i.e. from RMSE = 0.408 m to RMSE = 0.162 m) when the timestack image dimensions allow for the breaker zone to be partly included or fully included. Increasing the transect/FoV from the camera would improve the results. It should be noted, however, that merely extending the timestack domain may not entirely resolve this issues, as other factors, such as the type of breaking (e.g., plunging, spilling), can
<figure><img src="image_9.png" /><figcaption>Fig. 6. a) The average timestack image in greyscale together with the breakpoint location (blue), when no breakpoint location could be identified (red), and the shoreline positions (yellow); Comparison of the timestack image estimations with the measurements of the sensors deployed during the field campaign, with in b) The mean water level from the timestack images (black) and the sensors (red); in c) The significant wave height ($H_s$) from the timestack images (black), the sensors when breakpoint location could be identified (solid red), and sensors when no breakpoint location could be identified (empty red); and d) The peak wave period ($T_p$) from the timestack images (black) and the sensors (red); On the x-axis is the time period, with dashed line showing the start of a new day. The vertical grey bars represent times when sensors were not under water.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Fig. 7. Overview of correlation between observed and estimated mean water level, with in a) Scatter plot of the estimated mean water level (x-axis), observed mean water level (y-axis), and the colour bar representing data density; and in b) Probability density function of mean water level estimations.</figcaption></figure>

also influence the accuracy of the estimated parameters. Unfortunately, in this study, Camera 2's maintenance problems prevented it from recording timestack images during significant events, which hindered the elimination of this particular limitation.

Thirdly, using this method the wave height is a function of the camera height, as the wave height takes into account the known geometry of the camera, and therefore their measurement errors are proportional. Hence, the camera height above mean sea level must be determined correctly in order to estimate the wave height correctly.

Lastly, the estimation of the peak wave period has a low $r^2$ due to some outliers during lower peak wave periods. This is caused by choppy wave conditions.

Overall, this study highlights the potential of low-cost camera systems in coastal monitoring, while also pointing out the need for careful consideration of study design and implementation in order to obtain accurate results.
<figure><img src="image_11.png" /><figcaption>Fig. 8. (Top) Timestack image from 09 October 2021 at 7h45; and (Bottom) Timestack image from 13 October 2021 at 8h30.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Fig. 9. Overview of correlation between observed and estimated significant wave height, with in a) Scatter plot of the estimated significant wave height (x-axis), observed significant wave height (y-axis) in grey, in orange the adjusted Hs, and the colour bar representing data density. Also shown are the 1:1 (solid) and regression (dashed) lines; and in b) Probability density function of significant wave height estimations.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Fig. 10. Overview of correlation between observed and estimated peak wave period, with in a) Scatter plot of the estimated peak wave period (x-axis), observed peak wave period (y-axis), and the colour bar representing data density. Also shown are the 1:1 (solid) and regression (dashed) lines; and in b) Probability density function of peak wave period estimations.</figcaption></figure>
<figure><img src="image_14.png" /><figcaption>Fig. 11. r² and RMSE from the tidal elevation from pressure sensor 13 compared to the tidal elevation derived from the timestack images, with on the y-axis the cross-shore distance of the timestack.</figcaption></figure>

## 4.1. Current limitations of the toolkit

* Requirements for the creation of timestack images: To utilise CoastCams, it is necessary to obtain georectified timestack images. These timestack images are not readily available from standard video cameras and require additional processing steps. Users should be aware that the creation of timestack images is an essential prerequisite for utilising the toolkit, e.g., through the CIRN tools;

* Alternative approaches for bathymetry and shoreline estimation: While CoastCams provide a unified approach to estimate multiple key parameters simultaneously, it is important to note that there are alternatives approaches that enable the estimation of 2D-bathymetries by working with full images or videos. It is worth acknowledging that the choice of using timestack images in CoastCams, while useful through the multitude of estimating other key parameters simultaneously, may not represent the most advanced techniques currently available;

* Limited accuracy during low peak wave periods: The method may have limited accuracy during low peak wave periods, as it relies on discriminating between breaking and non-breaking pixels in the timestack images. During low peak wave periods, it may be more

difficult to accurately distinguish between breaking and non-breaking waves, which could affect the accuracy of the estimated parameters;

* Estimating celerity and bathymetry from timestack images: Creating timestack images from the same transect has the drawback that the obtained celerity is projected to the transect. Although it was not apparent during the field campaign, the assumption is that the transect is always in the direction of the wave propagation, which is not always the case since wave direction changes in time;

* Limited measurement capabilities during night-time: The method is dependent on image analysis, which requires daylight conditions to capture the necessary imagery. Therefore, it is not able to measure during night-time, which limits its potential for continues monitoring;

* Restricted identification of the breaker zone: In some cases, the timestack image dimensions were too restricted to accurately identify the breaker zone, which is a key parameter for the estimation of the other parameters. As such, it is important that the timestack image/transect is of sufficient length in order to always capture the full extent of the breaker zone; and
* Dependency on the quality of the timestack images: The accuracy of the estimated parameters is dependent on the properties of the timestack images, which could be affected by various factors such as environmental conditions (e.g., rain, lighting conditions) and camera positions (e.g., height of the camera, FoV, timestack domain).

## 5. Conclusion

This study presents a toolkit to estimate key parameters in the nearshore by leveraging the strength of existing codes and providing a unified and simplified method that can be utilised by a wide range of users. Identifying parameters, such as wave height, mean water levels, and morphological parameters, in the nearshore using a coastal monitoring system will allow us to obtain remotely sensed datasets to better understand coastal processes in a particular location. Historically, measuring these parameters required *in-situ* instruments (e.g., pressure sensors, buoys, wave gauges), which are generally expensive and lead to spatially scarce datasets. Moreover, these instruments are subject to corrosion and biofouling, which increases their maintenance costs.

This publicly available MATLAB code estimated the mean water level with a good degree of accuracy ($r^2 = 0.95$ and $RMSE = 0.289$ m) and the significant wave height that are not restricted by the timestack image dimensions by $r^2 = 0.78$ and $RMSE = 0.162$ m, while also providing the specific location of wave breaking. Therefore, this approach is suitable for use in the swash and surf zone with variations in mean water levels, wave breaking heights, and wave breaking positions. However, errors may arise during low peak wave periods and when the timestack image dimensions are too restricted to identify the breaker zone. In addition, this method is not able to measure during night-time.

The software is easy to use, requires limited inputs from the user, is freely available and open source. For these reasons, *CoastCams* represents a valuable tool for a range of potential users such as researcher evaluating impacts of rising sea levels, hydrodynamic forcing, and shoreline positions in the coastal zone, as well as for coastal managers and policy makers for regulating coastal development or implementing coastal protection.

Overall, the low cost, easy implementation, and automated approach of this method make it suitable for multiple site deployment and targeted evaluation, which could be used to improve model physics and parameterisation. Particularly for those regions that are known to be problematic within model domains (e.g., swash zone). Implementing this method along coasts with different environmental settings will improve the further development and recommendations of the toolbox.

## Software and data availability section

Software name: CoastCams.

Developer: Siegmund Nuyts, Rafael Almar, Jennifer Montaño Muñoz.

Contact information: s.nuyts@deakin.edu.au.

Year first available: 2023.

Program language: MATLAB.

Cost: free.

Software and sample data availability: https://github.com/NuytsSiegmund/CoastCams.git.

Program size: 10.4 MB (code) and 3.70 MB (sample data).

License: GPL-3.0.

## Declaration of competing interest

The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Vincent Regard reports financial support was provided by National Centre for Scientific Research.

## Data availability

The authors do not have permission to share data.

## Acknowledgements

We would like to thank Damien Sous for his input and reviews, and acknowledge funding from Europe through EZPONDA project (FEDER fund) - Études des paramètres mécaniques et chimiques à l'origine de l'altération des falaises rocheuses de la côte basque et des ouvrages de défense - impacts et vitesses d'érosion.

## References

Abessolo, G.O., Almar, R., Bonou, F., Bergsma, E., 2020. Error proxies in video-based depth inversion: temporal cerelity estimation. J. Coast Res. 95 (SI), 1101-1105. https://doi.org/10.2112/SI95-214.1.

Abessolo Ondoa, G., Almar, R., Castelle, B., Testut, L., Léger, F., Sohou, Z., Bonou, F., Bergsma, E.W.J., Meyssignac, B., Larson, M., 2019. Sea level at the coast from video-sensed waves: comparison to tidal gauges and satellite altimetry. J. Atmos. Ocean. Technol. 36 (8), 1591-1603. https://doi.org/10.1175/JTECH-D-18-0203.1.

Abessolo Ondoa, G., Almar, R., Kestenare, E., Bahini, A., Houngue, G.H., Jouanno, J., Du Penhoat, Y., Castelle, B., Melet, A., Meyssignac, B., Anthony, E.J., Laibi, R., Alory, G., Ranasinghe, R., 2016. Potential of video cameras in assessing event and seasonal coastline behaviour: grand popo, Benin (gulf of Guinea). J. Coast Res. 75 (10075), 442-446. https://doi.org/10.2112/SI75-089.1.

Almar, R., Bonneton, P., Senechal, N., Roelvink, D., 2009. Wave cerelity from video imaging: a new method. In: Coastal Engineering 2008. World Scientific Publishing Company, pp. 661-673. https://doi.org/10.1142/9789814277426_0056.

Almar, R., Cienfuegos, R., Catalán, P.A., Michallet, H., Castelle, B., Bonneton, P., Marieu, V., 2012. A new breaking wave height direct estimator from video imagery. Coast Eng. 61, 42-48. https://doi.org/10.1016/j.coastaleng.2011.12.004.

Almar, R., Larnier, S., Castelle, B., Scott, T., Floc'h, F., 2016. On the use of the Radon transform to estimate longshore currents from video imagery. Coast Eng. 114, 301-308. https://doi.org/10.1016/j.coastaleng.2016.04.016.

Almar, R., Michallet, H., Cienfuegos, R., Bonneton, P., Tissier, M., Ruessink, G., 2014. On the use of the Radon Transform in studying nearshore wave dynamics. Coast Eng. 92, 24-30. https://doi.org/10.1016/j.coastaleng.2014.06.008.

Almeida, L.P., Efraim de Oliveira, I., Lyra, R., Scaranto Dazzi, R.L., Martins, V.G., Henrique da Fontoura Klein, A., 2021. Coastal analyst system from space imagery engine (CASSIE): shoreline management module [article]. Environ. Model. Software 140. https://doi.org/10.1016/j.envsoft.2021.105033. Article 105033.

Andriolo, U., 2019. Nearshore wave transformation domains from video imagery. J. Mar. Sci. Eng. 7 (6) https://doi.org/10.3390/jmse7060186.

Barnard, P.L., Short, A.D., Harley, M.D., Splinter, K.D., Vitousek, S., Turner, I.L., Allan, J., Banno, M., Bryan, K.R., Doria, A., Hansen, J.E., Kato, S., Kuriyama, Y., Randall-Goodwin, E., Ruggiero, P., Walker, I.J., Heathfield, D.K., 2015. Coastal vulnerability across the pacific dominated by el nino/southern oscillation. Nat. Geosci. 8 (10), 801-807. https://doi.org/10.1038/ngeo2539.

Benveniste, P.L., Cazenave, A., Vignudelli, S., Fenoglio-Marc, L., Shah, R., Almar, R., Andersen, O., Birol, F., Bonnefond, P., Bouffard, J., Calafat, F., Cardellach, E., Cipollini, P., Le Cozannet, G., Dufau, C., Fernandes, M.J., Frappart, F., Garrison, J., Gommenginger, C., Wöppelmann, G., 2019. Requirements for a coastal hazards observing system. Front. Mar. Sci. 6. https://www.frontiersin.org/articles/10.3389/fmars.2019.00348.

Bergsma, E.W.J., Almar, R., 2018. Video-based depth inversion techniques, a method comparison with synthetic cases. Coast Eng. 138, 199-209. https://doi.org/10.1016/j.coastaleng.2018.04.025.

Bergsma, E.W.J., Conley, D.C., Davidson, M.A., O'Hare, T.J., 2016. Video-based nearshore bathymetry estimation in macro-tidal environments. Mar. Geol. 374, 31-41. https://doi.org/10.1016/j.margeo.2016.02.001.

Boak, E.H., Turner, I.L., 2005. Shoreline definition and detection: a review. J. Coast. Res. 21 (4 (214)), 688-703.

Bonneton, P., Mouragues, A., Lannes, D., Martins, K., Michallet, H., 2018. A simple and accurate nonlinear method for recovering the surface wave elevation from pressure measurements. Coastal Engineering Proceedings 1 (36), 46. https://doi.org/10.9753/icce.v36.waves.46 waves.

Brodie, K.L., Palmsten, M.L., Hesser, T.J., Dickhuud, P.J., Raubenheimer, B., Ladner, H., Elgar, S., 2018. Evaluation of video-based linear depth inversion performance and applications using altimeters and hydrographic surveys in a wide range of environmental conditions. Coast Eng. 136, 147-160. https://doi.org/10.1016/j.coastaleng.2018.01.003.

Bruder, B.L., Brodie, K.L., 2020. CIRN quantitative coastal imaging toolbox. SoftwareX 12, 100582. https://doi.org/10.1016/j.softx.2020.100582.

Chen, J., Pillai, A.C., Johanning, L., Ashton, I., 2021. Using machine learning to derive spatial wave data: a case study for a marine energy site. Environ. Model. Software 142, 105066. https://doi.org/10.1016/j.envsoft.2021.105066.

Farrell, E., Bourke, M., Henry, T., Kindermann, G., Lynch, K., Morley, T., O'Dwyer, B., O'Sullivan, J., Turner, J., 2021. Research 376: from Source To Sink: Responses Of a Coastal Catchment To Large-Scale Changes (Golden Strand Catchment, Achill Island, County Mayo) (978-1-84095-997-0). https://www.epa.ie/publications/research
/water/research-376-from-source-to-sink-responses-of-a-coastal-catchment-to-
large-scale-changes-golden-strand-catchment-achill-island-county-mayo.php.

Holland, K.T., Holman, R.A., Lippmann, T.C., Stanley, J., Plant, N.G., 1997. Practical use of video imagery in nearshore oceanographic field studies. IEEE J. Ocean. Eng. 22, 81-92.

Holman, R., Haller, M., 2011. Remote sensing of the nearshore. Ann. Rev. Mar. Sci. 5. https://doi.org/10.1146/annurev-marine-121211-172408.

Holman, R., Plant, N., Holland, T., 2013. cBathy: a robust algorithm for estimating
nearshore bathymetry. J. Geophys. Res.: Oceans 118 (5), 2595-2609. https://doi.
org/10.1002/jgrc.20199.

Ibaceta, R., Almar, R., Catalán, P.A., Blenkinsopp, C.E., Almeida, L.P., Cienfuegos, R., 2018. Assessing the performance of a low-cost method for video-monitoring the water surface and bed level in the swash zone of natural beaches. Rem. Sens. 10 (1), 49. https://www.mdpi.com/2072-4292/10/1/49.

Leaman, C.K., Harley, M.D., Splinter, K.D., Thran, M.C., Kinsela, M.A., Turner, I.L., 2021. A storm hazard matrix combining coastal flooding and beach erosion. Coast Eng. 170 https://doi.org/10.1016/j.coastaleng.2021.104001, 104001-104001.

Li, L., Barry, D.A., Pattiatchi, C.B., Masselink, G., 2002. Beachwin: modelling groundwater effects on swash sediment transport and beach profile changes [Article]. Environ. Model. Software 17 (3), 313-320. https://doi.org/10.1016/S1364-8152(01)00066-4.

Li, N., Yamazaki, Y., Roeber, V., Cheung, K.F., Chock, G., 2018. Probabilistic mapping of storm-induced coastal inundation for climate change adaptation. Coast Eng. 133, 126-141. https://doi.org/10.1016/j.coastaleng.2017.12.013.

Liria, P., Epelde, I., de Santiago, I., Garnier, R., Abalia Patiño, A., Mader, J., 2021. KOSTASystem, a Coastal Videometry Technology: Development and Applications, 2021/1/.

Mulder, T., Razin, P., Faugeres, J.-c., 2009. Hummocky cross-stratification-like structures in deep-sea turbidites: upper Cretaceous Basque basins (Western Pyrenees, France). Sedimentology 56 (4), 997-1015. https://doi.org/10.1111/j.1365-3091.2008.01014.x.

Nieto, M.A., Garau, B., Balle, S., Simarro, G., Zarruk, G.A., Ortiz, A., Tintoré, J., Álvarez-Ellacuría, A., Gómez-Pujol, L., Orfila, A., 2010. An open source, low cost video-based coastal monitoring system. Earth Surf. Process. Landforms 35 (14), 1712-1719. https://doi.org/10.1002/esp.2025.

Oey, L.-Y., Chou, S., 2016. Evidence of rising and poleward shift of storm surge in western North Pacific in recent decades. J. Geophys. Res.: Oceans 121 (7), 5181-5192. https://doi.org/10.1002/2016JC011777.

Osorio, A.F., Medina, R., Gonzalez, M., 2012. An algorithm for the measurement of shoreline and intertidal beach profiles using video imagery: PSDM. Comput. Geosci. 46, 196-207. https://doi.org/10.1016/j.cageo.2011.12.008.

Palmsten, M.L., Brodie, K.L., 2022. The coastal imaging research network (CIRN). Rem. Sens. 14 (3).

Pianca, C., Holman, R., Siegle, E., 2015. Shoreline variability from days to decades: results of long-term video imaging. J. Geophys. Res.: Oceans 120 (3), 2159-2178. https://doi.org/10.1002/2014JC010329.

Prémaillon, M., Dewez, T.J.B., Regard, V., Rosser, N.J., Carretier, S., Guillen, L., 2021. Conceptual model of fracture-limited sea cliff erosion: erosion of the seaward tilted flyschs of Socoa, Basque Country, France. Earth Surf. Process. Landforms 46 (13), 2690-2709. https://doi.org/10.1002/esp.5201.

Radermacher, M., Wengrove, M., van Thiel de Vries, J., Holman, R., 2014. Applicability of video-derived bathymetry estimates to nearshore current model predictions. J. Coast Res. 70 (10070), 290-295. https://doi.org/10.2112/SI70-049.1.

Simarro, G., et al., 2015. On the use of variance images for runup and shoreline detection. Coast. Eng. 99, 136-147.

Smith, R.A.E., Bates, P.D., Hayes, C., 2012. Evaluation of a coastal flood inundation model using hard and soft data [Article]. Environ. Model. Software 30, 35-46. https://doi.org/10.1016/j.envsoft.2011.11.008.

Thuan, D.H., Almar, R., Marchesiello, P., Viet, N.T., 2019. Video sensing of nearshore bathymetry evolution with error estimate. J. Mar. Sci. Eng. 7 (7) https://doi.org/10.3390/jmse7070233.

Turner, I.L., Harley, M.D., Short, A.D., Simmons, J.A., Bracs, M.A., Phillips, M.S., Splinter, K.D., 2016. A multi-decade dataset of monthly beach profile surveys and inshore wave forcing at Narrabeen, Australia. Sci. Data 3 (1). https://doi.org/10.1038/sdata.2016.24, 160024-160024.

Uunk, L., Wijnberg, K.M., Morelissen, R., 2010. Automated mapping of the intertidal beach bathymetry from video images. Coast Eng. 57 (4), 461-469. https://doi.org/10.1016/j.coastaleng.2009.12.002.

Vos, K., Splinter, K.D., Harley, M.D., Simmons, J.A., Turner, I.L., 2019. CoastSat: a Google Earth Engine-enabled Python toolkit to extract shorelines from publicly available satellite imagery [Article]. Environ. Model. Software 122. https://doi.org/10.1016/j.envsoft.2019.104528. Article 104528.

Woodworth, P.L., Melet, A., Marcos, M., Ray, R.D., Wöppelmann, G., Sasaki, Y.N., Cirano, M., Hibbert, A., Huthnance, J.M., Monserrat, S., Merrifield, M.A., 2019. Forcing factors affecting sea level changes at the coast. Surv. Geophys. 40 (6), 1351-1397. https://doi.org/10.1007/s10712-019-09531-1.

Yuan, D., et al., 2007. Development of an integrated model for assessing the impact of diffuse and point source pollution on coastal waters. Environ. Model. Software 22 (6), 871-879.