0
$\begingroup$

I am currently reading this paper which discusses several image interpolation methods, such as nearest neighbor and linear interpolation, using convolution filters. I first want to do this in 1D with discrete-time signals (e.g. [0 0 1 0 0]), however, I have some trouble understanding on how to derive the convolution filters from the mathematical definitions:

$$h_{NN}(x)=\cases{ 1, &if$\quad-\frac{1}{2} \leqslant x < \frac{1}{2},$\\ 0, &otherwise, }$$ $$h_{Lin}(x)=\cases{ 1-|x|, &if$\quad 0 \leqslant |x| < 1,$\\ 0, &if$\quad 1 \leqslant |x|.$ }$$

My main question is, how do I calculate the filter weights as well as the filter size? Furthermore, I am aware of the fact that I need to convolve the signal multiple times to upsample it, which the following equation in the paper also shows.

$$I(\mathbf{x}) = (\dots((I_s(\mathbf{p})*h(x_1))*h(x_2))*\dots)*h(x_N),$$

What are the several x in there? In case of images, they are the positions of the original image (before it is reconstructed from $I_s(p)$), but how do I apply this concept to one-dimensional discrete-time signals?

I would be thankful for any help!

$\endgroup$
  • $\begingroup$ I feel that a complete answer to this question would be rather long because there are some points in the question that reveal that you are not aware of some of the basics. This is not criticism. I am not trying to put you on the spot. I am talking about what seems to make the question too broad. Do you think you could have a look at chapters 3,5,6,7,8,11,14,16,17 and 24 in this book and try to focus your question? I am not being funny or anything, it might look like a lot but it is not. The book is very accessible... $\endgroup$ – A_A Dec 14 '18 at 11:44
  • $\begingroup$ ...Before you can get an answer that you can fully make use of, you need to have a good understanding of some basic facts in 1-dimensional DSP. The Whittaker-Shannon for example is one of them, which will lead you to Sinc filters, which leads you to integrators and interpolation, which leads you to convolution which leads you to doing it via the DFT and so on. $\endgroup$ – A_A Dec 14 '18 at 11:48
0
$\begingroup$

Starting from the equation with the convolutions and assuming unit distance between sampling grid points, for a one-dimensional signal you'll have just:

$$I(\mathbf{x}) = I((x_1))= I_s((p_1))*h(x_1),$$

where $\mathbf{x}$ is the vector of continuous coordinates of which there is only one: $x_1 \in \mathbb{R}.$ Likewise there is just a single discrete coordinate $p_1 \in \mathbb{Z}.$ For simplicity, you could drop the vector notation and subscripts altogether and have just:

$$I(x) = I_s(p)*h(x).$$

Without having fully read the paper, I don't think the authors dare to venture into defining what is meant by convolution between discrete-time $I_s(p)$ and continuous-time $h(x)$ which results in continuous-time $I(x)$. Such a convolution can be defined as:

$$I(x) = \sum_{p=-\infty}^{\infty}I_s(p)h(x-p)$$

For example, if you want to obtain $I(x)$ within the inter-sample interval $0 \le x < 1$ and you use the linear interpolation kernel, then the above simplifies as:

$$\begin{eqnarray}I(x) &=& \sum_{p=-\infty}^{\infty}I_s(p)h_{Lin}(x-p)\\ &=& \sum_{p=-\infty}^{\infty}I_s(p)\times\cases{ 1-|x-p|, &if$\quad 0 \leqslant |x-p| < 1,$\\ 0, &if$\quad 1 \leqslant |x-p|$ }\\ &=& \sum_{p=0}^{1}I_s(p)(1-|x-p|)\\ &=& I_s(0)(1-x) + I_s(1)(1-(1-x))\\ &=& I_s(0)(1-x) + I_s(1)x.\end{eqnarray}$$

Or likewise for any inter-sample interval $x_0 \le x < x_0 + 1:$

$$I(x) = I_s(x_0)(1-(x - x_0)) + I_s(x_0 + 1)(x - x_0).$$

Another way to understand such convolutions is that $I_s(p)$ is the product of the continuous-time signal multiplied by a Dirac comb, and to use a continuous-time convolution integral.

As you can see from the above, the interpolation filter is not a regular discrete-time filter, but one that converts a discrete-time signal into a continuous-time signal. The convolution filter definitions cited in the question are directly applicable, without further "sizing", when the sampling interval is 1.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.