# A one-dimensional slope detection approach

## Abstract

This paper extends the scale-invariant edge detector to the one-dimensional slope. It can accurately detect the slope and estimate its parameters. The method has been verified with several mathematical functions, sample sizes, and noise levels. A contrast-invariant operator is proposed to suppress noise. The inter-sample localization and interpolation greatly improve the accuracy. The proposed slope detector is also suitable for real-world signals. In additional to above-mentioned, a threshold formula is developed for the first derivative slope detector, and the upper-bound of the filterable noise level is also explored.

## Introduction

This paper concerns the slope detection of one-dimensional discrete signals (Oppenheim and Willsky 1983). The one-dimensional slope detection shares some common problems (e.g. noise suppression, threshold selection) with the two-dimensional case (Bansal et al. 2012, Pinho and Almeida 2012). This paper is dedicated to these problems.

The edge detection has attracted the attention of many researchers. To suppress signal noise, Witkin proposed a scale space by convolving the input signal with the Gaussian distribution function (Witkin 1983). Canny treated the first derivative of the Gaussian distribution function as one-dimensional edge detector (Canny 1986). Marr et al. studied edge detection using the zero crossing of the second derivative of the Gaussian (Marr 1980). Zhang et al. found a scale-invariant edge detector (Zhang and Liu 2013).

Although two-dimensional edge detection is a well-established subject, however, it seems that the slope of one-dimensional discrete signal is seldom studied. The first derivative operator is a seemingly easy solution. This paper will discuss its problems in detail, and give the remedies. Noise suppression is an important subject of slope detection. Inspired by a contrast-invariant differential operator (Zhang and Liu 2013), a method capable of effectively differentiating noise and slope is proposed. The selection of the smoothing scale is another major problem of many existing methods. The scale-invariant edge detector can address the issue by automatically choosing the adequate scale for each edge feature. This research extends the technique to the one-dimensional slope detection. Because of the apparent distinction between the one dimensional and the two dimensional signals, the scale-invariant edge detector is adjusted for the slope with additional functions of inter-sample localization and interpolation. The proposed method is suitable for several broad classifications of signals: noisy and noiseless, periodic and non-periodic, densely and sparsely sampled.

## One dimensional slope detection

### Signal representation

An ideal slope function is needed to investigate detectors quantitatively. The function is characterized by a position, contrast, offset, and width parameters (Figure 1). These parameters can be modeled by the x 0, c, d, and w constant parameters of an error function (Equation 1).

$\begin{array}{ll}\mathit{\text{slope}}\left(x;c,d,w,{x}_{0}\right)& =c{\int }_{-\infty }^{x-{x}_{0}}\frac{{e}^{\frac{-{\xi }^{2}}{2{w}^{2}}}}{\sqrt{2\pi }w}\mathit{d\xi }+d\\ =\frac{c}{2}\left(1+\mathit{erf}\left(\frac{x-{x}_{0}}{\sqrt{2}w}\right)\right)+d\end{array}$
(1)

A step is just a special ideal slope with zero width (Equation 2), therefore all forthcoming discussions are equally applicable.

$\mathit{\text{step}}\left(x;c,d\right)=\underset{w\to 0}{lim}\mathit{\text{slope}}\left(x;c,d,w\right)$
(2)

For a function f having the shape of a slope, two steps are involved to acquire a slope of width w, contrast c, position x 0 , and offset d, as shown in Equation 3. The min and max functions return minimum and maximum value of their inputs. The discussion is based on the ideal slope (Zhang and Liu 2013), and the result is verified by several slope functions.

$\begin{array}{l}y=f\left(\frac{x-{x}_{0}}{w}\right)\\ y=\frac{y-min\left(y\right)}{max\left(y\right)}×c+d\end{array}$
(3)

Convolving the input slope function and the Gaussian distribution function results in the scale space (Equation 4) of the input signal where the σ represents the scale. It is easy to verify that the L function is also an error function.

$L\left(x,\sigma ;c,d,w,{x}_{0}\right)=\mathit{slope}\left(x;c,d,w,{x}_{0}\right)\ast \frac{{\mathrm{e}}^{-\frac{{x}^{2}}{2{\sigma }^{2}}}}{\sqrt{2\pi }\sigma }$
(4)

