Filters and gradient algorithms

Introduction



In this section:

Bathymetric Profile Analysis Filters

The algorithms described are available in the Geocap foot of slope analysis tool. Most of these are common and well known algorithms, and consequently a short description is given.

Resampling
The bathymetric profile is re sampled using a specified interval. The new points are linearly interpolated, and positioned on the straight line between the points of the original line. If the new sampling rate is denser than the original line, several points may be positioned on the same straight line, creating a second derivative equal to zero.

Spline
A variation diminishing spline approximation may also be used on the input points. The algorithm uses a cubic spline with continuous first and second derivative. The result is a smooth line which approximates the input points. The spline is re sampled using the specified interval. This algorithm will give a better result than linear resampling. If more points are introduced between two input points they will not necessarily be placed on the straight line between the input points, creating a zero second derivative, as they would if using linear resampling.

Moving average
The moving average algorithm sets the value of each point to the arithmetic average of itself and its neighbouring points. The number of neighbouring points used in the calculation can be specified as a parameter to the algorithm.

Median filter
The median filter is similar to the moving average filter. The value of each point is set to the median value of itself and its neighbouring points. The number of neighbouring points used in the calculation can be specified as a parameter to the algorithm.

Douglas Peucker
The Douglas Peucker algorithm creates a new line similar to the original input line, with the maximum deviance from the original line less than a given threshold. The Algorithm is an iterative process starting with a single line from the first to the last point of the original line. The point with the greatest deviance is inserted in the new line, until the distance from all the points on the bathymetric profile to the new polygon fulfils the threshold criteria.

When using this algorithm, one should be aware that the resulting line does not necessarily represent the trend of the input points, but rather strives to minimize the distance from the new line to the extreme values of the input line.

Fourier low pass filter
A Fourier low pass filter is common in signal theory. A Fourier transform approximates the input profile with a sum of sine and cosine functions of different frequencies. When using a Fourier low pass filter, only the sine and cosine parts with a lower frequency than the cut off frequency are used in the approximation. The result is a smoothened version of the input profile. When the cutoff frequency is raised, more details are introduced in the output profile.

Computing the gradient and the change of gradient

Two methods for calculating the change of gradient are introduced here. The first algorithm is quite commonly known. The second one is introduced by Geocap, and therefore described in more detail. It is called the "Geocap change of average gradient" method

Finite differences
Using Finite differences is the most common approximation of the derivative and second derivative. More details about this is described in the Appendix.

The method uses the neighboring points of each point in order to compute the gradient and the change of gradient. The input to this algorithm should have a regular sampling. So if the input is not regularly sampled, the linear resampling, or the spline resampling should be preformed on the dataset before this calculation.

The algorithm is quite sensitive to noise because the computation involves only a few points. In order to see trends in the data, the average gradient, and the change of average gradient should be used in stead.

Average Gradient
The average Gradient may be computed for the points on the bathymetric profile. This method will compute the average gradient in an interval around each point, with the point at the center of the interval. The length of this interval may be specified by the user. Technical issues regarding this calculation is explained in the Appendix.

Geocap Change of Average Gradient
The change of average gradient was developed by Geocap when having been confronted with the need for a method working on a larger interval than the finite differences method. In order to compute the change of gradient at a point, the method uses the average gradient in a given interval before and after the point, and compares the two to determine the change of gradient in that point. The details of this algorithm can be read in the appendix.

The results of this algorithm are similar to the second derivative of the input function, except that the algorithm identifies changes in tendencies, rather than local variations. The sensitivity of the algorithm is adjusted by changing the size of the average gradient interval.

If the average gradient calculation interval is set to the sampling rate of the input points, the change of gradient is reduced to the finite difference method.