Wavelet filter

The wavelet transform is commonly used in modern signal-processing applications. This type of wavelet filter applies the à trous algorithm [2, 1] which is an undecimated scheme in which the filter responses are up-sampled, thereby inserting holes (trous in French) between the filter coefficients. The output of each filter level, therefore, contains the same number of samples as the input.

The wavelet transform of the input data at level j=1,\ldots,N is computed as

F_{j}=V_{j-1}-V_{j}\,, (1)

where

V_{j}=\left(V_{j-1}*\boldsymbol{k}_{j}\right)*\boldsymbol{k}_{j}^{\top}\,. (2)

Here V_{0}=I is the input image, \boldsymbol{k}_{j} is a filter kernel (see convolution with separable kernels) at the corresponding level, and l is the kernel size. The number of levels is given by N.

The expression in Equation (1) acts as a band-pass filter. Each wavelet level thus corresponds to a different range of spatial frequencies. The first level F_{1} contains mainly the high spatial frequencies present in the input image including noise. Higher levels contain ranges of lower and lower image frequency components. In our case, the output of the wavelet filter is the second wavelet level F_{2}. The standard deviation of values obtained in the first wavelet level F_{1} can be used as a molecular detection threshold in the filtered image [1].

The wavelet filter typically uses a convolution kernel based on normalized B-spline basis functions [2, 1]. In our case, the B-spline basis function of order q\in\mathbb{N}^{+} in the variable t\in\mathbb{R}, written as B_{q}\left(t\right), is defined recursively as follows. For q=1,

B_{1}\left(t\right)=\begin{cases}1&\quad\mathrm{if}\;0\leq t<1\,,\\
0&\quad\mathrm{otherwise}\,,\end{cases}

and for q>1,

B_{q}\left(t\right)=\frac{t}{q-1}B_{q-1}\left(t\right)+\frac{q-t}{q-1}B_{q-1}%
\left(t-1\right).

Here B_{q}\left(t\right) has non-zero values only in the interval 0\leq t<q.

The first wavelet level F_{1} is computed using the convolution kernel \boldsymbol{k}_{1}=\left[k_{1,1},\ldots,k_{1,l}\right], where k_{1,i}\left(x\mid q,s\right)=aB_{q}\left(\frac{x}{s}+\frac{q}{2}\right), i=1,\ldots,l, x=i-\left(l+1\right)/2, and l=2\left\lceil\frac{qs}{2}\right\rceil-1. Here s>0 defines a scaling factor of the variable x, and a is a scaling factor such that \sum_{i}k_{1,i}=1. Kernels for higher wavelet levels are obtained by inserting zeros between the kernel coefficients. Users need to input the order q of the B-spline basis function and the scaling factor s.

In our implementation, the default kernel uses a B-spline basis function of the third order with a scaling factor s=2. These settings yield kernels \boldsymbol{k}_{1}=\left[\frac{1}{16},\frac{1}{4},\frac{3}{8},\frac{1}{4},%
\frac{1}{16}\right]^{\top} and \boldsymbol{k}_{2}=\left[\frac{1}{16},0,\frac{1}{4},0,\frac{3}{8},0,\frac{1}{4%
},0,\frac{1}{16}\right]^{\top}, as suggested in [2, 1].

Threshold for approximate localization of molecules

The threshold value can be specified by users as an expression combining mathematical functions and operators with variables based on the current raw or filtered image. Variables provided by this filter are:

Wave.I current raw input image
Wave.F corresponding filtered image
Wave.F1 first wavelet level F_{1} of the current input image
Wave.F2 second wavelet level F_{2} of the current input image

References