remote sensing

Article Wave Peel Tracking: A New Approach for Assessing Surf Amenity and Analysis of Breaking Waves

Michael Thompson 1,* , Ivan Zelich 2, Evan Watterson 3 and Tom E. Baldock 1

1 School of Civil Engineering, The University of Queensland, Brisbane, QLD 4072, ; [email protected] 2 Mathematical Sciences Institute, The Australian National University, Canberra, ACT 2601, Australia; [email protected] 3 Bluecoast Consulting Engineers Pty Ltd., Newcastle, NSW 2300, Australia; [email protected] * Correspondence: [email protected]

Abstract: The creation and protection of surfing breaks along populated coastlines have become a consideration for many councils and governments as surfing breaks are a major driver of tourism. To assess the surf amenity of surfing breaks, a quantitative and objective assessment method is required. A new wave peel tracking (WPT) method has been developed using a -based camera to assess surf amenity by measuring and quantifying potential surfing ride rate, length, duration, speed and direction on a wave-by-wave basis. The wave peel (or “curl” below the wave peak) is the optimal surfing region on a wave, and each wave peel track represents a surfable ride. Wave peel regions are identified, classified and tracked using traditional and machine learning-based   computer vision techniques. The methodology is validated by comparing the rectified wave peel tracks with GPS-measured tracks from surfers in the wave peel regions. The WPT methodology is Citation: Thompson, M.; Zelich, I.; evaluated with data from a and adjacent natural at the Gold , Australia. The reef Watterson, E.; Baldock, T.E. Wave Peel Tracking: A New Approach for produced longer ride lengths than the nearshore region and showed a consistent breaking location Assessing Surf Amenity and Analysis along the reef crest. Spatial maps of the wave peel tracks show the influence of tides on the wave of Breaking Waves. Remote Sens. 2021, breaking patterns andintensity. The WPT algorithm provides a robust, automated method for 13, 3372. https://doi.org/10.3390/ quantifying surf amenity to provide baseline data for surf break conservation. The methodology rs13173372 has potential uses to verify numerical modelling of surf breaks and to assess the impact of coastal development on surf breaks. Academic Editors: Kristen Splinter, Norman Kerle, Stefan Felder and Keywords: wave peel tracking; coastal video imagery; surf amenity; artificial intelligence Nadia Senechal

Received: 29 June 2021 Accepted: 19 August 2021 1. Introduction Published: 25 August 2021 Millions of people worldwide choose to reside near or visit to enjoy surfable

