Apply a box blur filter to a grayscale image by averaging pixels in a square neighborhood:
where and is the number of valid pixels in the kernel.
This creates a blurring effect by smoothing out pixel values. The larger the kernel size, the more blurred the result!
Input
input_image- grayscale image of shape[width][height]containing floating-point pixel intensities in the range .width- the number of columns in the image.height- the number of rows in the image.kernel_size- the side length of the square blur kernel.
Output
output_image- blurred grayscale image of shape[width][height].