MATLAB: 3*3 kernal slide

3*3 kernal movementltdp

I'm working on local tri directional quienry pattern (LTriDP) for 3*3 matrix it works fine but my kernal is not moving on next 3(overlapping window) matrix elements to calculate LTDP. need help how can my kernal move after calculating firts 3*3 here is the code below.

Best Answer

You need an outer double loop over rows and columns of the larger matrix, then inside that you need another double loop to go over the elements of your filter at a fixed location of the larger matrix. See attached code where I do a convolution "manually" with 4 for loops instead of using the conv2() function.
Related Question