Obtaining surface current field from drone imaging

ABSTRACT Knowledge of coastal hydrodynamics is essential for understanding the processes of transport of dissolved or particulate material since in these areas there are large ports and the vessel traffic with a greater possibility of accidents. Studies related to currents are of fundamental importance to support decision-making to mitigate environmental impacts. The present work aims to test the technique of measuring currents through drones, as it has the advantage of a quick response in obtaining and analyzing data. For this study, a field survey was carried out in the region of the mouth of Lagoa dos Patos, RS, Brazil. The method's validation was done through the use of a colored tracer in which it was used to measure the surface current velocities simultaneously with the vectors generated by the drone. The results obtained a percentage difference between the methods of 10%, both for speed and for current direction, showing to be very promising for the use of drones to obtain surface current fields. In this way, it opens a new perspective in carrying out field experiments, so new experiments will be carried out to verify the feasibility of using this technique in different conditions, such as in the surf zone and areas with the presence of density fronts.

the temporal variation of the current.Both methods are widely applied in coastal hydrodynamic studies, each with advantages and disadvantages.
Eulerian measurements require that an instrument be fixed in space and remain there for some time.Speed can be measured by mechanical (rotor), electromagnetic or acoustic methods, and a compass obtains direction.Currently, acoustic Doppler effect current profilers (ADCP) are the most widely used instruments for this, and can also be used in motion with a vessel.Lagrangian methods employ relatively simpler technologies than ADCPs, as they only require tracking the trajectory of a parcel of water, which can be done from the use of triangulation with geographically oriented sights, through the use of GPS receivers attached to buoys, and/or by obtaining sequential images to follow the position of the leads (Poulain et al., 1996;Lumpkin and Pazos, 2007).Another option for measuring surface currents is through the use of remote sensing using highfrequency (HF) and microwave (X-band) radars (Novi et al., 2020).The advantage of this technology is that these instruments are installed on land without the need to use a vessel for data acquisition, in addition to the large sample area, on the other hand, they are much more complex and expensive techniques.
Unmanned aerial vehicles, or drones, are becoming a versatile and low-cost tool for studies of coastal processes, and studies have already demonstrated their feasibility and advantage in coastal studies, for example, using the particle image velocimetry method (PIV), which uses features in the water to obtain surface current velocities.(Perkovic et al., 2009;Eltner et al., 2020;Strelnikova et al., 2020).Stresser et al. (2017), presented a new approach that has the advantage of a fast response, using linear wave dispersion in which it is possible to obtain the surface current field directly from videos generated by low-cost drones, which a priori seems too good to be true and has been tested in recent studies of submesoscale currents (Yurovsky et al., 2022).
The present work aims to test this technique by comparing it with current results obtained with Lagrangian tracings.The methodology used for current vectors of drone images is presented by Stresser et al. (2017), and the application is made by adapting CopterCurrents processing routines in a Matlab environment available on GitHub (https:// github.com/RubenCarrascoAlvarez/CopterCurrents).
A field survey was carried out in the region of the mouth of Lagoa dos Patos, RS, Brazil (Figure 1), on July 30, 2021.During the survey, a drone flight was carried out to record images and a fluorescein dye release.Atmospheric conditions during the survey were cloudy skies and southeasterly wind.The hydrodynamic conditions were ebb, with a current speed of 1.5 m/s recorded by the RS-2 buoy monitoring the SimCosta Project.During the survey, the water properties were measured with a CTD probe, JFE Advantech, and model Rinko, indicating salinity of 28.5 g/kg, the water temperature of 10.8 °C, and turbidity of 120 FTU.
The images were obtained with a drone DJI Phantom IV Pro.The flight was at an altitude of 100 meters, with a camera tilt angle of 90° (nadir).During filming, the drone was kept stationary.The video was obtained with 4K resolution (3840 x 2160 pixels), and an acquisition rate of 24 frames per second (fps).Processing starts with camera calibration to remove lens distortion effects to ensure greater accuracy of results.Subsequently, the video is separated into frames and converted to grayscale.The images are sectored into overlapping quadrangular cells.The size of the cells is arbitrary, which needs to be further explored to relate the resolution of the sectorization with the sea conditions.Data from each cell are processed through Fast Fourier Transform into 2D horizontal space and time (FFT-3D), from the spatiotemporal domain to the spectral domain, thereby obtaining wave number (k) and radian frequency (ω).
Through the wave dispersion equation (Eq.1), where g is the acceleration of gravity (m/s²), k is the wave number (rad/m), h is the water depth and U is the current vector with x and y components, it is possible to obtain the vector of currents (U) that presents components (Ux and Uy) for each cell.

| | (| | ) . tanh g k k h k U ~= +
The wave dispersion relation adjustment technique is applied to separate the spectral energy of the surface waves from the energy relative to the present noise.Current velocity was measured simultaneously using a color tracer.While recording the images, ~50 L of a sodium fluorescein solution concentrated in a line approximately orthogonal to the currents was launched, using a kayak for this.This tracer has a fluorescent green color, allowing for optimal image visualization (Figure 2a).Stresser et al. (2017) validated the procedure for obtaining speed from drone images with data obtained with an onboard ADCP.The comparison speed was obtained below the surface (~ 5 m).In the present case, an advantage of using the tracer is obtaining the exact velocity on the surface.However, the tracer disperses and an increase in the spot as a function of time, which must be considered when obtaining its position.The processing of the images to obtain the position of the tracer spot and the distance traveled was done with the OpenCV library for image manipulation using Python/Jupyter (https://docs.opencv.org/4.x/).An initial frame was selected when the tracer had been fully released, and subsequent frames were at 10 second intervals.The outline of the spot was digitized manually, and then the midpoint of all digitized points was determined to obtain a reference position (Figure 2b).In this procedure, a digital filter is applied to magnify the contrast of the stain with the surrounding medium.
The tracer spot displacement provides the surface current's speed and direction.The interval between two moments is objectively obtained according to the video acquisition rate (fps).To obtain the displacement distance of the stain, it is necessary to determine the size scale of the image pixels.For this, two approaches were used: (1) through the vertical field of view (FOV), which is a parameter obtained from the camera calibration, and (2) using some object present in the image of known dimensions.In the present case, the size of the kayak (3.94 m) was used.The pixel size values obtained were 0.054 and 0.046 m through the FOV method and physical scale, respectively.
Seven consecutive spot positions were determined at 10-second intervals.The total distance covered was 44.7 m, and the average speed from the six intervals was 0.79 ± 0.07 m/s.The velocity vectors generated with the CopterCurrents package from the drone images are shown in Figure 2c.To compare the drift speed of the spot, the vectors marked with red were used.The average speed was 0.68 ± 0.02 m/s.The mean direction from the spot drift and the images was 177° and 159°, respectively.The percentage difference between the methods was 10% for both, speed (13.82%) and current direction (10.71%).Although as a preliminary assessment, the results are very promising for drones to obtain surface current fields.This opens a new perspective  in field experiments, and new field experiments will be carried out to verify the feasibility of using this technique in different conditions, such as in the surf zone and areas with the presence of density fronts.

Figure 1 .
Figure 1.Location of the Patos Lagoon mouth in Southern Brazil.The red box represents the area where the data was collected.
Macedo et al.

Figure 2 .
Figure 2. (a) snapshot from the drone immediately after the dye is released; (b) temporal evolution of the dye drift and scattering, the red dots indicate the drone vectors and the blue dots are the selected points in the dye; and (c) field of current velocity vectors generated after processing.The vectors marked with red indicate those used to compare with the drift data.