0
$\begingroup$

My understanding is that a symmetrical kernel is its own self-adjoint. For example, if we had the following kernel:

kernel = np.array([[-1, -1, -1],
                   [-1,  8, -1],
                   [-1, -1, -1]])

And applied a convolution with that filter:

from skimage import data
image = data.camera()

conv_result_1 = signal.fftconvolve(image, kernel, mode='same')

enter image description here

Then applied that same kernel again, it would undo the operation:

conv_result_2 = signal.fftconvolve(grad, kernel, mode='same')

enter image description here

But it doesn't undo the operation! What am I missing here?

$\endgroup$

1 Answer 1

2
$\begingroup$

In what ring of convolutions the given kernel is idempotent?

Certainly not for the regular convolution

kernel = np.array([[-1, -1, -1],
                   [-1,  8, -1],
                   [-1, -1, -1]])
scipy.signal.fftconvolve(kernel, kernel, mode='full')
array([[  1.,   2.,   3.,   2.,   1.],
       [  2., -14., -12., -14.,   2.],
       [  3., -12.,  72., -12.,   3.],
       [  2., -14., -12., -14.,   2.],
       [  1.,   2.,   3.,   2.,   1.]])

Actually, there is no finite kernel that is idempotent for the regular convolution. Assume that a kernel is a polynomial $h(z_x, z_y) \ne 1$, and you want $h(z_x, z_y)^2=1$, this simply has no solutions, unless you are in a special ring of polynomials (e.g. the $h(z_x, z_y)^2 \equiv 1 \mod x^N - 1$, for the cyclic convolution).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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