The error function has nice properties. For example, with a variable substitute (Equation 6), both the error function and its scale space are solutions of the heat equation:

${u}_{t}=\frac{1}{2}{\nabla }^{2}u$
(5)
$w=\sqrt{t}$
(6)

Because the scale space of the ideal slope and its differential operators are represented in closed-form, further investigation can be carried out.

### Scale and spatial detector

The Lx operator is used in this paper to denote the scale-normalized derivative of L with respect to x (Equation 7). The scale-normalization is necessary for a scale-invariant detector (Zhang and Liu 2013). The derivative of Lx with respect to scale is shown in Equation 8.

$\mathit{Lx}=\sigma ×{L}_{x}$
(7)
$\mathit{Lxs}=\sigma ×L{x}_{\sigma }=\sigma ×{\left(\sigma ×{L}_{x}\right)}_{\sigma }$
(8)

To detect a slope on a specific scale, the operator should have a local extremum along the scale coordinate axis. In order to show that Lxs satisfies the requirement, Equation 9 (Zhang and Liu 2013) is used to substitute variables. The ξ and Q can be treated as scale-normalized x and w.

$\xi =\frac{x-{x}_{0}}{\sigma },Q=\frac{w}{\sigma }$
(9)

Figure 2 shows the variable substituted version of Lx and Lxs. The Lx operator has a local extremum along the ξ coordinate axis, and the Lxs operator has a local extremum along the Q coordinate axis.

The location of Q is solved by taking the derivative of Lxs with respect to Q and evaluating to zero (Equation 10).

$\mathit{Lx}{s}_{Q}{|}_{\xi =0}=0\to Q=\sqrt{2}$
(10)

The same thing can be illustrated by Figure 3. Using planes ξ=0 and Q=sqrt(2) to intersect Lx and Lxs results in curves. The diagram in the upper left quadrant of Figure 3 shows Lx lacking a local extremum along Q coordinate axis. On the other hand, Lxs has a local extremum along Q coordinate axis (upper right quadrant). From the diagrams in the lower left and lower right quadrants of Figure 3, it seems that both operators having a local extreme along ξ coordinate.

To ensure the existence of a local extremum of Lxs along the ξ coordinate axis, the second derivative of Lxs with respect to ξ is computed, obtaining a zero (Equation 11).

${\partial }_{\xi ,\xi }\mathit{Lxs}{|}_{Q=\sqrt{2},\xi =0}=0$
(11)

The fact indicates that Lxs has not a local extremum along the ξ coordinate and therefore can not locate spatial position. To detect the position and scale of a slope, two operators are necessary.

### Parameter estimation

The slope is detected when Lxs reaches a local extremum along the scale coordinate. As shown in Equation 12, the contrast of the slope can be solved for using Lxs and the offset can be solved for using L (value at the extremum location). To detect step slopes, a pre-smoothing operation with a small scale is required. The pre-smoothing scale is removed from the detected scale, results in the width.

$\begin{array}{l}c=3×\mathit{Lxs}×\sqrt{\frac{3\pi }{2}}\\ d=L-\frac{c}{2}\\ w=\sqrt{2}×\sqrt{{\sigma }_{\mathit{detected}}^{2}-{\sigma }_{\mathit{pre}-\mathit{smooth}}^{2}}\end{array}$
(12)

### Inter-sample localization and interpolation

Directly applying the method of continuous functions will produce noticeable errors for discrete signals. Sub-pixel localization can be applied to three-dimensional scale space functions (Brown and Lowe 2002, Lowe 2004). This paper adopts a slightly different approach, because the scale and position are detected by two different operators. Taking the derivative of the Taylor expansion of a function can determine the inter-sample location. The Lxs operator is used for scale localization (Equation 13) and Lx for spatial localization (Equation 14).

$\begin{array}{l}\mathit{Lxs}\left(\sigma \right)=\mathit{Lxs}+\mathit{Lx}{s}_{\sigma }×\sigma +\frac{1}{2}\mathit{Lx}{s}_{\mathit{\sigma \sigma }}×{\sigma }^{2}+ϵ\\ \stackrel{^}{\sigma }=-\frac{\mathit{Lx}{s}_{\sigma }}{\mathit{Lx}{s}_{\mathit{\sigma \sigma }}}\end{array}$
(13)
$\begin{array}{l}\mathit{Lx}\left(x\right)=\mathit{Lx}+L{x}_{x}×x+\frac{1}{2}L{x}_{\mathit{xx}}×{x}^{2}+ϵ\\ \stackrel{^}{x}=-\frac{L{x}_{x}}{L{x}_{\mathit{xx}}}\end{array}$
(14)

