Python, Image Processing, Kernel, Matplotlib, TensorFlow.
image_height, image_width = image.shape output_height = image_height - kernel_height + 1 output_width = image_width - kernel_width + 1 output = np.zeros((output_height, output_width)) for y in range(output_height): for x in range(output_width): output[y, x] = np.sum(image[y:y + kernel_height, x:x +