Verifying the results of Deconvolution using Residual Number System

34 Views Asked by At

I have been reading the paper Exact Deconvolution Using Number Theoretic Transforms and I think I understand it. However, I am not able to verify the example given at the end of the paper.

To summarize, given matrices A, B and X, representing a 2D convolution system,

$$A * X = B \tag{1}\label{1}$$

where $*$ is circular convolution defined as follows:

$$b(k,l) = \sum_{i=0}^{n-1}\sum_{j=0}^{n-1}a(k-i,l-j)\;x(i,j)\tag{2}\label{2}$$

(indices of $a$ are computed modulo $n$ )

Now, as per the example given in section 7:

$$ A = \begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & 0 \\ 0 & -1 & 0 \\ \end{bmatrix} $$

$$ B = \begin{bmatrix} 1 & -1 & -2 \\ 0 & 0 & 1 \\ 2 & 0 & -1 \\ \end{bmatrix} $$

X is calculated to be:

$$ X = \frac {1}{19} \begin{bmatrix} 14 & 2 & 3 \\ 22 & 14 & -17 \\ 21 & -35 & -24 \\ \end{bmatrix} $$

However, when I substitute $X$ in LHS of $(\ref{1})$, I don't get a matrix that equals $B$.

For example $b(0,0)$ evaluates to 0.26315789473684204 instead of 1. The expansion of $b(0,0)$ as per ($\ref{2}$) is:

X(0, 0): 14/19  * A(0, 0): 1     = 0.7368421052631579
X(0, 1): 2/19   * A(0, 2): -1    = -0.10526315789473684
X(0, 2): 3/19   * A(0, 1): 0     = 0.0
X(1, 0): 22/19  * A(2, 0): 0     = 0.0
X(1, 1): 14/19  * A(2, 2): 0     = 0.0
X(1, 2): -17/19 * A(2, 1): -1    = 0.8947368421052632
X(2, 0): 21/19  * A(1, 0): 0     = 0.0
X(2, 1): -35/19 * A(1, 2): 0     = -0.0
X(2, 2): -24/19 * A(1, 1): 1     = -1.263157894736842

What am I doing wrong?