Bilinear interpolation using the refined location and scale is involved to compute the parameters. The inter-sample localization and interpolation procedure greatly improves the detection and estimation accuracy. Figure 4 illustrates located slopes between samples and the interpolated vertical position (d+c/2).

### Implementation

The scale space (L) and the Lx spaces are computed in the frequency domain (Cooley and Tukey 1965):

$\begin{array}{l}L=\mathit{edge}\ast g=\mathit{ifft}\left(\mathit{fft}\left(\mathit{slope}\right)×\mathit{fft}\left(g\right)\right)\\ \mathit{Lx}={\sigma }_{s}×\mathit{slope}\ast {g}_{x}={\sigma }_{s}×\mathit{ifft}\left(\mathit{fft}\left(\mathit{slope}\right)×\mathit{fft}\left({g}_{x}\right)\right)\end{array}$
(15)

Where σ s is the discrete smoothing scale given by Equation 20.

The Gaussian and the derivative of the Gaussian convolution kernels can be computed using the expression:

$\begin{array}{l}g=\frac{{\mathrm{e}}^{-\frac{{x}^{2}}{2{\sigma }_{s}{}^{2}}}}{\sqrt{2\pi }{\sigma }_{s}}\\ {g}_{x}=-\frac{{\mathrm{e}}^{-\frac{{x}^{2}}{2{\sigma }_{s}{}^{2}}}x}{\sqrt{2\pi }{\sigma }_{s}{}^{3}}\end{array}$
(16)

The Lxs is implemented using a central difference:

$\mathit{Lxs}={\sigma }_{s}\frac{\mathit{Lx}\left(x,{\sigma }_{s+1}\right)-\mathit{Lx}\left(x,{\sigma }_{s-1}\right)}{{\sigma }_{s+1}-{\sigma }_{s-1}}.$
(17)

The scale and spatial derivatives of Lx and Lxs can be obtained using differences (Equation 18 and Equation 19), and these values are used for the inter-sample localization.

$\begin{array}{l}L{x}_{x}=\frac{1}{2}\left(\mathit{Lx}\left(x+1,{\sigma }_{s}\right)-\mathit{Lx}\left(x-1,{\sigma }_{s}\right)\right)\\ L{x}_{\mathit{xx}}=\mathit{Lx}\left(x-1,{\sigma }_{s}\right)+\mathit{Lx}\left(x+1,{\sigma }_{s}\right)-2×\mathit{Lx}\left(x,{\sigma }_{s}\right)\end{array}$
(18)
$\begin{array}{l}\mathit{Lx}{s}_{\sigma }=\frac{1}{2}\left(\mathit{Lxs}\left(x,{\sigma }_{s+1}\right)-\mathit{Lxs}\left(x,{\sigma }_{s-1}\right)\right)\\ \mathit{Lx}{s}_{\mathit{\sigma \sigma }}=\mathit{Lxs}\left(x,{\sigma }_{s-1}\right)+\mathit{Lxs}\left(x,{\sigma }_{s+1}\right)-2×\mathit{Lxs}\left(x,{\sigma }_{s}\right)\end{array}$
(19)

In Table 1 and Equation 20, the maximum scale ensures that the convolution kernel will not exceed the signal boundary. Only slopes with contrast greater than 0.05 are considered therefore low contrast slopes are ignored as a noise. Because narrow slopes (e.g. step) are difficult to detect; it is necessary to smooth the signal first using some small scale. However, for better accuracy, pre-smoothing operation is not performed for the parameter estimation experiment.

${\sigma }_{s}={\sigma }_{0}×{2}^{\frac{s}{S}},s=0,1,$
(20)

## Noise suppression

It is well-known that the first derivative operator is extremely sensitive to noise; therefore a smoothing operation is often carried out to suppress noise. Although a large scale can filter the high level noise, signal details are also removed. The smoothing scale is often selected empirically, and a minimum scale is necessary to filter a certain noise level (mean and standard deviation). The minimum scale can only be determined by the scale-invariant detectors (instead of L x ). Therefore the following paragraphs deduce the threshold of L x for a pre-smoothing scale.