Publisher’s Note: MDPI stays neutral waves. Coastal populations are increasing each year and infrastructure is being constructed with regard to jurisdictional claims in closer to the beach or within the nearshore zone itself. Increased nearshore development published maps and institutional affil- coupled with rising sea levels has led to infrastructure and buildings at risk to erosion from iations. large storm events. This has prompted responses from local councils to develop beach management strategies which can involve large-scale works such as replenishment and building of coastal structures. These works can maintain or improve surf amenity with careful design but can also diminish surf amenity. In the effort to assess surf amenity, one of the main challenges is quantitative and objective assessment. This paper presents Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. a novel automated wave peel tracking (WPT) technique to quantitatively and objectively This article is an open access article assess surf amenity using a shore-based camera. distributed under the terms and Surf amenity has been under threat from coastal developments and natural processes conditions of the Creative Commons in a number of famed surf breaks around the world. One such example is a point break Attribution (CC BY) license (https:// in Bali which was “destroyed” due to a seawall constructed to protect a new high rise [1]. creativecommons.org/licenses/by/ Another famous example of a complex surf amenity issue was the effect of the Tweed River 4.0/). training walls on the Coolangatta beaches (Gold Coast, Australia). Longshore sediment

Remote Sens. 2021, 13, 3372. https://doi.org/10.3390/rs13173372 https://www.mdpi.com/journal/remotesensing Remote Sens. 2021, 13, 3372 2 of 21

transport was interrupted, leading to diminished surf amenity at the previously world- renowned Kirra point break. A carefully designed sand transfer system has since been implemented, which has restored and improved surf amenity to most of the Coolangatta point breaks. This highlights the importance of considering surf amenity in coastal man- agement [2]. Many other surfing breaks face the threat of degradation [3]. The World Surfing Reserve was established to ensure that world class surfing destinations (including the Coolangatta point breaks) are protected in the future [4]. A challenge moving forward is to continue to protect the coastlines from erosion and accommodate growing populations while preserving or creating surf amenity. To achieve this, surf breaks need to be better understood using a quantitative approach that allows objective comparison between other surf breaks and validation of numerical modelling for surf breaks. While surf amenity can be assessed qualitatively by community response from surfers, quantitative assessment is much more insightful and objective. There have been several attempts to quantitively assess surf amenity using visual observations, numerical modelling and remote sensing approaches. From visual observations, the ‘peel angle’ can be extracted by finding the angle between the breakpoint position direction and the wave crest [5]. The peel angle is considered one of the most important surf amenity parameters [6] and has previously been effectively extracted manually from observations of the from images [7–9]. Other important parameters such as the ‘section length’ have been manually analysed from rectified images of the surf zone [10]. Numerical models have been used in New Zealand to define wave breaking envelopes at a surf break and assess how they are affected by morphological change [11]. Numerical modelling has also been used at the Gold Coast, Australia, for providing insight into surf amenity with an approach similar to WPT [12]. Numerical modelling is critical for the future design of effective surfing infrastructure, but requires comprehensive field data for validation, which is presently lacking. Remote sensing techniques are commonly used for assessment of coastal environments and for validation of numerical models. Video timestacks have been used for many years in coastal research [13] to measure or track breaking waves and wave runup [14–17]. Recent methods have involved the use of convolutional neural networks (CNN), for classifying beach states, wave breaker types and estimating wave height and wave period [18–21]. Wave crest tracking has been achieved through using a ‘Mixture of Gaussians’ approach and a spatial transformer network [22,23]. These remote sensing applications in coastal research show the effectiveness of using computer vision techniques to extract wave related data, particularly those involving machine learning. However, none of these applications can directly assess surf amenity. To the authors’ knowledge, the only prior automated and quantitative approaches to assess surf amenity through remote sensing include identification of length and orientation of surfable sandbars, analysis of cumulative wave breaking regions, tracking of bores and the direct tracking of surfers [24–27]. Identification of length and orientation of surfable sandbars and analysis of heat maps of cumulative wave breaking provide good spatial information over a whole surf break, but neither method gives detailed wave-by-wave insight at the precision of individual wave peel regions. Tracking bores allows wave-by- wave insights but cannot provide precise, individual wave peel region data. Tracking surfers provides unique insight into a surfer’s assessment of surfed wave peel regions; however, this method cannot assess surf amenity where there are no surfers and is subject to the ability of the surfer, their style of surfing and crowding of the surf break. The WPT approach solves these issues by tracking the surfable wave peel regions on a wave-by- wave basis. The WPT methodology developed here has been fully tested and verified at a surfable reef and adjacent nearshore region, using video recordings and GPS surfer tracks obtained on the 13th January 2021 from a shore-based CCTV camera on a 12-storey building. WPT data were extracted, rectified and processed to quantify surfing metrics, including average ride duration, average ride length, average ride speed and ride rate, together with spatial maps of the WPTs and ride direction distributions. The WPT results Remote Sens. 2021, 13, 3372 3 of 21

also provide a unique way to analyse wave breaking activity in natural surf zones and has the potential to be used to verify or calibrate numerical models for surf break design. The aim of this paper is to detail the WPT methodology and evaluate it through assessing surf amenity over a reef and nearshore region. This paper is organised as follows: Section2 presents the WPT methodology, including the definition of the wave peel region and description of the applied computer vision and machine learning techniques. A comprehensive description of the field site and the data collected is given in Section3. Quantitative results comparing derived surf metrics on the reef and adjacent surf zone are presented in Section4, together with comparisons from direct GPS tracking of surfers. Section5 provides a discussion of the WPT results, applications of the methodology and future research directions.

2. Methods The quality of surf has long been informally assessed by surfers through visual observation of the peeling edge of a , referred to in this work as a wave peel region. An important feature of quality surf is the presence of surfable, long-duration peeling waves, moving either left or right from a consistent location. Sand bars and hard structure point breaks often shape waves with such desirable wave peel regions. When a surfer is visually assessing the surf conditions, they are effectively ‘wave peel tracking’ to evaluate the potential ride length, ride duration, ride speed and the rate at which they can catch rides. This assessment approach has been used to similar effect manually by Scarfe [9], to trace ‘breaking wave paths’ at key surfing sections for extracting peel angles and peel rates. The work in this paper builds on that approach through the WPT algorithm by providing a more detailed surf amenity assessment automatically at very high temporal and spatial resolution. This is achieved by combining machine learning with traditional computer vision methods, including background subtraction, blob detection, object tracking, convolution neural networks (CNNs) and homography. The required input is a video of the surf zone to be evaluated and the output is a list of -rectified WPTs. A wide range of metrics can then be derived from the WPTs, including average ride duration, average ride length, maximum ride length, average ride speed, ride rate and ride direction. This section details the WPT algorithm, broken up into the following subsections: definition of the wave peel region, motion detection, wave peel region classification, wave peel tracking, rectification and post processing. A video of the WPT process is available to watch, which provides a visual representation of what is described in the following sections (https://youtu.be/vZj_1pZiaI4, accessed on 18 August 2021). All processed videos in this work are available through the YouTube playlist link in the Supplementary Materials of this paper.

2.1. Definition of the Wave Peel Region The wave peel region is defined for this work as illustrated in Figure1 a,b, with the u,v coordinates of the centre of the wave peel region being tracked. This is adapted from the conventional definition of the position of the ‘peel’ used for working out peel angles [5]. The vertical centre (full yellow line) is defined as the intersection of the mean water level with the wave face. This position has been estimated to be either 1/5 or 1/3 of the wave face height [15,28]. The choice of either of these does not matter significantly for rectification given the field of view and the resolution of video generally used; however, a value of 1/5 has been chosen. The horizontal centre (full blue line) is defined to be halfway between the leading edge of whitewater (the lip of the wave) and the start of fully developed whitewater. This definition of the wave peel region is appropriate for both plunging and spilling type waves and is used in the verification process of the WPT software in Section 4.1. Remote Sens. 2021, 13, 3372 4 of 21 Remote Sens. 2021, 13, x FOR PEER REVIEW 4 of 21

FigureFigure 1.1.( a(a)) Manually Manually annotated annotated wave wave peel peel regions regions at at Snapper , Rocks, QLD, QLD, Australia. Australia. ( b(b)) Precise Precise definitiondefinition of of the the wave wave peel peel centre centre for for WPT WPT purposes. purposes. The The vertical vertical centre centre is defined is defined by the by yellow the yellow lines; lines; the horizontal centre is defined by the blue lines (photo from Currumbin Beach QLD, Aus- the horizontal centre is defined by the blue lines (photo from Currumbin Beach QLD, Australia). tralia). 2.2. Motion Detection 2.2. MotionWave crests Detection move with relatively constant celerity towards the shoreline (decelerating very slowly).Wave crests As they move break, with waverelatively peel regionsconstant propagate celerity towards laterally the along shoreline the wave (decelerat- crests. Withing very theappropriate slowly). As viewingthey break, angle, wave wave peel peel regions regions propagate move approximately laterally along horizontally the wave incrests. the camera With the image. appropriate Therefore, viewing background angle, wave subtraction peel regions can be move used approximately as the first step hori- to identifyzontally thein the wave camera peel image. regions Therefore, in a video back sequence.ground subtraction Background can subtraction be used as involves the first takingstep to the identify difference the wave in grayscale peel regions pixel in intensities a video sequence. between twoBackground frames of subtraction a video (e.g., in- differencevolves taking between the difference (a) and (b) in from grayscale Figure pixel2). For intensities this application, between both two grayscaleframes of framesa video were(e.g., blurreddifference with between a 20 × 20(a) pixel and kernel(b) from such Figure that 2). the For breaking this application, wave motion both is detected,grayscale ratherframes than were glint blurred and windwith a ripple 20 × 20 on pixel the surfacekernel such of the that water. the breaking A threshold wave of 3%motion pixel is intensitydetected, differencerather than was glint set and to producewind ripple a binary on the difference surface of image the water. from A the threshold background of 3% subtraction.pixel intensity From difference the binary was difference set to produc image,e blob a binary detection difference [29] is usedimage to from find thethe centre back- ofground regions subtraction. of motion withFrom area the greaterbinary difference than 19 pixels image, (optimal blob detection for this camera [29] is setup).used to This find includesthe centre wave of regions peel regions, of motion breaking with wavearea greater fronts andthan other 19 pixels moving (optimal objects. for Large this camera blobs aresetup). divided This into includes smaller wave blobs peel using regions, an iterative breaking approach wave fronts described and other in Appendix movingA objects.. The centresLarge blobs of all are detected divided blobs into become smaller potential blobs using wave an peel iterative regions. approach In Figure described2b shows in theAp- blobpendix centres A. The overlaid centres as of black all detected dots, derived blobs become from the potential difference wave between peel regions. (a) and (b).In Figure 2b shows the blob centres overlaid as black dots, derived from the difference between (a) 2.3. Wave Peel Region Classification and (b). Each of the potential wave peel region centres (blob centres) is subsequently classified as2.3. a waveWave peelPeel regionRegion orClassification non-wave peel region. A CNN classifier [30] is used to achieve this, where a snapshot of fixed size around each potential wave peel region centre is classified. Each of the potential wave peel region centres (blob centres) is subsequently classi- The classifier was trained on over 1300 labelled images obtained from different surf zones fied as a wave peel region or non-wave peel region. A CNN classifier [30] is used to and days with varying wave and light conditions. None of these labelled images were from achieve this, where a snapshot of fixed size around each potential wave peel region centre the videos of the 13 January 2021, to ensure the CNN had minimal bias. Figure2 shows is classified. The classifier was trained on over 1300 labelled images obtained from differ- how one of the potential wave peel region centres in (b) was correctly classified as a wave ent surf zones and days with varying wave and light conditions. None of these labelled peel region in (c). Further details of the CNN architecture and training and testing process images were from the videos of the 13 January 2021, to ensure the CNN had minimal bias. are given in the AppendixB. Figure 2 shows how one of the potential wave peel region centres in (b) was correctly 2.4.classified Wave Peelas a Trackingwave peel region in (c). Further details of the CNN architecture and training and testing process are given in the Appendix B. The classified wave peel regions are then sequenced to form WPTs. The tracking algorithm used is similar to other tracking algorithms, such as the SORT algorithm [31], but was custom designed to leverage known properties of waves such as the typical wave period. A newly identified wave peel region (object) is assigned to an historical track (track) if it is within a certain distance (in x and y) and within a certain elapsed time (t) of the historical track. In Figure2d illustrates how the wave peel region classified in (c) was assigned to the blue historical track instead of the brown historical track (from the preceding wave) due to being closer in distance and time.

Remote Sens. 2021, 13, 3372 5 of 21 Remote Sens. 2021, 13, x FOR PEER REVIEW 5 of 21

FigureFigure 2. 2.Sequence Sequence ofof imagesimages showingshowing WPTWPT algorithm.algorithm. ((aa)) FrameFrame 1,1, toto bebe comparedcompared withwith frameframe 2.2. (b) Frame 2 with potential wave peel region centres plotted as black dots. (c) Frame 2 with a classi- (b) Frame 2 with potential wave peel region centres plotted as black dots. (c) Frame 2 with a classified fied wave peel region lining up with the circled dot in (b). (d) Frame 2 with plotted historical WPTs. wave peel region lining up with the circled dot in (b). (d) Frame 2 with plotted historical WPTs. The The classified wave peel region in (c) was assigned to the blue track, which was closest in time and classifiedspace. wave peel region in (c) was assigned to the blue track, which was closest in time and space. The distance and elapsed time are represented by the cost function in Equation (1). 2.4. Wave Peel Tracking The distance portion of the cost is a modified Euclidean distance, normalised by the The classified wave peel regions are then sequenced to form WPTs. The tracking al- diagonal length of the image. A length/width parameter Klw was added to scale the cost ofgorithm horizontal used and is similar vertical to distance other tracking in the image.algorithms, For a such low cameraas the SORT angle, algorithm small changes [31], but in was custom designed to leverage known properties of waves such as the typical wave vertical position result in a large spatial difference, and therefore Klw was set to 0.3. This period. A newly identified wave peel region (object) is assigned to an historical track (track) setting also allows faster movement to be tracked laterally along the wave crest. The Kdist coefficientif it is within is a a simple certain way distance to change (in x the and influence y) and within of the distancea certain cost elapsed on the time overall (t) of cost the andhistorical was set track. to 70. In The Figure time 2d cost illustrates is the difference how the wave in time peel normalised region classified by an expiry in (c) periodwas as- (signedTexpiry). to The the expiry blue historical period was track set instead to 60 frames of the brown or 6 s (approximately historical track the(from lower the endpreceding of Tp forwave) surfable due to waves being at closer the Gold in distance Coast). and The time. time cost is multiplied by the Ktime coefficient, whichThe was distance set to 0.5. and The elapsed total cost time threshold are represente is keptd to by 1. the cost function in Equation (1). The distance portion of the cost is a modified Euclidean distance, normalised by the diag- q 2 2 onal length of the image. A length/width((uobject−utrack) ∗parameterKlw) +((vobject 𝐾−v trackwas)∗ (added1−Klw)) to scale the cost of cost = K q dist 2 + 2 horizontal and vertical distance in the image.imagewidth For imagea lowheight camera angle, small changes(1) in tobject−ttrack 𝐾 vertical position result in a large spatial+K difference, and therefore was set to 0.3. This time Texpiry setting also allows faster movement to be tracked laterally along the wave crest. The 𝐾 coefficientEach newly is a simple identified way to wave change peel the region influe isnce checked of the withdistance every cost historical on the overall track and cost theand wave was set peel to region 70. The is time assigned cost is to the the difference historical trackin time that normalised yields the by lowest an expiry cost. period If the cost(𝑇 is never). The less expiry than period 1, a new was track set to is 60 started, frames representingor 6 s (approximately a new wave the lower peel region. end of If𝑇 nofor wave surfable peel waves regions at the have Gold been Coast). assigned The time to an cost historical is multiplied track by for the the 𝐾 duration coefficient, of the expirywhich period,was set thatto 0.5. historical The total track cost is threshold archived is into kept the to output 1. csv file and removed from the historical tracks list. Algorithm 1 summarises the tracking process one frame at a time:

Remote Sens. 2021, 13, 3372 6 of 21

Algorithm 1. 1: While video frames remain in the video: 2: Detect motion regions (blobs) by comparing with an earlier frame 3: Classify any wave peel regions at detected motion regions 4: If wave peel regions were classified: 5: For each classified wave peel region: 6: Assign to an historical track or create a new one 7: Expired historical tracks saved to the output csv file 8: All remaining historical tracks saved to the output csv file

2.5. Rectification The transformation from WPT image coordinates to geospatial coordinates is per- formed using the well-known technique in coastal imagery of planar homography [32]. Often, lens distortion correction is required beforehand. However, distortion was negligible for the high zoom used in this application. For wider-angle camera views, it is important to undistort the image. An invertible homography matrix, H, transforms camera coordinates u,v to mean water level plane coordinates x,y (Equation (2)).         u x h11 h12 h13 x  v  = H ∗  y  =  h21 h22 h23  ∗  y  (2) 1 1 h31 h32 h33 1

It must be noted that Equation (2) can be scaled; indeed, in projective geometry, vectors that are related through a scaling factor are deemed to be equivalent. For example, it is not guaranteed that the right hand will always end up with a 1 in the third component. However, so long as the third component is non-zero, the vector will represent a vector with third component 1 after appropriate scaling. When the third component is 0, this represents a ‘points at infinity’ relative to our setting, and does not have much relevance for our purposes. To determine the homography matrix values, at least 4 sets of corresponding u,v,x,y points must be determined [33]. The values in matrix H are found by an optimisation algorithm with h33 set to 1 (in-built to the OpenCV library). The surveyed u,v,x,y points were obtained at a very low tide of 0 m LAT (Southport predicted tide data) by simultaneous video recording and surveying of the field of view with an RTK GPS mounted on a kayak. The GPS was mounted on a pole, such that the bottom of the pole at the kayak waterline provided visual data at the low tide level, and the top of the GPS provided visual data at the tide level +1 m. On the 17th of September 2020, a total of 10 GPS points were collected over and around the reef and around the adjacent nearshore region. A further 3 GPS points were collected at the mean water level at the shoreline. This survey methodology enabled generation of homography matrices for different tide levels from a single survey. The homography matrix for any tide was approximated by using sets of u,v,x,y points, where the v points were linearly interpolated or extrapolated, based on the 0 and 1 m LAT v points, according to the tide level. Figure3 illustrates the effect of a homography matrix set for one tide level applied to every pixel in a camera image, overlaid on the map image. Figure4 illustrates a visual verification of homography for different tides, where surveyed 0 and 1 m LAT points are represented by the unfilled circles on the map (blue, (a)) and on the image (dark blue and light blue, respectively, (b)). The filled circles in the image are all placed using the homography matrices calculated for each tide level, where the 0 and 1 m homography matrices were calculated from surveyed points and the 2 m homography matrix was calculated from extrapolated points. The homography technique works well, with the 0 and 1 m filled points almost all coinciding with the unfilled surveyed points. In (b), The bottom left and far right regions show some difference between points, because the application of planar homography is prone to greater potential errors at wider angles. The extrapolated 2 m filled points plot as expected, above the 1 m filled points with similar spacing according to the distance from the camera (i.e., closer points to the camera will have greater spacing between tide levels due to the perspective geometry). Remote Sens. 2021, 13, x FOR PEER REVIEW 7 of 21

from a single survey. The homography matrix for any tide was approximated by using sets of u,v,x,y points, where the v points were linearly interpolated or extrapolated, based on the 0 and 1 m LAT v points, according to the tide level. Figure 3 illustrates the effect of a homography matrix set for one tide level applied to every pixel in a camera image, over- laid on the map image.

Remote Sens. 2021, 13, x FOR PEER REVIEW 7 of 21

Remote Sens. 2021, 13, 3372 from a single survey. The homography matrix for any tide was approximated by using7 of 21 sets of u,v,x,y points, where the v points were linearly interpolated or extrapolated, based on the 0 and 1 m LAT v points, according to the tide level. Figure 3 illustrates the effect of Thea homography pixels in the matrix image set had for a one rectified tide level footprint applied of approximately to every pixel in 0.38 a camera m/pixel image, on the over- reef andlaid 0.37on the m/pixel map image. in the nearshore region.

Figure 3. Homography stretching applied to an image (note that the map image is not from the same date as the video image, so sand bars are not expected to line up). The reef is visible as the dark oblong in the upper right of the image.

Figure 4 illustrates a visual verification of homography for different tides, where sur- veyed 0 and 1 m LAT points are represented by the unfilled circles on the map (blue, (a)) and on the image (dark blue and light blue, respectively, (b)). The filled circles in the image are all placed using the homography matrices calculated for each tide level, where the 0 and 1 m homography matrices were calculated from surveyed points and the 2 m homog- raphy matrix was calculated from extrapolated points. The homography technique works well, with the 0 and 1 m filled points almost all coinciding with the unfilled surveyed points. In (b), The bottom left and far right regions show some difference between points, because the application of planar homography is prone to greater potential errors at wider angles. The extrapolated 2 m filled points plot as expected, above the 1 m filled points with similar spacing according to the distance from the camera (i.e., closer points to the Figurecamera 3. Homographywill have greater stretching spacing applied between to an image tide (note(nlevelsote that due the to map the image perspective is not from geometry). the same dateThe aspixels the video in the image, image so had sand a rectified bars are notnotfootprint expectedexpected of totoapproximately lineline up).up). The reef0.38 is m/pixel visible ason thethe the darkdark reef oblongand 0.37 in them/pixel upper in right the of nearshore the image. region. Figure 4 illustrates a visual verification of homography for different tides, where sur- veyed 0 and 1 m LAT points are represented by the unfilled circles on the map (blue, (a)) and on the image (dark blue and light blue, respectively, (b)). The filled circles in the image are all placed using the homography matrices calculated for each tide level, where the 0 and 1 m homography matrices were calculated from surveyed points and the 2 m homog- raphy matrix was calculated from extrapolated points. The homography technique works well, with the 0 and 1 m filled points almost all coinciding with the unfilled surveyed points. In (b), The bottom left and far right regions show some difference between points, because the application of planar homography is prone to greater potential errors at wider angles. The extrapolated 2 m filled points plot as expected, above the 1 m filled points with similar spacing according to the distance from the camera (i.e., closer points to the Figurecamera 4. willGPS have verification greater map spacing (a) and between image (b ).tide Unfilled levels blue due points to the on perspective the map show geometry). surveyed GPS points with corresponding points in the image (dark blue = 0 m LAT, light blue = 1 m LAT). The pixels in the image had a rectified footprint of approximately 0.38 m/pixel on the reef Filledand 0.37 green, m/pixel yellow in and the rednearshore points in region. the image were derived from the homography matrices for 0, 1 and 2 m LAT, respectively. Note that split aerial image (a) is not from the same date as (b), so shoreline sampled points in (b) are not supposed to plot on the shoreline in (a).

The homography matrices for different tides were independently verified on the 13th of January 2021, using data from the GPS surfing verification (Section 4.1). GPS points from surfing rides were compared with rectified locations of the surfers at the still water level (1/5 of wave face) in the video. The root mean square error (RMSE) between all GPS points and image rectified points was 17 m. The accuracy of the GPS watches used by the surfers in absolute position was ≈5 m (see Section 4.1 for details). Over the reef, the RMSE was 20 m and shoreward of the reef the RMSE was 13 m. This verification indicated a strong westerly bias (rectified points were further west than they should be),

and therefore all rectified data in Section4 onwards were shifted 10 m east to correct for this bias. By comparing camera snapshots at the same tide level on the 17 September 2020 and 17 October 2020, it was found that the camera had shifted field of view slightly to

Remote Sens. 2021, 13, 3372 8 of 21

the left and appears to have maintained that position since. Given the NE orientation of the camera, a slight shift to the left is likely the cause for most of the required easterly bias shift of 10 m. Following the bias correction, RMSE changed to 11 m over the reef and 9 m in the nearshore region, with 10 m overall. Most of this remaining inaccuracy is suspected to be from the inaccuracy of the GPS watches. By comparing tides on the rectification day and on the GPS watch verification day, it was found the predicted tide levels varied at most 40 cm (nonlinearly) with the historical tide levels at the Southport tide gauge. The camera line of sight had a depression angle of approximately 5◦, and therefore the projection error could be up to 5 m, which also could account for some of the inaccuracy in rectification. Only predicted tides are available for real-time processing applications, which is what is being tested in this work, and therefore predicted tides were still used. Further accuracy gains could also be made by simply using more rectification points for the homography. However, for the purpose of this work, the rectification accuracy of 10 m RMSE was acceptable.

2.6. Post Processing The final data in rectified MGA94 coordinates were then processed to extract surf amenity metrics. Each individual wave peel track was used as proxy for the maximum possible ride length and duration of a surfer in the wave peel region. Average ride duration, average ride length, maximum ride length, average ride speed, ride directions and the ride rate were chosen as metrics for analysis. Ride duration was calculated as the time difference between the first and last point of each wave peel track. The ride rate was defined as the number of WPTs within a selected area, per minute, averaged over the full video duration (each video was of 10 min duration to ensure a near constant water level). The ride length was calculated as the distance between the first and last point of a WPT, after Gaussian smoothing. The Gaussian smoothing operation was performed to remove any jitter from the data and generate smooth tracks in x,y space. The standard deviation of the Gaussian smoothing found to minimise jitter whilst not severely reducing ride length was 4. The ride speed was simply the ride length divided by the ride duration and the ride direction was the bearing from start point to finish point.

3. Field Site and Data 3.1. Field Site The WPT software was tested on a reef and in the nearshore region of Palm Beach, Gold Coast, Australia, on the 13 January 2021 (Figure5). The Gold Coast regularly receives southerly storm swells during winter (Hs > 1.5 m, Tp > 10 s) and occasional easterly and northerly cyclonic swells during summer (Hs > 3 m, Tp > 10 s). The average significant wave height from 1995 to 2018 was 1.07 m and average peak period was 9.23 s (Tweed Heads wave buoy). The beach has a mixed tide system with tidal range of approximately 2 m and generally forms a longshore bar and trough system [34], with the occasional outer bar appearing after very large swell events. The reef is located 270 m offshore, with its crest submerged approximately 1.5 m below mean sea level. It is 160 m long, 80 m wide and contoured to form a crest 60 m long, aligned at an angle of 35◦ to the prevailing wave direction of 70◦ (as annotated in the top right of Figure5). The reef was constructed of layered rocks, with 1–8 ton boulders forming the submerged armoured surface [35]. A permanent 1280 × 720 pixel CCTV camera set to capture at 10 frames per second (fps) was installed on a high-rise apartment approximately 40 m above sea level and 500 m SW of the reef, providing the camera view shown in yellow in Figure5. All WPT data presented here were extracted from this video camera. The camera view shows the entirety of the water surface above the reef and some of the nearshore region. At very low tide the shoreline is visible in the image. On the 13th of January 2021, an outer bar was present which was a remnant bar from a very large easterly storm swell in December 2020 (Hs > 5 m). Waves at lower tides are expected to break along Remote Sens. 2021, 13, x FOR PEER REVIEW 9 of 21

Remote Sens. 2021, 13, 3372 9 of 21

wave height from 1995 to 2018 was 1.07 m and average peak period was 9.23 s (Tweed Heads wave buoy). The beach has a mixed tide system with tidal range of approximately the2 m reef and crest, generally creating forms potential a longshore surf rides. bar and This trou ride-producinggh system [34], aspect with of the the occasional reef crest outer was usedbar appearing to informally after verify very thelarge positioning swell events. of WPTs.

FigureFigure 5. 5.Location Location of of field field site. site. The The reef reef crest crest is shown is show in greenn in green and camera and camera view is view outlined is outlined in yellow in yellow (snapshot taken from 16 July 2020). White arrow in top right shows prevailing wave direc- (snapshot taken from 16 July 2020). White arrow in top right shows prevailing wave direction of 70◦. tion of 70°. 3.2. Dataset VideoThe reef recordings is located at 10270 fps m wereoffshore, obtained with its from crest 8 to submerged 9 am and12 approximately to 2 pm, divided 1.5 m into be- 10low min mean clips. sea These level. data It is cover 160 m two long, distinct 80 m periodswide and of contoured the tide with to form different a crest cloud 60 m cover long, andaligned wave at conditions. an angle of For 35° both to the time prevailing periods, wave the significant direction waveof 70° height (as annotated was close in tothe 1.14 top mright with of consistent Figure 5). peakThe reef period was of constructed 8 s. The peak of layered wave direction rocks, with was 1–8 close ton to boulders 70◦, roughly form- perpendicularing the submerged to the armoured angle of the surface beach [35]. shoreline. A permanent During the1280 morning × 720 pixel time CCTV period, camera the sun set wasto capture mostly out,at 10 with frames waves per breaking second in(fps) little was wind. installed The tide on wasa high-rise peaking apartment at over 1.8 approxi- m LAT accordingmately 40 to m the above 2021 sea Southport level and tide 500 predictions.m SW of the The reef, afternoon providing time the periodcamera wasview during shown mostlyin yellow cloud in Figure coverwith 5. All choppier WPT data waves presented due to here increased were extracted winds, and from the this tide video was camera. falling fromThe 1.02camera m toview 0.39 shows m LAT. the All entirety results of and the figures water weresurface rectified above usingthe reef the and homography some of the procedurenearshore outlined region. inAt Sectionvery low 2.5 .tide The the analysis shoreline was is based visible on 18in 10the min image. records. On the 13th of January 2021, an outer bar was present which was a remnant bar from a very large easterly 4.storm Results swell in December 2020 (𝐻 > 5 m). Waves at lower tides are expected to break along the reefThis crest, paper creating is concerned potentia withl surf the rides. detailed This analysis ride-producing of the accuracy aspect of of the the WPT reef crest method was andused how to informally the results verify can be the useful positioning for surf of amenity WPTs. assessment, using data from one day (13 January 2021). Long-term WPT data gathered over several months from the CCTV camera3.2. Dataset will be the subject of a future analysis. Video recordings at 10 fps were obtained from 8 to 9 a.m. and 12 to 2 p.m., divided 4.1.into GPS 10 min Surfing clips. Verification These data cover two distinct periods of the tide with different cloud coverThe and WPT wave data conditions. can be robustly For both verified time periods, and evaluated the significant using trackswave height obtained was from close surfersto 1.14 equippedm with consistent with GPS peak tracking period devices. of 8 s. The Data peak were wave collected direction from was four close different to 70°, surfers—threeroughly perpendicular using GPS to wristwatches the angle of (Garmin the beach Forerunner shoreline. 235; During Garmin the Fenix morning 5X Sapphire; time pe- Garminriod, the Fenix sun was 5) and mostly one out, with with a bicycle waves GPSbreaking (Garmin in little Edge wind. 500) The inside tide was a waterproof peaking at container,over 1.8 m fixed LAT to according the tail pad to the of a 2021 . Southpor Onlyt tide 10 ofpredictions. 17 GPS surfer The tracksafternoon were time used, pe- withriod surferwas during tracks mostly not in cloud the wave cover peelwith regionchoppier excluded waves due (>3 to m increased away based winds, on visualand the inspection). Figure6 illustrates the GPS points used for verification. Data from all the GPS devices were sampled at 1 Hz. The watches proved to be more reliable, where the

Remote Sens. 2021, 13, x FOR PEER REVIEW 10 of 21

tide was falling from 1.02 m to 0.39 m LAT. All results and figures were rectified using the homography procedure outlined in Section 2.5. The analysis was based on 18 10 min records.

4. Results This paper is concerned with the detailed analysis of the accuracy of the WPT method and how the results can be useful for surf amenity assessment, using data from one day (13 January 2021). Long-term WPT data gathered over several months from the CCTV camera will be the subject of a future analysis.

4.1. GPS Verification The WPT data can be robustly verified and evaluated using tracks obtained from surfers equipped with GPS tracking devices. Data were collected from four different surf- ers—three using GPS wristwatches (Garmin Forerunner 235; Garmin Fenix 5X Sapphire; Garmin Fenix 5) and one with a bicycle GPS (Garmin Edge 500) inside a waterproof con- Remote Sens. 2021, 13, 3372 tainer, fixed to the tail pad of a surfboard. Only 10 of 17 GPS surfer tracks were used, with10 of 21 surfer tracks not in the wave peel region excluded (>3 m away based on visual inspection). Figure 6 illustrates the GPS points used for verification. Data from all the GPS devices were sampled at 1 Hz. The watches proved to be more reliable, where the bike computer bikein the computer waterproof in thecase waterproofoverheated and case provided overheated corrupted and provided tracks after corrupted approximately tracks 30 after approximatelymin of use. The 30 absolute min of use.accuracy The of absolute one of the accuracy GPS watches of one ofwas the tested GPS by watches repeated was sam- tested bypling repeated at a fixed sampling point over at a several fixed point days. over There several was significant days. There variance was significantin recorded variance posi- intion recorded within positioneach sample within and eachbetween sample differen andt betweensamples of different recorded samples data. Overall, of recorded the GPS data. Overall,watches theprovided GPS watchesdata within provided a radius data of approximately within a radius 4 m, ofwith approximately maximum deviations 4 m, with maximumfrom the fixed deviations position from of theup to fixed 7 m, position so any ofinstantaneous up to 7 m, so position any instantaneous is deemed accurate position is deemedwithin ≈ accurate5 m. within ≈5 m.

Figure 6. Map of GPS surfer tracks, with different colours showing different tracks. The aerial image Figure 6. Map of GPS surfer tracks, with different colours showing different tracks. The aerial image is split from 2 days (neither close to the 13 January 2021) to ensure a bland background to plot tracks isin split the fromnearshore 2 days region, (neither while close still to allowing the 13 January visual verification 2021) to ensure on the a blandreef. Therefore, background sand to bars plot vis- tracks inible the in nearshore the aerial image region, should while be still ignored allowing with visualrespect verification to the tracks. on the reef. Therefore, sand bars visible in the aerial image should be ignored with respect to the tracks. Remote Sens. 2021, 13, x FOR PEER REVIEWGPS tracks in Figure 6 included two from the 8–9 a.m. session (purple and dark blue)11 of 21 andGPS eight tracks from the in Figure12–2 p.m.6 included session. GPS two trac fromks thewere 8–9 collected am session from (purpleboth right-hand and dark rides blue) and(north-westerly eight from the rides) 12–2 and pm left-hand session. rides GPS tracks(south-westerly were collected rides). from Tracks both are right-hand separated as rides (north-westerly rides) and left-hand rides (south-westerly rides). Tracks are separated as eithereither on/beyondon/beyond the reef oror inin thethe nearshorenearshore regionregion (in(in leelee ofof thethe reef). reef). TheThe orange orange GPS GPS tracktrack in in Figure Figure6 was6 was from from a rarea rare break break on on the the outer outer sand sand bar bar on on this this day, day, but but most most breaking break- wavesing waves in the in nearshorethe nearshore region region occurred occurred over over a nearshore a nearshore bar. bar. A detailed A detailed comparison comparison of theof the reef reef WPTs WPTs and and GPS GPS surf surf tracks tracks is illustratedis illustrated in in Figure Figure7, 7, with with differences differences and and errors errors quantifiedquantified in in Table Table1 .1.

FigureFigure 7. 7.Comparison Comparison of of WPTs WPTs with with GPS GPS surfer surfer tracks tracks on on the the reef. reef.-∆ --Δ=- = GPS GPS points; points;-× -×-- = = Gaussian-Gaussian- smoothed WPTs time synchronised with GPS points at 1 Hz. smoothed WPTs time synchronised with GPS points at 1 Hz. Table 1. GPS tracks compared with WPTs in the reef region.

RMSE in Absolute WPT GPS Length Length Dif- Tide Colour Type Position (m) Length (m) (m) ference (%) (m LAT) Aqua right 8 53 66 -20 0.78 Green right 12 24 36 -33 0.72 Yellow right 3 51 56 -9 0.6 Pale Orange right 6 13 14 -7 0.54 All RMSE 1 - 7 - - 20 - 1 RMSE of all points, independent of association to track colours.

All GPS tracks on the reef were right-hand rides. Rideable left-hand waves only occur on the reef occasionally and were not measured in this sampling interval. The overall RMSE value of 7 m was found comparing the GPS track points with the equivalent time synchronised Gaussian-smoothed WPT points. Both the Gaussian-smoothed WPT and GPS track ride lengths were calculated by the Euclidean distance between the first and last point of a track. The Gaussian-smoothed WPT ride lengths on the reef were found on average to be 17% less than the GPS ride lengths, with RMSE of 20%. This overall smaller length for WPTs is mostly an artefact of the Gaussian smoothing of the points. Gaussian smoothing was not removed since it was still required to reduce jitter between wave peel region classifications. The green track had significant error at the start which was sus- pected to be due to GPS inaccuracy. A similar analysis for the nearshore region is illustrated in Figure 8, accompanied by Table 2. GPS tracks in the nearshore region were a mix of rights and lefts. The overall RMSE was 11 m. The Gaussian-smoothed WPT ride lengths on the reef were found on average to be 12% less than the GPS ride lengths, excluding the aqua blue left track which had a greater WPT length than GPS length. Including the aqua blue track, the RMSE of the ride lengths was 19%. Similar to the reef results, Gaussian smoothing produced a slightly shorter WPT length, and therefore WPT ride lengths are considered a conservative measure overall.

Remote Sens. 2021, 13, 3372 11 of 21

Table 1. GPS tracks compared with WPTs in the reef region.

RMSE in Absolute WPT GPS Length Tide Colour Type Position (m) Length (m) Length (m) Difference (%) (m LAT) Aqua right 8 53 66 −20 0.78 Green right 12 24 36 −33 0.72 Yellow right 3 51 56 −9 0.6 Pale Orange right 6 13 14 −7 0.54 All RMSE 1 - 7 - - 20 - 1 RMSE of all points, independent of association to track colours.

All GPS tracks on the reef were right-hand rides. Rideable left-hand waves only occur on the reef occasionally and were not measured in this sampling interval. The overall RMSE value of 7 m was found comparing the GPS track points with the equivalent time synchronised Gaussian-smoothed WPT points. Both the Gaussian-smoothed WPT and GPS track ride lengths were calculated by the Euclidean distance between the first and last point of a track. The Gaussian-smoothed WPT ride lengths on the reef were found on average to be 17% less than the GPS ride lengths, with RMSE of 20%. This overall smaller length for WPTs is mostly an artefact of the Gaussian smoothing of the points. Gaussian smoothing was not removed since it was still required to reduce jitter between wave peel region classifications. The green track had significant error at the start which was suspected to be due to GPS inaccuracy. A similar analysis for the nearshore region is illustrated in Figure8, accompanied by Table2. GPS tracks in the nearshore region were a mix of rights and lefts. The overall RMSE was 11 m. The Gaussian-smoothed WPT ride lengths on the reef were found on average to be 12% less than the GPS ride lengths, excluding the aqua blue left track which had a greater WPT length than GPS length. Including the aqua blue track, the RMSE of the ride lengths was 19%. Similar to the reef results, Gaussian smoothing produced a Remote Sens. 2021, 13, x FOR PEER REVIEW 12 of 21 slightly shorter WPT length, and therefore WPT ride lengths are considered a conservative measure overall.

Figure 8. Comparison of WPTs with GPS surfer tracks in the nearshore region. -Δ- = GPS points; -×- Figure 8. Comparison of WPTs with GPS surfer tracks in the nearshore region. -∆- = GPS points; = Gaussian-smoothed WPTs time synchronised with GPS points at 1 Hz. -×- = Gaussian-smoothed WPTs time synchronised with GPS points at 1 Hz. Table 2. GPS tracks compared with WPTs in the nearshore region.

WPT GPS Length RMSE in Absolute Colour Type Length Length Difference Tide (m LAT) Position (m) (m) (m) (%) Purple 2 Right 9 4 1 300 1.85 Dark Blue 2 Left 2 3 1 200 1.85 Blue Right 14 22 24 -8 0.90 Aqua Blue Left 15 17 13 31 0.90 Orange Right 9 54 61 -11 0.54 Red Left 13 18 22 -18 0.39 All RMSE 1 - 11 - - 19 - 1 RMSE of all points, independent of association to track colours. 2 These GPS devices appeared to be incorrectly stuck on 1 GPS location for the recorded measurements, and therefore length differ- ence measurements were excluded from the RMSE calculation.

For the reef and nearshore region, the RMSE of WPTs was 9 m, which is good given the ≈5 m accuracy of the GPS watches. The majority of WPT ride lengths were shorter than GPS tracks, with RMSE of 20% overall. Further decomposition of the possible sources of inaccuracy was performed through comparing GPS tracks with rectified manually ex- tracted surfer tracks from the video (to estimate rectification accuracy), comparing recti- fied manually extracted surfer tracks from the video with rectified manually extracted WPTs (to estimate ability of surfer to stay in the wave peel region), and comparing recti- fied manually extracted WPTs with rectified algorithm extracted WPTs (to estimate the accuracy of the algorithm). Whilst not entirely summative, this suggests that approxi- mately 50% of the differences between the WPT and GPS tracks was contributed by recti- fication procedures, 15% from surfers deviating from the wave peel region and 35% from inaccuracy of the algorithm. The timings of the WPTs (sampled at 10 Hz) and GPS points (sampled at 1 Hz) were well synchronised and the tracks generally aligned well in plan. Therefore, metrics for ride duration are deemed accurate to within approximately ±1 s. The resolution of the algorithm depends on the frame rate of the video and the rectified field of view of the camera. In this instance, the time resolution was 0.1 s (10 fps) and spatial resolution was within 1 m (according to Section 2.5).

4.2. Metrics Obtained from Wave Peel Tracks Some WPT metrics describing the surf amenity have been separated into hourly tidal ranges of high, mid and mid–low (8–9 am, 12–1 pm and 1–2 pm, respectively). The

Remote Sens. 2021, 13, 3372 12 of 21

Table 2. GPS tracks compared with WPTs in the nearshore region.

RMSE in Absolute Length Colour Type WPT Length (m) GPS Length (m) Tide (m LAT) Position (m) Difference (%) Purple 2 Right 9 4 1 300 1.85 Dark Blue 2 Left 2 3 1 200 1.85 Blue Right 14 22 24 −8 0.90 Aqua Blue Left 15 17 13 31 0.90 Orange Right 9 54 61 −11 0.54 Red Left 13 18 22 −18 0.39 All RMSE 1 - 11 - - 19 - 1 RMSE of all points, independent of association to track colours. 2 These GPS devices appeared to be incorrectly stuck on 1 GPS location for the recorded measurements, and therefore length difference measurements were excluded from the RMSE calculation.

For the reef and nearshore region, the RMSE of WPTs was 9 m, which is good given the ≈5 m accuracy of the GPS watches. The majority of WPT ride lengths were shorter than GPS tracks, with RMSE of 20% overall. Further decomposition of the possible sources of inaccuracy was performed through comparing GPS tracks with rectified manually extracted surfer tracks from the video (to estimate rectification accuracy), comparing rectified manually extracted surfer tracks from the video with rectified manually extracted WPTs (to estimate ability of surfer to stay in the wave peel region), and comparing rectified manually extracted WPTs with rectified algorithm extracted WPTs (to estimate the accuracy of the algorithm). Whilst not entirely summative, this suggests that approximately 50% of the differences between the WPT and GPS tracks was contributed by rectification procedures, 15% from surfers deviating from the wave peel region and 35% from inaccuracy of the algorithm. The timings of the WPTs (sampled at 10 Hz) and GPS points (sampled at 1 Hz) were well synchronised and the tracks generally aligned well in plan. Therefore, metrics for ride duration are deemed accurate to within approximately ±1 s. The resolution of the algorithm depends on the frame rate of the video and the rectified field of view of the camera. In this instance, the time resolution was 0.1 s (10 fps) and spatial resolution was within 1 m (according to Section 2.5).

4.2. Metrics Obtained from Wave Peel Tracks Some WPT metrics describing the surf amenity have been separated into hourly tidal ranges of high, mid and mid–low (8–9 am, 12–1 pm and 1–2 pm, respectively). The variation in tidal range during the falling tide for the 12–1 pm and 1–2 pm data sets was larger, at approximately 0.3 m, compared to the 0.03 m range for the 8–9 am results obtained at high tide. Significant wave height, peak period and wave direction remained relatively constant throughout the day. Table3 shows both the relevant weather data from the local wave buoy and predicted Southport tides, and associated metrics obtained from the WPTs.

Table 3. Summary of WPT data over each hour.

Weather Data 8:00 am–9:00 am 12:00 pm–1:00 pm 1:00 pm–2:00 pm Tidal Range (m LAT) 1.83–1.86–1.84 1.02–0.72 0.66–0.39 Hs(m) 1.14 1.13 1.15 Tp(s) 8 8 8 Peak Direction (deg. N) 70 66 69 Metrics Reef Nearshore 1 Reef Nearshore 1 Reef Nearshore 1 Avg. Ride Duration (s) 7.5 4.8 7.5 4.9 7.5 5.3 Avg. Ride Length (m) 37 14 33 16 32 16 Max. Ride Length (m) 71 47 101 150 113 134 Avg. Ride Speed (m/s) 5 3 4 4 4 3 1 Nearshore data include all WPTs between the reef and the shoreline. Remote Sens. 2021, 13, 3372 13 of 21

The most notable trend in the data is that for all tides, the average ride duration and average ride length on the reef is greater than in the nearshore region. The average ride duration on the reef is approximately 1.5-fold greater than in the nearshore region and the average ride length is approximately 2-fold greater on the reef. These results agree with expectations, given that the reef has a long, fixed crest for waves to break along, providing longer rides than a natural break. The average ride speed was often faster over the reef than in the nearshore region, likely due to waves breaking in slightly deeper water on average than the nearshore region. Maximum ride length generally increased with the falling tide (with the exception of the mid tide in the nearshore region) as the depth reduced to increase shoaling and breaking over the reef. No significant correlation between the maximum wave height at the wave buoy and maximum ride lengths was observed in these data (not shown), but variation of the maximum wave height over the observed period was less than 0.5 m. One potential problem with the WPT approach in the nearshore region was the edges of the field of view causing some WPTs to be cut short. The smallest width of the nearshore region in the field of view was approximately 80 m in the cross-shore direction. The lengths of WPTs in this region in the cross-shore direction were typically much smaller than this length (most in the range of 7–36 m). To check the influence of the field of view cut off, the average metrics were found for the middle third of the nearshore width in the cross-shore direction, where WPTs that started outside this region were excluded and all WPTs up to the boundary of the reef were included. Average ride length, duration and speed only rose by 4%, 1% and 3%, respectively, which was a very small difference. If the maximum nearshore width in the cross-shore direction was significantly smaller, that may have led to problems but the chosen field of view was acceptable. Figure9 illustrates that ride rate was inversely proportional to the tide level over the reef. A small portion of the midday nearshore ride rates was due to choppier wind affected Remote Sens. 2021, 13, x FOR PEER REVIEWwaves, causing more wave peel regions to be present; however, these winds were consistent14 of 21 across the midday time period. While these WPTs had lower duration and shorter length, this did not affect the data significantly.

FigureFigure 9.9. TideTide levellevel vs.vs. rideride ratesrates overover thethe reefreef (8–9(8–9 ama.m. and and 12–2 12–2 pm p.m. only). only).

FigureFigure 1010 illustratesillustrates thethe consistencyconsistency ofof thethe longlong rideride lengthslengths overover thethe reef,reef, despite despite aa lowerlower rideride raterate atat aa higherhigher tidetide level.level. ThisThis alignsaligns withwith expectations,expectations, wherewhere onlyonly thethe largerlarger waveswaves break break on on the the reef reef crest crest due due to depth to depth limited lim breaking.ited breaking. It was Italso was expected also expected that many that moremany rides more would rides would ‘close out’‘close in out’ the in nearshore the nearshore region region compared compared to the to reef. the Averagereef. Average ride lengthsride lengths increased increased in the in nearshore the nearshore region region by approximately by approximately 4 m at 4 lowerm at lower tide, whichtide, which was likelywas likely due todue the to addition the addition of waves of waves breaking breaki onng the on outer the outer bar just bar inside just inside of the of reef. the reef.

Figure 10. Tide level vs. WPT average ride lengths in the nearshore and reef regions.

WPT directions provided additional insight into surf amenity. The proportions of ‘right’ and ‘left’ surfing rides at a surf break is important knowledge for surfers. In Figure 11a illustrates the distribution of WPT directions in the nearshore region. The lefts were in the SW–S directions, rights in the W–NW directions and the normal of the shoreline was WSW. There was a higher proportion of rights which was likely due to the additional rights on the outer sand bank exposed at lower tide levels. This mix of left and right surf- ing rides was also observed during the GPS surfing verification exercise. The distribution of WPT directions was much more consistent over the reef (Figure 11b), with high density near the direction of the reef crest. Most WPTs on the reef had direction E rather than ENE because they started breaking on the north side of the crest and finished breaking on the south side of the crest (see Figure 12b).

Remote Sens. 2021, 13, x FOR PEER REVIEW 14 of 21

Figure 9. Tide level vs. ride rates over the reef (8–9 a.m. and 12–2 p.m. only).

Figure 10 illustrates the consistency of the long ride lengths over the reef, despite a lower ride rate at a higher tide level. This aligns with expectations, where only the larger waves break on the reef crest due to depth limited breaking. It was also expected that

Remote Sens. 2021, 13, 3372 many more rides would ‘close out’ in the nearshore region compared to the reef. Average14 of 21 ride lengths increased in the nearshore region by approximately 4 m at lower tide, which was likely due to the addition of waves breaking on the outer bar just inside of the reef.

FigureFigure 10.10. Tide levellevel vs.vs. WPTWPT averageaverage rideride lengthslengths inin thethe nearshorenearshore andand reefreef regions.regions.

WPTWPT directionsdirections providedprovided additionaladditional insightinsight intointo surfsurf amenity.amenity. TheThe proportionsproportions ofof ‘right’‘right’ and ‘left’ ‘left’ surfing surfing rides rides at at a surf a surf break break is important is important knowledge knowledge for surfers. for surfers. In Figure In Figure11a illustrates 11a illustrates the distribution the distribution of WPT of direct WPTions directions in the innearshore the nearshore region. region. The lefts The were lefts werein the in SW–S the SW–S directions, directions, rights rights in the in the W–NW W–NW directions directions and and the the normal normal of of the shorelineshoreline waswas WSW.WSW. ThereThere waswas aa higherhigher proportionproportion ofof rightsrights whichwhich waswas likelylikely duedue toto thethe additionaladditional rightsrights onon thethe outerouter sand sand bank bank exposed exposed at at lower lower tide tide levels. levels. This This mix mix of of left left and and right right surfing surf- ridesing rides was was also also observed observed during during the the GPS GPS surfing surfing verification verification exercise. exercise. The The distribution distribution of WPTof WPT directions directions was was much much more more consistent consistent over over the the reef reef (Figure (Figure 11 11b),b), with with highhigh densitydensity nearnear thethe directiondirection ofof thethe reefreef crest.crest. Most WPTs onon thethe reefreef hadhad directiondirection EE ratherrather thanthan ENEENE becausebecause theythey startedstarted breakingbreaking onon thethe northnorth sideside ofof thethe crestcrest andand finishedfinished breakingbreaking onon thethe southsouth sideside ofof thethe crestcrest (see(see FigureFigure 1212b).b). One of the most insightful representations of the WPT data is a ride durations map, where WPTs are overlaid and colour coded according to ride duration. Additionally, a rectified time-exposure image of the processed 10 min video clip is overlaid on an aerial image. In Figure 12a illustrates an example ride durations map for a short period of data from 8:30 am to 8:40 am at a tide level of 1.86 m LAT. It must be noted that the start of each WPT will not represent the initial breakpoint, but rather when either a right or a left wave peel region is fully formed. The time and length of a track from initial breakpoint to fully formed wave peel region are very small however (≈1 s, 3 m). The WPTs in the nearshore region of Figure 12a reveal the position of a sand bar. The dark grey/black spots from the time-exposure image show the positioning of the surfers which is commonly at the breakpoint of the larger waves. There were only a few WPTs recorded on the reef, which shows good visual agreement with the location and orientation of the reef crest. In Figure 12b shows the WPTs for a video clip from 12:10 pm to 12:20 pm at a lower tide level of 0.96 m. With shallower water over the reef and nearshore sand bars, many more rides occur, and the start of the tracks (fully formed wave peel region positions) shift further seaward. The outer sand bar shoreward of the reef became shallow enough for wave breaking, revealed by the appearance of WPTs in this region. There were also a small number of shorter WPTs directed SW over the reef. These small-length and -duration SW tracks near the breakpoint indicate a left ride. The small-length and -duration tracks near the middle and W side of the reef also represent left rides. The slightly longer rides on the N tip of the reef were wide breaking right rides. Figure 13 shows a durations map for data from 1:40 pm to 1:50 pm, at an even lower tide level of 0.44 m. The WPTs show greater breaking activity, again shifted further seaward in the nearshore region, on the outer sand bar and on the reef. There are three short WPTs further landward than the well-defined nearshore sand bar. After reviewing the processed video, these were found to represent very small unsurfable WPTs near the zone and had negligible influence on average WPT metrics. Remote Sens. 2021, 13, x FOR PEER REVIEW 15 of 21

Figure 11. WPT direction distributions for nearshore region (a) and reef (b). For the nearshore re- gion, the approximate shoreline angle is shown in yellow, with shoreline normal in black. For the reef, the reef crest angle is shown in brown.

One of the most insightful representations of the WPT data is a ride durations map, RemoteRemote Sens. Sens.2021 2021, 13, 13, 3372, x FOR PEER REVIEWwhere WPTs are overlaid and colour coded according to ride duration. Additionally,15 ofof 21a21

rectified time-exposure image of the processed 10 min video clip is overlaid on an aerial image. In Figure 12a illustrates an example ride durations map for a short period of data from 8:30 am to 8:40 am at a tide level of 1.86 m LAT. It must be noted that the start of each WPT will not represent the initial breakpoint, but rather when either a right or a left wave peel region is fully formed. The time and length of a track from initial breakpoint to fully formed wave peel region are very small however (≈1 s, 3 m). The WPTs in the near- shore region of Figure 12a reveal the position of a sand bar. The dark grey/black spots from the time-exposure image show the positioning of the surfers which is commonly at the breakpoint of the larger waves. There were only a few WPTs recorded on the reef, which shows good visual agreement with the location and orientation of the reef crest. In Figure 12b shows the WPTs for a video clip from 12:10 pm to 12:20 pm at a lower tide level of 0.96 m. With shallower water over the reef and nearshore sand bars, many more rides occur, and the start of the tracks (fully formed wave peel region positions) shift further seaward. The outer sand bar shoreward of the reef became shallow enough for wave breaking, revealed by the appearance of WPTs in this region. There were also a small number of shorter WPTs directed SW over the reef. These small-length and -duration SW tracksFigureFigure near 11.11.WPT WPT the directionbreakpoint direction distributions distributions indicate fora forleft nearshore nearshore ride. The region region small-length (a) ( anda) and reef reefand (b). ( Forb-duration). theFor nearshorethe tracksnearshore region, near re- thethegion, middle approximate the approximate and shorelineW side shoreline of angle the reef is angl shown alsoe is inrepresenshown yellow, in t withyellow, left shorelinerides. with The shoreline normal slightly in normal black. longer Forin ridesblack. the reef,on For the thethe reef, the reef crest angle is shown in brown. Nreef tip crest of the angle reef is shownwere wide in brown. breaking right rides. One of the most insightful representations of the WPT data is a ride durations map, where WPTs are overlaid and colour coded according to ride duration. Additionally, a rectified time-exposure image of the processed 10 min video clip is overlaid on an aerial image. In Figure 12a illustrates an example ride durations map for a short period of data Remote Sens. 2021, 13, x FOR PEER REVIEW 16 of 21 from 8:30 am to 8:40 am at a tide level of 1.86 m LAT. It must be noted that the start of each WPT will not represent the initial breakpoint, but rather when either a right or a left wave peel region is fully formed. The time and length of a track from initial breakpoint to fullyFigure formed 12. Durations wave peel maps region for aretracked very ridessmall betweenhowever 8:30am (≈1 s, 3 andm). The8:40am WPTs at tide in the = 1.86near- m LAT (a) shoreand 12:10 region pm of and Figure 12:20 12a pm reveat tideal the= 0.96 position m LAT of (b a). sand bar. The dark grey/black spots from the time-exposure image show the positioning of the surfers which is commonly at the breakpointFigure 13 of shows the larger a durations waves. There map forwe redata only from a few 1:40 WPTs pm torecorded 1:50 pm, on atthe an reef, even lower whichtide level shows of good0.44 visualm. The agreement WPTs show with greatethe locar tionbreaking and orientation activity, againof the reefshifted crest. further In sea- Figureward in12b the shows nearshore the WPTs region, for a video on the clip outer from sand 12:10 bar pm andto 12:20 on pmthe atreef. a lower There tide are level three short ofWPTs 0.96 m.further With shallowerlandward water than over the thewell-defined reef and nearshore nearshore sand sand bars, bar. many After more reviewing rides the occur, and the start of the tracks (fully formed wave peel region positions) shift further Figureprocessed 12. Durations video, mapsthese for were tracked found rides betweento represent 8:30 am very and 8:40small am unsurfable at tide = 1.86 WPTs m LAT near the seaward. The outer sand bar shoreward of the reef became shallow enough for wave (a) and 12:10 pm and 12:20 pm at tide = 0.96 m LAT (b). breaking,swash zone revealed and had by thenegligible appearance influence of WPTs on inaverage this region. WPT Theremetrics. were also a small number of shorter WPTs directed SW over the reef. These small-length and -duration SW tracks near the breakpoint indicate a left ride. The small-length and -duration tracks near the middle and W side of the reef also represent left rides. The slightly longer rides on the N tip of the reef were wide breaking right rides.

FigureFigure 13. 13.Durations Durations map map for trackedfor tracked rides rides between between 1:40 pm 1:40 and p.m. 1:50 and pm at1:50 tide p.m. = 0.44 at mtide LAT. = 0.44 m LAT.

5. Discussion The automated wave peel tracking methodology outlined here has proven effective for assessing the surf amenity of a reef and nearshore region. The ride metrics demonstrate that ride lengths were longer on the reef compared to the nearshore region for the same incident offshore wave conditions. The WPT data show ride rate inversely proportional to tide level over a fixed depth structure (reef), as expected from depth limited breaking. Plotting WPTs on a spatial map reveals how ride location and direction vary at different tide levels on the reef. These plots also reveal the positions of nearshore and outer sand bars. This work has shown that a standard CCTV camera can be used effectively for ex- tracting WPT data. However, the WPT approach is not limited to fixed CCTV cameras and can be used with any high-resolution camera at a high elevation position [36]. This flexibility, and the ability of the methodology to track WPTs both over well-defined fixed structures and over natural sandbars, enables the proposed WPT methodology to be used to provide a baseline evaluation of the amenity of a natural surf break before any coastal developments are implemented. Following construction, the WPT methodology can then be used at the same location for an objective and quantitative assessment of any changes to the surf amenity. The resolution of the WPT algorithm is dependent on the frame rate of videos and rectified field of view of the camera, in this work 0.1 s and 1 m, respectively. Absolute position of the WPTs is less accurate, but acceptable. All rectified tracks required a 10 m bias offset before WPTs were processed to better align with GPS surfing tracks. This was likely due to a slight camera shift following rectification. For future applications it is sug- gested that the camera be setup with a land survey point in the field of view so that any slight camera shifts can be quantified. Remaining post bias offset rectification inaccuracy was likely from using predicted rather than historical tides for rectification. The GPS surf- ing watches (≈5 m accuracy) were also used to verify the WPT software to 9 m RMSE in terms of absolute position and ride lengths to 20% RMSE of GPS-measured ride lengths. Most WPT ride lengths were slightly shorter than GPS ride lengths. Most of the

Remote Sens. 2021, 13, 3372 16 of 21

5. Discussion The automated wave peel tracking methodology outlined here has proven effective for assessing the surf amenity of a reef and nearshore region. The ride metrics demonstrate that ride lengths were longer on the reef compared to the nearshore region for the same incident offshore wave conditions. The WPT data show ride rate inversely proportional to tide level over a fixed depth structure (reef), as expected from depth limited breaking. Plotting WPTs on a spatial map reveals how ride location and direction vary at different tide levels on the reef. These plots also reveal the positions of nearshore and outer sand bars. This work has shown that a standard CCTV camera can be used effectively for extracting WPT data. However, the WPT approach is not limited to fixed CCTV cameras and can be used with any high-resolution camera at a high elevation position [36]. This flexibility, and the ability of the methodology to track WPTs both over well-defined fixed structures and over natural sandbars, enables the proposed WPT methodology to be used to provide a baseline evaluation of the amenity of a natural surf break before any coastal developments are implemented. Following construction, the WPT methodology can then be used at the same location for an objective and quantitative assessment of any changes to the surf amenity. The resolution of the WPT algorithm is dependent on the frame rate of videos and rectified field of view of the camera, in this work 0.1 s and 1 m, respectively. Absolute position of the WPTs is less accurate, but acceptable. All rectified tracks required a 10 m bias offset before WPTs were processed to better align with GPS surfing tracks. This was likely due to a slight camera shift following rectification. For future applications it is suggested that the camera be setup with a land survey point in the field of view so that any slight camera shifts can be quantified. Remaining post bias offset rectification inaccuracy was likely from using predicted rather than historical tides for rectification. The GPS surfing watches (≈5 m accuracy) were also used to verify the WPT software to 9 m RMSE in terms of absolute position and ride lengths to 20% RMSE of GPS-measured ride lengths. Most WPT ride lengths were slightly shorter than GPS ride lengths. Most of the inaccuracies were likely from rectification (post bias offset) and the WPT algorithm accuracy, with only a small amount of error from the difference in surfer GPS tracks with the true wave peel region. Rectification accuracy could be improved through a greater number of rectification points. It could also be improved by using historical tide readings; however, one aim was to provide data in real time, so predicted tides must be used in that instance. The cross-shore width of the field of view was found to be wide enough such that cut off WPTs at the boundaries did not significantly influence the calculated average WPT surf amenity metrics. To ensure this does not become an issue for other applications, it is suggested that the cross-shore width of the field of view should be at least twice the cross-shore length of the larger WPTs expected. Given the nature of wind and swell waves, and the complexity of different surf and weather conditions, the metrics and maps created from the WPT software require some care in interpretation. Firstly, the WPTs do not always start from the breakpoint, but rather start when right or left wave peel regions are fully formed. Windy conditions can increase the number of wave peel regions, but not all will be rideable. Some spilling breaker WPTs in the videos are not necessarily rideable (dependent on surfer skill). Additionally, WPTs can sometimes be identified very close to the shoreline from waves breaking at the swash zone, which again are not surfable. The classification accuracy of wave peel regions was found to be practically effective, with an accuracy of 87.5% from assessing against an external test set. However, some notable misclassifications were observed. Wakes of boats and jet skis can be tracked in error and some very strong glare can also lead to false tracks on a wave face. The video recordings processed for this paper were not affected by any of these issues apart from one boat wake (this was easily identified in the 8:40–8:50 am video, see Supplementary Materials for video playlist). Some of these issues have been identified from running the WPT software on the same camera over 4 months. For a long-term application of the WPT approach for research purposes, it is suggested that video recordings be quality Remote Sens. 2021, 13, 3372 17 of 21

checked for possible misclassifications before using the WPT data, as done for this work. For real-time production, this is not possible, but given the relatively rare occurrences or predictability of these issues they do not negate the value of the methodology.

Future Improvements and Applications Future improvements to the WPT methodology will be focused on sensitivity analysis of the tracking cost function parameters and other parameters, improving spatial accuracy, and training a more robust CNN classifier against misclassifications. The tracking cost function (Equation (1)), motion detection, classification and post processing parameters give ample control of the WPT algorithm to suit different beach environments (see video playlist in Supplementary Materials for examples); however, having a large number of parameters is not ideal. Sensitivity analysis can be performed in future work to investigate where simplifications in parameters could be made. The CNN model can be improved with regression localisation for more precise WPT centring, and the training dataset can be increased for robustness to misclassifications. Additionally, unsurfable wave peel region images can be added to the training dataset to prevent unsurfable WPTs being produced. A further aim is to develop a regression CNN trained for determining relative wave heights and wave crest angles from each wave peel region. This approach could complement existing methods to estimate surf zone wave heights from remotely sensed video [15,21,37]. To further increase rectification accuracy, post processing can use actual historical tides, including coastal trapped waves and surges, instead of forecast tide predictions (in the scenario where real-time WPT data are not necessary). New applications to research topics are possible with the existing methodology and with the noted future improvements. The WPT duration maps clearly reveal the potential for estimating water depths from the tracks (depth inversion). Further research will focus on using WPT to identify breakpoints, wave heights and wave crest angles, to be applied to the CERC equation [38] for estimating longshore sediment transport rate. Finally, the WPT approach has been successfully applied to laboratory scale models of both natural and an artificial surfing reef in a 3D wave basin. This is being compared to corresponding numerical model results to assist the design of a new artificial surfing reef. In this manner, the WPT approach and the present methodology can be used to validate wave breaking processes through the complete engineering design process of numerical modelling, physical modelling and field assessment.

Supplementary Materials: The following are available online at https://www.mdpi.com/article/10 .3390/rs13173372/s1. The WPT metrics data, WPT durations maps and paper figures are provided in the supplementary data zip file. Videos of the WPT software processing all the data before the bias offset can be found in the following YouTube playlist. The playlist also includes unrectified WPT software processing of other beach videos. https://youtube.com/playlist?list=PLJSOHg6_zTjUk3 nUpN0IAfEGv8Xxsw7RF, accessed on 18 August 2021. Author Contributions: Conceptualisation, M.T. and T.E.B.; methodology, M.T. and I.Z.; software, M.T.; validation, M.T., T.E.B. and E.W.; formal analysis, M.T., T.E.B. and E.W; data curation, M.T.; writing—original draft preparation, M.T.; writing—review and editing, T.E.B., E.W. and I.Z.; supervi- sion, T.E.B.; funding acquisition, E.W. All authors have read and agreed to the published version of the manuscript. Funding: This research was funded by an Australian Government Research Training Program Scholarship and the camera was sourced by the City of Gold Coast. Institutional Review Board Statement: Not applicable. Informed Consent Statement: Informed consent was obtained from all subjects involved in the study. Written informed consent has been obtained from the patients to publish this paper. Data Availability Statement: The data are available on request. Acknowledgments: The authors would like to thank Heiko Loehr and James Lewis from Bluecoast Consulting Engineers for their involvement in providing engineering critique and feedback during Remote Sens. 2021, 13, 3372 18 of 21

stages of development of the WPT software. They have also played a crucial part in the rectification and GPS surfing verification exercises. The authors wish to thank Jord Wiegerink for his involvement in the GPS surfing verification exercise and labelling of the external test set of wave peel regions, Alejandro Astorga Moar for his help in the rectification exercise. The authors would also like to thank Ben Matson from Swellnet who has enabled this research to continue through the use of a live beach camera. Thanks to James Fyvie and Zoe Elliot Perkins for allowing the funding of this project from The City of Gold Coast. Thanks to Simon Brandi Mortensen for his guidance for the WPT idea when it was in its infancy. Thanks to Alex Atkinson and Nick Naderi for labelling of the external test set of wave peel regions and the opportunity to test the WPT software in the wave basin at the Queensland Government Hydraulics Laboratory. Thank you to Darrell Strauss for helpful feedback for WPT data visualisation. Thank you to the State of Queensland, Department of Environment and Science, for supply of the Palm Beach wave buoy data, Tweed Heads wave buoy data and Southport tide data (historical and predicted). https://creativecommons.org/licenses/by/4.0/, accessed on 18 August 2021. Conflicts of Interest: The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analysis, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Appendix A A blob masking iteration process is implemented to handle the case when a very large blob is detected. If an entire breaking bore is represented by a blob, then the blob centre will not accurately capture any possible wave peel region positions. In this case, the blob has to be split, which is performed as follows. After the blob centre is detected, the region Remote Sens. 2021, 13, x FOR PEER REVIEWof the blob around the centre, spanning the bounding box size, is masked out. The motion19 of 21 mask, capturing the entire bore, now has the middle of the mask whited out, leaving two medium sized blobs. The blob detection iteration process then continues to repeat until no more blobs greater than the minimum blob size are detected. This approach means the blobs at the edge of the bore are close to the wave peel regions and can then be classified blobs at the edge of the bore are close to the wave peel regions and can then be classified by the CNN. by the CNN.

AppendixAppendix BB ToTo traintrain thethe successfulsuccessful CNNCNN forfor wavewave peelpeel regionregion classification,classification, 672672 wavewave peelpeel regionregion andand 661661 non-wavenon-wave peelpeel regionregion snapshotssnapshots werewere labelled.labelled. VariationVariation inin labelledlabelled wavewave peelpeel regionsregions includedincluded left-handleft-hand andand right-handright-hand wavewave peelpeel regions,regions, surfedsurfed waves,waves, non-surfednon-surfed waves,waves, dirtydirty water,water, cleanclean water,water, darkdark water,water, dulldull lighting,lighting, brightbright lighting,lighting, varyingvarying wavewave sizes,sizes, glare,glare, plunging,plunging, spilling,spilling, foamyfoamy andand wavewave peelpeel regionsregions breakingbreaking nearnear rocks,rocks, withwith somesome examples illustrated illustrated in in Figure Figure A1. A1 .Variation Variation in inlabelled labelled non-wave non-wave peel peel regions regions in- includedcluded bores bores with with no nowave wave peel peel region, region, surfers surfers with with no wave, no wave, glare glareon a wave on a wavecrest, feath- crest, featheringering waves waves and combinations and combinations of these of these with withthe previously the previously mentioned mentioned conditions. conditions.

FigureFigure A1.A1. Examples of labelled classificationclassification imagesimages asas usedused forfor training.training. Labelled images did not needneed toto bebe veryvery highhigh resolution.resolution.

Snapshots were taken from the reef and nearshore region in this work, Palm Beach beach break near Currumbin Alley, Snapper Rocks point break, break, Currumbin Alley point break, and Rainbow point break, all at the Gold Coast. None of the labelled images were from the 13th January 2021 video footage used in this work to prevent bias. The labelled snapshots varied in size and dimensions, but were kept to a landscape ratio of approximately 3:2 (length:height) to simplify the data labelling process. The data were resized into 52 × 52 pixel images for the CNN. It was found that this image size was efficient for a feed-forward pass of the CNN whilst still allowing practical classi- fication accuracy. Data augmentation involved flipping each image from left to right, and therefore a total of 2666 images were used for training the CNN. The CNN classifier de- sign was a small VGGnet style architecture [39], illustrated in Figure A2. Only two VGG- net convolutional blocks were used, fed into two fully connected layers with dropout added to prevent overfitting. Common and practical design choices for using Tensorflow [40] were used for other aspects of the CNN. For binary classification a sigmoid activation function was used in the output layer. The ReLU activation function was used for all hid- den layers and a binary cross entropy loss function was chosen.

Figure A2. CNN classifier architecture.

Remote Sens. 2021, 13, x FOR PEER REVIEW 19 of 21

blobs at the edge of the bore are close to the wave peel regions and can then be classified by the CNN.

Appendix B To train the successful CNN for wave peel region classification, 672 wave peel region and 661 non-wave peel region snapshots were labelled. Variation in labelled wave peel regions included left-hand and right-hand wave peel regions, surfed waves, non-surfed waves, dirty water, clean water, dark water, dull lighting, bright lighting, varying wave sizes, glare, plunging, spilling, foamy and wave peel regions breaking near rocks, with some examples illustrated in Figure A1. Variation in labelled non-wave peel regions in- cluded bores with no wave peel region, surfers with no wave, glare on a wave crest, feath- ering waves and combinations of these with the previously mentioned conditions.

Remote Sens. 2021, 13, 3372 Figure A1. Examples of labelled classification images as used for training. Labelled images did19 of not 21 need to be very high resolution.

Snapshots were taken from the reef and nearshore region in this work, Palm Beach Snapshots were taken from the reef and nearshore region in this work, Palm Beach beach break near Currumbin Alley, Snapper Rocks point break, Duranbah beach break, beach break near Currumbin Alley, Snapper Rocks point break, Duranbah beach break, Currumbin Alley point break, and Rainbow Bay point break, all at the Gold Coast. None Currumbin Alley point break, and Rainbow Bay point break, all at the Gold Coast. None of the labelled images were from the 13th January 2021 video footage used in this work to of the labelled images were from the 13th January 2021 video footage used in this work prevent bias. The labelled snapshots varied in size and dimensions, but were kept to a to prevent bias. The labelled snapshots varied in size and dimensions, but were kept landscape ratio of approximately 3:2 (length:height) to simplify the data labelling process. to a landscape ratio of approximately 3:2 (length:height) to simplify the data labelling The data were resized into 52 × 52 pixel images for the CNN. It was found that this image process. The data were resized into 52 × 52 pixel images for the CNN. It was found that size was efficient for a feed-forward pass of the CNN whilst still allowing practical classi- this image size was efficient for a feed-forward pass of the CNN whilst still allowing practicalfication accuracy. classification Data accuracy. augmentation Data augmentation involved flipping involved each flipping image from each left image to right, from leftand totherefore right, and a total therefore of 2666 a totalimages of 2666were images used for were training used the for trainingCNN. The the CNN CNN. classifier The CNN de- classifiersign was designa small was VGGnet a small style VGGnet architecture style architecture [39], illustrated [39], illustratedin Figure A2. in Figure Only twoA2. VGG- Only twonet convolutional VGGnet convolutional blocks were blocks used, were fed used, into fedtwo intofully two connected fully connected layers with layers dropout with dropoutadded to added prevent to overfitting. prevent overfitting. Common Commonand practical and design practical choices design for choicesusing Tensorflow for using Tensorflow[40] were used [40] for were other used aspects for other of the aspects CNN. of For the binary CNN. Forclassification binary classification a sigmoid aactivation sigmoid activationfunction was function used in was the used output in the layer. output The layer.ReLU Theactivation ReLU activationfunction was function used for was all used hid- forden all layers hidden and layers a binary and cross a binary entropy cross loss entropy function loss was function chosen. was chosen.

FigureFigure A2.A2. CNNCNN classifierclassifier architecture.architecture.

To evaluate the performance of the CNN classifier and confirm that the labelled wave peel regions used for training were not biased, a separate dataset of 100 wave peel regions and 100 non-wave peel regions were labelled independently by 3 people (including the first author). A 3-way agreement of over 91% was found which shows the consistency in manual classification of wave peel regions. This set of 200 waves is referred to as the external test set. The external test set included a higher proportion of more challenging images than the labelled training data. The labelled training data were randomly split into 76.5% training data, 8.5% validation data and 15% test data. Note, this is not the external test set, rather it is a second validation set for Tensorflow. Training accuracy was 98.47% and test accuracy was 94.91%, which shows initial signs of generalisation of the model. Table A1 shows the confusion matrix from the external test set of 100 wave peel regions and 100 non-wave peel regions.

Table A1. CNN classifier confusion matrix.

Predicted Wave Predicted Non-Wave N = 200 Peel Region Peel Region Actual Wave Peel Region TP1 = 95, 91 FN 1 = 5, 9 Actual Non-Wave Peel Region FP1 = 25, 16 TN 1 = 75, 84 1 The first value is with 0.5 confidence threshold; the second value is with 0.9 confidence threshold. False negatives are very rare and are not detrimental to the algorithm, since the relatively high frame rate allows some contingency. Initially, the number of false positives was fairly high, a large contributor to them was foamy water and almost complete bores. To minimise false positives, the confidence threshold was set to 0.9 instead of 0.5. The second values in Table A1 show that the false positives dropped with this new confidence threshold. Most remaining false positives were exposed rocks and glare which were not present in the footage for this work. External test set accuracy using the confidence threshold of 0.9 was 87.5% which was practically acceptable for WPT (see results in Section4). Remote Sens. 2021, 13, 3372 20 of 21

References 1. Smith, J. Another Fine Wave Destroyed! (This Time, In Bali). Available online: https://stabmag.com/news/another-perfect- wave-destroyed-this-time-in-bali/ (accessed on 21 June 2021). 2. Scarfe, B.; Healy, T.; Rennie, H. Research-Based Surfing Literature for and the Science of Surfing—A Review. J. Coast. Res. 2009, 25, 539–557. [CrossRef] 3. Endangered Waves. Available online: https://www.surfrider.org.au/programs/endangered-waves/ (accessed on 21 June 2021). 4. Mucha, N. It’s Official Gold Coast is the 8th World Surfing Reserve. Available online: http://www.goldcoastworldsurfingreserve. com/ (accessed on 21 June 2021). 5. Walker, J.; Palmer, R.; Kukea, J. Recreational surfing on Hawaiian reefs. In Proceedings of the 13th Coastal Engineering Conference, Vancouver, BC, Canada, 10–14 July 1972; pp. 2609–2628. 6. Scarfe, B.; Elwany, M.; Mead, S.; Black, K. The science of surfing waves and surfing breaks: A review. In Proceedings of the Artificial Surfing Reefs 2003: The 3rd International Conference, Raglan, New Zealand, 23–25 June 2003; pp. 1–12. 7. Black, K.; Mead, S. Design of the Gold Coast Reef for Surfing, Public Amenity and Coastal Protection: Surfing Aspects. J. Coast. Res. 2001, 29, 115–130. 8. Lewis, J.; Hunt, S.; Evans, T. Quantification of Surfing Amenity For Beach Value And Management. In Proceedings of the Coastal Conference, Forster, Australia, 11–13 November 2015. 9. Scarfe, B. Categorising Surfing Manoeuvres Using Wave and Reef Characteristics. Master’s Thesis, The University of Waikato, Hamilton, New Zealand, 2002; p. 181. 10. Moores, A. Using Video Images to Quantify Wave Sections and Surfer Parameters. Master’s Thesis, The University of Waikato, Hamilton, New Zealand, 2001; p. 143. 11. Weppe, S.; Shand, T. Modelling Surf Break Wave Mechanics with SWASH—An application to Mangamaunu Point Break (Kaikoura,¯ New Zealand). In Proceedings of the Australasian & Ports Conference, Hobart, Australia, 10–13 December 2019; pp. 1218–1225. 12. Mortensen, S. Protecting and Enhancing Surf Amenity. Available online: https://www.dhigroup.com/global/news/2015/4 /protecting-and-enhancing-surf-amenity (accessed on 21 June 2021). 13. Aagaard, T.; Holm, J. Digitization of Wave Run-up Using Video Records. J. Coast. Res. 1989, 5, 547–551. 14. Yoo, J.; Fritz, H.; Haas, K.; Work, P.; Barnes, C. Depth Inversion in the Surf Zone with Inclusion of Wave Nonlinearity Using Video-Derived Celerity. J. Waterw. Port Coast. Ocean Eng. 2011, 137, 95–106. [CrossRef] 15. Shand, T.; Bailey, D.; Shand, R. Automated Detection of Breaking Wave Height Using an Optical Technique. J. Coast. Res. 2012, 28, 671–682. 16. Stringari, C.; Harris, D.; Power, H. A novel machine learning algorithm for tracking remotely sensed waves in the surf zone. Coast. Eng. 2019, 147, 149–158. [CrossRef] 17. Andriolo, U. Nearshore Wave Transformation Domains from Video Imagery. J. Mar. Sci. Eng. 2019, 7, 186. [CrossRef] 18. Ellenson, A.; Simmons, J.; Wilson, G.; Hesser, T.; Splinter, K. Beach State Recognition Using Argus Imagery and Convolutional Neural Networks. Remote Sens. 2020, 12, 3953. [CrossRef] 19. Buscombe, D.; Carini, R. A Data-Driven Approach to Classifying Wave Breaking in Infrared Imagery. Remote Sens. 2019, 11, 859. [CrossRef] 20. Stringari, C.; Guimarães, P.; Filipot, J.; Leckler, F.; Duarte, R. Deep neural networks for active wave breaking classification. Sci. Rep. 2021, 11, 3604. [CrossRef][PubMed] 21. Buscombe, D.; Carini, R.; Harrison, S.; Chickadel, C.; Warrick, J. Optical wave gauging using deep neural networks. Coast. Eng. 2020, 155, 103593. [CrossRef] 22. Fung, J. Vision-Based Near-Shore Wave Tracking and Recognition for High Elevation and Aerial Video Cameras. Available online: https://github.com/citrusvanilla/multiplewavetracking_py (accessed on 21 June 2021). 23. Kim, J.; Kim, J.; Kim, T.; Huh, D.; Caires, S. Wave-Tracking in the Surf Zone Using Coastal Video Imagery with Deep Neural Networks. Atmosphere 2020, 11, 304. [CrossRef] 24. Bryan, K.; Davies-Campbell, J.; Hume, T.; Gallop, S. The Influence of Sand Bar Morphology on Surfing Amenity at New Zealand Beach Breaks. J. Coast. Res. 2019, 87 (Suppl. 1), 44–54. [CrossRef] 25. Shand, T.; Weppe, S.; Quilter, P.; Short, A.; Blumberg, B.; Reinen-Hamill, R. Assessing the effect of Earthquake-Induced Uplift and Engineering Works on a Surf Break of National Significance. In Proceedings of the ICCE, Online, 31 December 2020; Volume 36, p. 23. [CrossRef] 26. Mckenzie, S.; Green, R. Gnarometer Surfcam Live Inspector. In Proceedings of the International Conference on Image and Vision Computing, Auckland, New Zealand, 19–21 November 2018; pp. 1–6. [CrossRef] 27. Freeston, B. Real-Time Smart Monitoring and Prediction of Recreational Use and Environmental Data from Ocean Facing CCTV Cameras—Surfzone.ai. Available online: https://www.surfzone.ai/ (accessed on 21 June 2021). 28. Patterson, D. Low Cost Visual Determination of Surfzone Parameters. Master’s Thesis, University of Queensland, Brisbane, Australia, 1985. 29. OpenCV, SimpleBlobDetector Class Reference. Available online: https://docs.opencv.org/3.4/d0/d7a/classcv_1_ 1SimpleBlobDetector.html (accessed on 21 June 2021). Remote Sens. 2021, 13, 3372 21 of 21

30. LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 1998, 86, 2278–2324. [CrossRef] 31. Bewley, A.; Ge, Z.; Ott, L.; Ramos, F.; Upcroft, B. Simple Online and Realtime Tracking. In Proceedings of the IEEE International Conference on Image Processing, Phoenix, AZ, USA, 25–28 September 2016. [CrossRef] 32. Holland, K.; Holman, R.; Lippmann, T.; Stanley, J.; Plant, N. Practical use of video imagery in nearshore oceanographic field studies. IEEE J. Ocean. Eng. 1997, 22, 81–92. [CrossRef] 33. Collins, R. Planar Homographies. Available online: http://www.cse.psu.edu/~{}rtc12/CSE486/lecture16.pdf (accessed on 21 June 2021). 34. Wright, L.; Short, A. Morphodynamic variability of surf zones and beaches: A synthesis. Mar. Geol. 1984, 56, 93–118. [CrossRef] 35. City of Gold Coast, Palm Beach Shoreline Project. Available online: https://www.goldcoast.qld.gov.au/documents/bf/Palm- Beach-shoreline-project-brochure-A4.pdf (accessed on 21 June 2021). 36. Thompson, M.; Watterson, E.; Baldock, T. Assessment of Surf Amenity using Computer Vision with Convolutional Neural Networks to Track Wave Pockets. In Proceedings of the 22nd Australasian Fluid Mechanics Conference, Brisbane, Australia, 7–10 December 2020. [CrossRef] 37. Andriolo, U.; Mendes, D.; Taborda, R. Breaking Wave Height Estimation from Timex Images: Two Methods for Coastal Video Monitoring Systems. Remote Sens. 2020, 12, 204. [CrossRef] 38. Coastal Engineering Research Centre. Shore Protection Manual, 4th ed.; US Army Corps of Engineers: Vicksburg, MI, USA, 1984; Volume 1, pp. 4–96. 39. Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. In Proceedings of the International Conference on Learning Representations, San Diego, CA, USA, 7–9 May 2015; Available online: https://arxiv.org/ abs/1409.1556 (accessed on 18 August 2021). 40. Tensorflow, Convolutional Neural Network (CNN). Available online: https://www.tensorflow.org/tutorials/images/cnn (accessed on 21 June 2021).