I'm trying create below kernel an image(but without any libraries, only numpy), I read how to do it, but I'm new in this field. If you help me i would be happy.
These below codes give me right result for 3x3 matrix.
How can I make to adapt my codes for 487x487 matrix?
I will apply below image. This image 487x487.
At first I created the image as matrix with asarray method;
picMatrix = np.asarray(pic)
After that i make its a copy;
picMatrixCopy = picMatrix.copy()
And for tour into matrix a 3x3 zeros matrix;
rep = np.zeros((3,3))
And the kernel (1/25);
kernel = [[-1,0,1],
[-1,0,1],
[-1,0,1]]
And for loop(it's not exactly, i will do other math processing in this for loop);
for i in range(3):
for j in range(3):
rep[i][j] = kernel[i][j] + picMatrixCopy [i][j]