### The threshold of the first derivative operator

The first derivative of the smoothed ideal slope at the location of x 0 can be obtained using Equation 21, where the σ is the pre-smoothing scale.

${L}_{x}{|}_{x={x}_{0}}=\frac{c}{\sqrt{2\pi }\sqrt{{w}^{2}+{\sigma }^{2}}}$
(21)

If the minimum and maximum values are denoted by subscript m and M, then the low and high threshold of the L x detector are represented by T m and T M (Equation 22). The T M and the first component of T m filter slopes whose contrast is within the range of c m and c M , and the width within w m and w M . A noise can be filtered out by the second component of T m , if the standard deviation (std n) and mean (mean n) of the noise are known. It is assumed that the highest contrast of a Gaussian noise is six times the standard deviation plus the mean, and its lowest width is w m n (a small value, e.g. 0.5). If the second component of T m is smaller than the first component, then all slopes within the range are detectable. If the second component of T m is between the first one and T M , then only slopes of partial range are detectable. Otherwise, no slope can be detected. Besides, six times standard deviation is guaranteed to filter out all noise points in principle, while three times standard deviation may preserve a few noise points.

$\begin{array}{l}{T}_{m}=max\left(\frac{{c}_{m}}{\sqrt{2\pi }\sqrt{{w}_{M}{}^{2}+{\sigma }^{2}}},\frac{6×\mathit{st}{d}^{n}+\mathit{mea}{n}^{n}}{\sqrt{2\pi }\sqrt{{\left(w{n}_{m}^{n}\right)}^{2}+{\sigma }^{2}}}\right)\\ {T}_{M}=\frac{{c}_{M}}{\sqrt{2\pi }\sqrt{{w}_{m}{}^{2}+{\sigma }^{2}}}\end{array}$
(22)

In order to detect slope and filter out all noise, the second component of T m should be no more than T M (equation 23). An upper bound of the filterable noise is achieved with an infinite large pre-smoothing scale. The noise with higher standard deviation can not be completely removed from the detectable slopes.

$\begin{array}{l}\frac{6×\mathit{st}{d}^{n}+\mathit{mea}{n}^{n}}{\sqrt{2\pi }\sqrt{w{n}_{m}{}^{2}+{\sigma }^{2}}}\le \frac{{c}_{M}}{\sqrt{2\pi }\sqrt{{w}_{m}{}^{2}+{\sigma }^{2}}}\\ ⇒6×\mathit{st}{d}^{n}+\mathit{mea}{n}^{n}\le \frac{{c}_{M}\sqrt{w{n}_{m}{}^{2}+{\sigma }^{2}}}{\sqrt{{w}_{m}{}^{2}+{\sigma }^{2}}}\\ ⇒6×\mathit{st}{d}^{n}+\mathit{mea}{n}^{n}{|}_{\sigma ->\infty }\le {c}_{M}\end{array}$
(23)

As defined by Table 2, the highest contrast of synthesized ideal slopes is 1, hence the highest contrast of filterable noise is also 1. Without loss of generality, the experiments are based on Gaussian noise series of zero mean and random standard deviation. The L x detector uses the thresholds (T m and T M ) to filter out noise. The errors of L x are effectively reduced, as shown in Table 3 and Table 4.

### A method to differentiate slope and noise

Two techniques are adopted by the proposed method to suppress noise. The first is setting contrast threshold (Equation 24), and the second is limiting an operator to some range. The contrast is estimated using equation 12; therefore this sub-section will concentrate on the second technique.

$\begin{array}{l}{T}_{m}^{c}=max\left({c}_{m},6×\mathit{st}{d}^{n}+\mathit{mea}{n}^{n}\right)\\ {T}_{M}^{c}={c}_{M}\end{array}$
(24)

The ratio of the two operators of the ideal slope is a constant at the extremum location, as shown in Equation 25.

$\frac{\mathit{Lxs}}{\mathit{Lx}}{|}_{\xi =0,Q=\sqrt{2}}=\frac{2}{3}$
(25)

Table 5 lists the ratios’ range, mean and standard deviation of several slope functions. For each slope function, the experiment uses Table 2 to generate 1000 synthesized slopes. The ratios of different slope functions are similar, because the means are near 2/3, and the standard deviations are small.

