Question: Write the function spatial_filter, in matlab, that takes two inputs: a grayscale image (amatrix, not a filename) and a filter (also represented as a matrix).
Write the function spatial_filter, in matlab, that takes two inputs: a grayscale image (amatrix, not a filename) and a filter (also represented as a matrix). Specifically, it should implement the equation at the bottom. Your function should output an image (a matrix, not a file) of type double with the same dimensions as the input image. You can assume that the filter is odd sized. Use zero padding to extend the image when the filter goes beyond the boundaries of the image.

g(x,y)= n(s,t)/(x + s, y +1) s--at--b
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
