I need clarification and verification to better help me understand convolving non-square kernel on matrices along axises.

If I have a 1x3 kernel of [-1, 0, 1] and need to convolve a 3x3 matrix of [[2,1,3],[4,5,2],[3,7,6]] along the row axis/vertical axis without padding, does that mean I would slide the kernel from left to right and get a resulting 3x1 matrix of value [[1],[-2],[3]]?

Likewise if I use the same kernel value and convolve the same 3x3 matrix along the column axis/horizontal axis, would I transpose the kernel into 3x1 kernel of [[-1],[0],[1]] and slide the kernel from top to bottom to get a resulting 1x3 matrix of value [1,6,3]?

What is the purpose of applying non-square filters along an axis(row v.s. column)? If you combine the results of the vertical and horizontal convolution, do you yield the same result as a 2D convolution?


Your Answer

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

Browse other questions tagged or ask your own question.