The ratio behaves differently for noise. Figure 5 illustrates the ratios’ distribution for Gaussian noise. The ratios are mainly located at negative axis, and reach a peak near −1.5.

The following content tries to explain the phenomenon. A noise (impulse) of contrast, offset, and width (c, d, and w) is modeled by:

$\mathit{noise}=c×{\mathrm{e}}^{-\left(\frac{{x}^{2}}{2{w}^{2}}\right)}+d$
(26)

As before, the scale space L is the Gaussian smoothed signal, and the Lxs and Lx operators can be obtained from Equation 7 and Equation 8. The ratio equals −2 when both Q and ξ are zero (Equation 27).

$\frac{\mathit{Lxs}}{\mathit{Lx}}{|}_{\xi =0,Q=0}=-2$
(27)

The division of Lxs and Lx is shown in Figure 6. Because the width of the noise impulse is near zero, the location (x) of the feature is also near zero. And because the smoothing scale is not zero, according to Equation 9, Q and ξ are also near zero. However, since both Q and ξ are actually small values, the ratio will be slightly larger than −2 (accord with −1.5 in Figure 5).

Experimenting on Gaussian noise series of zero mean (mean n) and random standard deviations (std n), Table 6 lists the percentages of Lxs/Lx at three intervals under two conditions. The first condition is four pre-smoothing scales, and the second is the contrast thresholds, which is 0, 1, 3, or 6 times standard deviation of the noise. The table indicates that, increasing the contrast threshold will reduce the percentage of Lxs/Lx at interval [0, 1). The characteristic contributes to noise suppression, because the noise and the slopes are indistinguishable in this interval. Noise is suppressed by large pre-smoothing scale, leading to a lower contrast threshold. The noise is completely removed by pre-smoothing scale 1 and contrast threshold of 6 times standard deviation. The experiment shows that the noise can be suppressed by the following procedures: pre-smoothing the signal with a small scale, setting appropriate contrast threshold, and limiting the Lxs/Lx.

## Experimental

### Quantitative experiments

The quantitative experiments involve 1000 randomly generated synthesized slopes with parameters listed in Table 2. Signal is sampled from −256 to 256 discretely and the slope is centered at x 0.

The positional error (e x ) was measured by the distances between the slope center and the detected location (Equation 28). The slope centers could be located between the samples. Except the width of the step slopes, the parameter estimation accuracies have been measured by the relative error where the true value of a quantity is q and the inferred value q 0:

$\begin{array}{l}e=100×\frac{{q}_{0}-q}{q}.\\ {e}_{x}={q}_{0}-q\end{array}$
(28)

The root mean squared deviation (RMSD) of the error is given by

$\mathit{RMSD}=\sqrt{\frac{\sum _{n=1}^{N}{\left({e}^{n}-{ϵ}^{n}\right)}^{2}}{N}},$
(29)

where e n is the n th actual error and ϵ n is assumed to be zero.

The step slopes are pre-smoothed with scale 1 and the width is measured by absolute errors. Except the erf and step slope, the widths are transformed by median values for different function. The estimated parameters of the ideal slopes are more precise than other slope functions (Table 7). Although the signals are sampled at discrete points, the inter-sample locations are precisely recovered. The offset is estimated using the scale space and the estimated contrast, therefore has a slightly lower accuracy.

The following experiments use the RMSD of the positional error to evaluate the performances. Except ramp slope, L x produces similar errors for several slope functions (Table 8). The L x of ramp is a constant; therefore a local extremum can not be found at the slope center. It can be verified that if L x is implemented by a central difference, then a pre-smoothing is required for step slopes.

The proposed method achieves lower error because of the inter-sample localization (Table 9). A pre-smoothing is also required for the step slopes, because zero width can not be detected in the scale space.

The following experiments adopt zero-mean Gaussian noise. For the experiment of Table 10, the pre-smoothing scale is 2, and the standard deviation of the noise is a random variable between 0.001 and 1. A lower error is achieved with either a high contrast threshold (T m ) or a constraint of Lxs/Lx.

Assuming zero noise (omitting the second component of the lower threshold in Equation 22 and Equation 24), the L x (Table 3) will be more sensitive to noise than the proposed method (Table 11). Even for low level noise, L x needs large pre-smoothing scales to suppress noise. Both methods sacrifice for high level noise.

