fixed firsts comments from frankd

This commit is contained in:
toni
2018-02-24 13:10:46 +01:00
parent 96b1840f1b
commit 46c8bc4b1c
5 changed files with 22 additions and 22 deletions

View File

@@ -18,7 +18,7 @@ While in both equations the constant factor of the Gaussian is removed of the in
This factor is necessary to ensure that the estimate is a valid density function, i.e. that it integrates to one.
Such a restriction is superfluous in the context of digital filters, so the normalization factor is omitted.
Computation of a digital filter using the a naive implementation of the discrete convolution algorithm yields $\landau{NM}$, where $N$ is the length of the input signal and $M$ is the size of the filter kernel.
Computation of a digital filter using the a naive implementation of the discrete convolution algorithm yields $\landau{NM}$, where $N$ is again the input size given by the length of the input signal and $M$ is the size of the filter kernel.
In order to capture all significant values of the Gaussian function the kernel size $M$ must be adopted to the standard deviation of the Gaussian.
A faster $\landau{N}$ algorithm is given by the well-known approximation scheme based on iterated box filters.
While reducing the algorithmic complexity this approximation also reduces computational time significantly due to the simplistic computation scheme of the box filter.
@@ -28,7 +28,7 @@ Following that, a implementation of the iterated box filter is one of the fastes
\subsection{Box Filter}
The box filter is a simplistic filter defined as convolution of the input signal and the box (or rectangular) function.
A discrete box filter of \qq{radius} $l\in N_0$ is given as
A discrete box filter of radius $l\in \N_0$ is given as
\begin{equation}
\label{eq:boxFilt}
(B_L*x)(i) = \sum_{k=0}^{L-1} x(k) B_L(i-k)
@@ -48,7 +48,7 @@ Such a filter clearly requires $\landau{NL}$ operations, where $N$ is the input
It is well-known that a box filter can approximate a Gaussian filter by repetitive recursive computations.
Given by the central limit theorem of probability, repetitive convolution of a rectangular function with itself eventually yields a Gaussian in the limit.
Likewise, filtering a signal with the box filter several times approximately converges to a Gaussian filter.
In practice three or five iterations are most likely enough to obtain a reasonable close Gaussian approximation \cite{kovesi2010fast}.
In practice three to five iterations are most likely enough to obtain a reasonable close Gaussian approximation \cite{kovesi2010fast}.
This allows rapid approximation of the Gaussian filter using box filter, which only requires a few addition and multiplication operations.
Opposed to the Gaussian filter where several evaluations of the exponential function are necessary.
@@ -83,7 +83,7 @@ Therefore, in order to approximate the Gaussian filter of a given $\sigma$ a cor
Given $n$ iterations of box filters with identical sizes the ideal size $\Lideal$, as suggested by Wells~\cite{wells1986efficient}, is
\begin{equation}
\label{eq:boxidealwidth}
\Lideal = \sqrt{\frac{12\sigma^2}{n}+1} \text{.}
\Lideal = \sqrt{\frac{12\sigma^2}{n}+1} \quad \text{.}
\end{equation}
In general $\Lideal$ can be any real number, but $B_L$ in \eqref{eq:boxFx} is restricted to odd integer values.
@@ -97,7 +97,7 @@ In order to reduce the rounding error Kovesi~\cite{kovesi2010fast} proposes to p
\floor{\Lideal} - 1 & \text{if } \floor{\Lideal} \text{ is odd} \\
\floor{\Lideal} & \text{else }
\end{cases} \\
L_2 &= L_1 + 2 \text{.}
L_2 &= L_1 + 2 \quad \text{.}
\end{split}
\end{align}
@@ -105,7 +105,7 @@ Given $L_1$ and $L_2$ the approximation is done by computing $m$ box filters of
As all other values are known $m$ can be computed with
\begin{equation}
\label{eq:boxrepeatm}
m=\frac{12\sigma^2-nL_1^2-4nL_1-3n}{-4L_1-4} \text{.}
m=\frac{12\sigma^2-nL_1^2-4nL_1-3n}{-4L_1-4} \quad \text{.}
\end{equation}
The approximated $\sigma$ as a function of the integer width has a staircase shaped graph.