I am working on a project in which I am given with a filter K. I need to:
Find a matrix A such that each row of matrix A is the concatenation of
pixels corresponding to the filter K.
K = [ k11 k12 k13
k21 k22 k23
k31 k32 k33]
I am unable to find A. I am using MATLAB.
As you are talking about pixels, I assume you want to do two dimensinal kernel smoothing.
As
Kis a 3×3 matrix I suspect that to determine given an input matrixImageyou can find a certain point of A in the following way:Of course you will still need to choose how to deal with the edges/corner cases, but I will leave that to you.