Incorporating noise information to the lower threshold, both methods produce significantly lower errors (Table 4 and Table 12). The proposed method achieves low errors for noisy slopes without large pre-smoothing scale. For a large pre-smoothing scale (e.g. 64), the two methods show similar performances.

In additional to densely sampled signals, the method presented here can also detect slopes of sparsely sampled signals. For these slopes (sample size is 21), the proposed method (Table 13) outperforms L x (Table 14). However the result of sparsely sampled slopes (Table 13) is not as good as that of densely sampled slopes (Table 9).

### Some qualitative examples

A few slopes of periodic signals are displayed in Figure 7, where the signal-to-noise ratio of the noisy signals is 25dB.

Using a script (Renfree 2008), historical stock data can be retrieved from a financial website (Yahoo! Finance 2013). Figure 8 shows historical stock data of CitiBank from January, 2003 to December, 2008, with threshold 1. The proposed method successfully detects slopes of various widths, contrasts, offset,and locations.

## Conclusion

Simple methods such as the first derivative or zero crossings of the second derivative are very sensitive to noise. To detect a slope, two operators are necessary, which should have a local extremum along either the scale or the spatial coordinate axis. The proposed detector involves the scale derivative of the spatial derivative operator, with scale-normalization. Using an error function as a test slope, the parameters are solved for precisely in closed form. A precise inter-sample localization and interpolation procedure is proposed to improve the accuracy. The method can extract slopes from synthesized or real-world signals while detecting less noise than its counterpart methods. Based on mathematical functions, the threshold selection of the first derivative is also discussed.

## References

• Bansal B, Sain J, Bansal V, Kaur G: Comparison of various edge detection techniques. Journal Of Information And Operations Management 2012, 3(1):103-106.

• Brown M, Lowe DG: Invariant features from interest point groups. In British Machine Vision Conference, Cardiff, Wales; 2002:656-665.

• Canny J: A computational approach to edge detection. IEEE Trans Pattern Anal Mach Intell 1986, 8(6):679-698.

• Cooley J, Tukey J: An algorithm for the machine calculation of complex Fourier series. Mathematics of computation 1965, 19(90):297-301. 10.1090/S0025-5718-1965-0178586-1

• Lowe D: Distinctive image features from scale-invariant keypoints. Int J Comput Vis 2004, 60(2):91-110.

• Marr D, Hildreth E: Theory of edge detection. proc: of the royal society of London. Series B, Biological Sciences 1980, 207(1167):187-217. 10.1098/rspb.1980.0020

• Oppenheim A, Willsky A: Signals and systems. Prentice-Hall Englewood Cliffs, NJ; 1983.

• Pinho A, Almeida L: A review on edge detection based on filtering and differentiation. Electrónica e Telecomunicações 2012, 2(1):113-126.

• Witkin A: Scale-space filtering. 8th Int. Joint Conf: Artificial Intelligence 1983, 2: 1019-1022.

• Yahoo! Finance 2013.http://finance.yahoo.com/

• Zhang X, C Liu C: An ideal image edge detection scheme. Multidim Syst Sign Process 2013. doi: 10.1007/s11045-013-0224-9

## Acknowledgements

This work is partially supported by National Natural Science Foundation of China (Grant No. 60472061, 60632050, 90820004), National 863 Project (Grant No. 2006AA04Z238, 200 6AA01Z119), the project of Ministry of Industry and Information Technology of China (Grant No. E0310/1112/JC01).

## Author information

Authors

### Corresponding author

Correspondence to Xiaochun Zhang.

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

Xiaochun Zhang proposed the problem, implemented the algorithm and drafted the manuscript. Chuancai Liu carried out the review and suggestion. All authors read and approved the final manuscript.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

Reprints and Permissions

Zhang, X., Liu, C. A one-dimensional slope detection approach. SpringerPlus 2, 474 (2013). https://doi.org/10.1186/2193-1801-2-474

• Accepted:

• Published:

• DOI: https://doi.org/10.1186/2193-1801-2-474

### Keywords

• Slope
• Gaussian
• Threshold
• Error function
• Sub-sample
• Localization
• Interpolation
• Noise suppression
• The first derivative operator 