I have done some research on the Internet and I have found that a given 2D mask is separable if it exists only a singular value of that matrix. For example, given the following matrix:
$$A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \end{pmatrix}$$
If I do for instance in matlab svd(A)
, it gives me the vector $[0\; 0\; 6]$, thus, the filter is separable. Nevertheless, I would like to know if it is possible to calculate the vectors that multiplied (or convolved) give raise to $A$. As a matter of fact, I know that:
$$\begin{pmatrix} 1 \\ 2 \\ 1 \end{pmatrix} \begin{pmatrix} 1 & 2 & 1 \end{pmatrix}= \begin{pmatrix} 1 & 2 & 1 \\ 2 & 4 & 2 \\ 1 & 2 & 1 \end{pmatrix} $$
However, I would like to calculate those vector for any separable matrix.
Thank you so much for your responses.